Extend weathermap dashboard with BGP/ports tables, per-site throughput, fix node status query

Fix node.statusQuery colliding legends: multi-neighbor devices previously
sourced from raw per-neighbor BGP session-state series that collide under
one legend, so an arbitrary neighbor won. Replace with a combined
device-up * worst-BGP-session query per device, with an explicit fallback
so zero-BGP devices (access switches) read as neutral/OK.

Add site label via Prometheus relabel (derived from device naming
convention) instead of per-query label_replace(). Add site/device template
variables, BGP sessions table, ports/interfaces table (Grafana merge
transform, not PromQL join), and per-site throughput graphs.

Refs #49
This commit is contained in:
2026-07-10 09:45:40 +00:00
parent 3c680a2b17
commit b03464d0df
4 changed files with 588 additions and 42 deletions

View File

@@ -16,6 +16,16 @@ scrape_configs:
- action: labeldrop
regex: source
# site: not exported by gnmic -- derived from the hostname naming
# convention (see CLAUDE.md: dc-*/campus-*/core* regex used for
# IPFabric site separation) here instead of repeating label_replace()
# in every dashboard query, see issue #49
- source_labels: [device]
target_label: site
regex: (campus|core|dc)-?.*
replacement: $1
action: replace
# interface: raw label is already "interface_name" (OpenConfig key on the
# "interface" path element) — normalize to "interface" for consistency
- source_labels: [interface_name]