|
1 | 1 | # json_exporter config for the moqx stats stack. |
2 | 2 | # |
3 | | -# Turns the relay admin /state JSON (which the aggregate /metrics does NOT carry) |
4 | | -# into per-track Prometheus series so Grafana can graph subscribers per track |
5 | | -# over time. Prometheus scrapes this exporter with ?module=moqx&target=<state-url> |
6 | | -# (see the moqx-state job in prometheus.yml). |
| 3 | +# Turns admin JSON the aggregate /metrics does not carry into Prometheus |
| 4 | +# series. Prometheus scrapes this exporter with ?module=<name>&target=<url> |
| 5 | +# (see the moqx-state and moqx-info jobs in prometheus.yml). |
7 | 6 | # |
8 | | -# NOTE: per-track series scale with the number of distinct track names, so this |
9 | | -# is higher-cardinality than the relay's own metrics — scraped at 15s to keep |
10 | | -# the sample rate down. |
| 7 | +# Per-track series come from the relay's own /metrics/track, not from here: |
| 8 | +# both emitted moqx_track_subscribers, and /state's entries are transient and |
| 9 | +# undercount under load (openmoq/moqx#501). |
11 | 10 | modules: |
12 | 11 | moqx: |
13 | 12 | metrics: |
14 | | - # One series per active subscription entry, keyed by track name. |
15 | | - - name: moqx_track |
16 | | - type: object |
17 | | - help: Per-track subscription stats from the relay admin /state |
18 | | - path: '{.services.default.subscriptions[*]}' |
19 | | - labels: |
20 | | - track: '{.track_name}' |
21 | | - is_publish: '{.is_publish}' |
22 | | - # namespace is a JSON array (e.g. ["com.wowza","moq","moqtest_all"]); |
23 | | - # slash-join it into a browsable path label (separator between |
24 | | - # elements only — no trailing "/"). |
25 | | - namespace: '{.namespace[0]}{range .namespace[1:]}/{@}{end}' |
26 | | - values: |
27 | | - subscribers: '{.subscribers}' |
28 | | - forwarding_subscribers: '{.forwarding_subscribers}' |
29 | 13 | # Top-level scalars for cross-checking against the aggregate /metrics. |
30 | 14 | - name: moqx_state_active_sessions |
31 | 15 | help: Active sessions reported by the admin /state |
|
0 commit comments