Skip to content

Commit

Permalink
Update monitoring documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vruello committed Nov 23, 2024
1 parent 9f4adca commit e908b58
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions doc/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,27 @@ $ openwec heartbeats -a 192.168.1.0 -s my-test-subscription
```

Two formats are available: `text` (default) and `json` (`--format`).

## Prometheus-compatible endpoint

OpenWEC can expose a Prometheus-compatible endpoint with multiple metrics.

### Configuration

This feature is **disabled** by default.

Metrics collection and publication can be enabled in the OpenWEC settings (see `monitoring` section of [openwec.conf.sample.toml](../openwec.conf.sample.toml)).

### Available metrics

| **Metric** | **Type** | **Labels** | **Description** |
|---|---|---|---|
| `openwec_received_events_total` | `Counter` | `subscription_uuid`, `subscription_name`, `machine` (optional*) | Number of events received by openwec |
| `openwec_event_size_bytes_total` | `Counter` | `subscription_uuid`, `subscription_name`, `machine` (optional*) | The total size of all events received by openwec |
| `http_request_body_real_size_bytes_total` | `Counter` | `method`, `uri`, `machine` (optional*) | The total size of all http requests body received by openwec after decryption and decompression |
| `http_request_body_network_size_bytes_total` | `Counter` | `method`, `uri`, `machine` (optional*) | The total size of all http requests body received by openwec |
| `openwec_messages_total` | `Counter` | `action` (one of `"enumerate"`, `"heartbeat"`, `"events"`) | Number of messages received by openwec |
| `http_request_duration_seconds` | `Histogram` | `method`, `status`, `uri` | HTTP requests duration histogram |

> [!WARNING]
> Enabling the `machine` labels may cause a **huge** increase in metric cardinality!

0 comments on commit e908b58

Please sign in to comment.