You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ High-performance C++ service to monitor containerized environments via cgroups v
11
11
-**Direct Scraper**: Parses `/sys/fs/cgroup` files for precision CPU (`usage_usec`) and RAM (`memory.current`) metrics.
12
12
-**Docker Mapping**: Resolves container IDs to names using the Docker Engine API.
13
13
-**Self-Discovered IP**: Automatically detects its host/container IP for registration if not provided.
14
-
-**Batched Exporter**: Efficiently buffers and pushes JSON metrics to a configurable endpoint.
14
+
-**Flexible Exporter**: Can push JSON to a core API or Prometheus text payloads directly to a Pushgateway-compatible endpoint.
15
15
-**Internal Healthcheck**: Simple HTTP `/health` server for orchestration.
16
16
17
17
## Configuration
@@ -20,19 +20,21 @@ All settings are managed via environment variables.
20
20
| Variable | Description | Default |
21
21
|----------|-------------|---------|
22
22
|`METRIC_ENDPOINT`| HTTP URL for metrics submission | (required) |
23
-
|`REGISTRATION_ENDPOINT`|HTTP URL for service discovery | (optional)|
24
-
|`SCRAPE_INTERVAL`|Seconds between scrapes |`10`|
25
-
|`BATCH_SIZE`|Metric count before pushing|`10`|
23
+
|`METRIC_EXPORT_MODE`|`core` for JSON-to-backend, `prometheus`for Pushgateway text export |`core`|
24
+
|`REGISTRATION_ENDPOINT`|HTTP URL for service discovery, for example `http://core:8000/metric-services/register` or `http://core:8000/metric-services/register/1`| (optional)|
25
+
|`SCRAPE_INTERVAL`|Seconds between scrapes; each scrape is pushed immediately|`10`|
26
26
|`SERVICE_NAME`| Name reported to registry |`bicep-metric-service`|
27
27
|`SERVICE_PORT`| Healthcheck port |`8080`|
28
28
|`SERVICE_IP`| Service IP address | (auto-detected) |
29
29
30
+
When `METRIC_EXPORT_MODE=prometheus`, `METRIC_ENDPOINT` should point at a Pushgateway-compatible URL such as `http://host:9091/metrics/job/metric_service_host_1`.
0 commit comments