Skip to content

Commit d883dfa

Browse files
committed
stats: take per-track series from the relay, not /state
Both sources emitted moqx_track_subscribers, so leaving the /state module in place would blend two label schemes into one metric name. The relay's own counters are durable where /state's entries are transient (#501), and they carry bytes and object counts /state never had. Tracks table gains real Bitrate (ingest rate) and Data Tx (delivered payload).
1 parent 3ba4740 commit d883dfa

1 file changed

Lines changed: 6 additions & 22 deletions

File tree

docker/json-exporter/json-exporter.yml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,15 @@
11
# json_exporter config for the moqx stats stack.
22
#
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).
76
#
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).
1110
modules:
1211
moqx:
1312
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}'
2913
# Top-level scalars for cross-checking against the aggregate /metrics.
3014
- name: moqx_state_active_sessions
3115
help: Active sessions reported by the admin /state

0 commit comments

Comments
 (0)