Build full telemetry dashboard around the weathermap panel #49
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Extend the weathermap panel (#48) into a complete operational dashboard, with the weathermap as the top overview panel and supporting panels for detail below.
Depends on: #48 (weathermap panel, done + visually validated), #44 (metrics, validated), #45 (Prometheus datasource
NetLab).Panels
Weathermap node status rework (new requirement)
Current
node.statusQueryfrom #48 is"BGP {{device}}", one legend per device, sourced from the raw per-neighbor BGP session-state series. Bug: if a device has more than one BGP neighbor, multiple series collide on the same legend string and only one arbitrarily wins in Grafana's display-name map. Not previously caught because it wasn't visually obvious.New requirement — node is green only if:
min by (device) (interfaces_interface_state_oper_status)(at least one interface active) — confirm this is the right proxy, device-level reachability has no direct metricmin by (device) (bgp_session_state)— must reflect the worst session, not just any one. Devices with zero BGP sessions (e.g. access switches) must NOT be penalized by missing data — needs an explicitorfallback so "no BGP configured" reads as neutral/OK, not down.Combine both into a single per-device status series feeding
node.statusQuery, replacing the current one-neighbor-wins query. Validate live via/api/ds/query(same method as #48) against at least one device with multiple BGP neighbors and one device with none, to confirm both edge cases resolve correctly.Template variables
site— campus/core/dc, derived from device naming convention or IPFabric site groupingdevice— filtered by selected siteNotes
campus-*/core*/dc-*) or computed at query timeNetLabdatasource (uidcfrlusac89se8a) already validated in #48Implemented in
b03464d(branchfeat/telemetry). Dashboard regenerated viascripts/generate_weathermap.py(extended, not hand-edited) →configs/grafana/weathermap-dashboard.json, re-provisioned to Grafana (evpn-vxlan-fabric-weathermap, now dashboard version 4).Part 1 — node status fix
Final PromQL (per device,
refId: A,legendFormat: "STATUS {{device}}"):node.statusQueryon all 28 nodes now points at"STATUS {{device}}".Edge-case validation via
/api/ds/queryagainst the live in-topology Prometheus:dc-spine1, 20 BGP neighbors): confirmed 20 raw series previously collided under the single legend"BGP dc-spine1"(the bug). New combined query returns exactly one seriesSTATUS dc-spine1 = 1, correctly reflectingmin()over all 20 sessions (worst wins, not first-match).dc-access1, access switch, 0 BGP sessions): raw BGP query returns empty for this device; new combined query still returnsSTATUS dc-access1 = 1via theorfallback — not penalized as down.1in current lab state, as expected).Part 2 — site label
Resolved via Prometheus
metric_relabel_configs(notlabel_replace()per query) —configs/prometheus/prometheus.yml:Chosen over per-query
label_replace()sincesiteis needed by every new panel (BGP table filter, ports table filter, throughput aggregation) — one relabel rule beats repeating the regex 5+ times. Applied by restarting the Prometheus container (no--web.enable-lifecycle, so/-/reloadreturned 403). Validated:count by (site) (interfaces_interface_state_oper_status)→campus=66, core=12, dc=120.Surprise: right after restart,
/api/v1/querybriefly returned both the old (no-site) and new (site-tagged) series for the same device/interface, both with near-current timestamps — looked like a live duplicate-write bug. It was actually the pre-restart series sitting in Prometheus's 5-minute staleness/lookback window (frozen at its last real sample) alongside the new series. Resolved itself once >5 min had passed since restart. Worth remembering if this comes up again after any future relabel change.Template variables
site: query variable,label_values(interfaces_interface_state_oper_status, site), multi + include-alldevice: query variable chained onsite,label_values(interfaces_interface_state_oper_status{site=~"$site"}, device), multi + include-allNew panels
network_instances_network_instance_protocols_protocol_bgp_neighbors_neighbor_state_session_state{device=~"$device"}, columns device/neighbor_address/network_instance_name(VRF)/state, 0/1 → Down(red)/Up(green) value mapping. Validated live: 180 series resolve with all needed labels present.interfaces_interface_state_counters_{in,out}_octets) combined with Grafana's merge transformation (matches on shareddevice/interface/sitefields) — deliberately not a PromQL join, per the VXLAN join failure already logged in #44/#48. Validated all 3 queries independently resolve (198 series each) with matching label sets.sum by (site) (rate(interfaces_interface_state_counters_{in,out}_octets{site=~"$site"}[5m]) * 8), signed graph (out negated) rather than two separate panels — clearer at a glance which direction dominates per site. Validated live: campus/core/dc all return non-zero bps.Naming surprises
None beyond the staleness-window one above — metric/label names matched #44/#45 exactly as documented, no new aliasing needed.
Outstanding
Manual visual check in the Grafana UI (node colors, table rendering, variable filtering) still needs a human pass — this Grafana instance has no image-renderer plugin installed and I have no browser tool available, so I could not screenshot it myself. Dashboard:
$GRAFANA_URL/d/evpn-vxlan-fabric-weathermap.