per-track metrics: scrape stack, relay-visible dashboard, public variant - #539
per-track metrics: scrape stack, relay-visible dashboard, public variant#539gmarzot wants to merge 4 commits into
Conversation
12e0746 to
284a044
Compare
|
waiting got PR#533 to merge |
284a044 to
96ef6ef
Compare
96ef6ef to
3ba4740
Compare
afrind
left a comment
There was a problem hiding this comment.
@afrind reviewed 7 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on gmarzot).
docker/config.docker.yaml line 62 at r1 (raw file):
admin: port: ${MOQX_ADMIN_PORT} track_metrics_enabled: true
Does this impact perf test?
docker/prometheus/namespace-targets.py line 71 at r1 (raw file):
def write(path, entries): payload = [ {"targets": [safe_namespace(ns)], "labels": {"moqx_namespace": "/".join(ns)}}
joining on / ? the endpoint assumes - (and -- to demarcate track name)
docker/prometheus/prometheus.yml line 76 at r1 (raw file):
replacement: json-exporter:7979 # Per-track counters from the relay (openmoq/moqx#533). One namespace per
Don't know that referring to pr numbers is useful long term docs
37ec9ab to
d4dad93
Compare
afrind
left a comment
There was a problem hiding this comment.
@afrind reviewed 6 files and all commit messages, and resolved 1 discussion.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on gmarzot).
|
Previously, afrind wrote…
no.. different harness |
|
Previously, afrind wrote…
for display only .. real safenames will be used where required |
gmarzot
left a comment
There was a problem hiding this comment.
@gmarzot reviewed 8 files and all commit messages, and resolved 2 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on gmarzot).
1f62fcc to
87a1f71
Compare
4945617 to
e82cba9
Compare
/metrics/track takes one namespace per request, so an ns-targets sidecar walks the relay's namespace tree and writes one file_sd target per live namespace. Scrapes pass omit_metadata (HELP/TYPE lines are static; older relays ignore the param). json-exporter drops its /state per-track series in favor of the relay's own. track_metrics_enabled goes on in the docker config.
The relay must not peek at publisher content: catalog columns (type, codec, resolution, fps, QoE) are gone. Tracks scope to a namespace selector (a relay carries too many to list), with an optional track filter; namespace rows link into the scoped view. Real columns from the track counters: bitrate, data-tx (per track and per namespace), status pills from last-object age (LIVE/IDLE/DONE — a silent track with subscribers is IDLE; DONE means it left the relay). Placeholders (fetches, latency, drops, cache-hit) await the per-track QoS counters; QoS reports NORMAL until a real heuristic exists. CDN efficiency gauge = 1 - ingress/egress payload rates. Banner uptime comes from the relay's /info instead of host boot time. Pill colors key off the displayed text (Grafana pill cells look up mappings by display value).
Public dashboards do not interpolate template variables, so the interactive overview cannot be published. The public variant shows a global top-20 tracks table grouped per namespace (nested tables — no variables needed) and a top-10 chart with namespace/track legends. The public viewer also never runs the frontend prometheus datasource, so format=table never happens there: the tables build their columns with labelsToFields + merge transformations instead of joinByField, and the chart names series via a displayName field default.
Archived copies keep the live uid; the provisioner loads *.json recursively and duplicate uids lock it out of all database writes.
e82cba9 to
aac894d
Compare
Wires the dashboard to the per-track series from #533.
/metrics/tracktakes one namespace per request); scrapes passomit_metadata; json-exporter's /state per-track series retired;track_metrics_enabledon in the docker config.moqx-public): public dashboards can't interpolate template variables, so the public view is a separate variable-free dashboard — top-20 tracks grouped per namespace via nested tables.This change is