Skip to content

Native Grafana dashboards for Microdep (Gaps overview, Map, Details) - #111

Open
bradojev wants to merge 5 commits into
5.3.0from
grafana-native-panels
Open

Native Grafana dashboards for Microdep (Gaps overview, Map, Details)#111
bradojev wants to merge 5 commits into
5.3.0from
grafana-native-panels

Conversation

@bradojev

Copy link
Copy Markdown
Collaborator

Adds a hybrid Grafana integration: tabular / statistical / time-series views rendered natively in Grafana (querying the same OpenSearch archive directly), plus the geographic map embedded as an iframe. Purely additive — new files under etc/grafana/ only (merge-base c82358d); it does not touch the map frontend. Complements the existing grafana_dashboard_patch button.

Dashboards (folder "Microdep")

  • Gaps overview — total gaps (stat), gaps over time, top-10 source hosts, link to the map.
  • Map — the full /microdep/ map embedded as a themable full-size <iframe> (needs [panels] disable_sanitize_html = true, which perfSONAR sets; the map is same-origin so it frames fine).
  • Details — jitter percentiles over time (h_jit p50/p95/p99), top link pairs by time-lost (tloss), a source×target gap matrix via the esnet-matrix-panel plugin, and gap/jitter data-freshness stats.

Datasources

Two grafana-opensearch-datasource provisioning files, mirroring perfSONAR's own perfsonar-local.yaml: microdep-dragonlab (index dragonlab) and microdep-jitter (index dragonlab_jitter). Time field is @timestamp (the only date-typed field; timestamp is epoch-float, datetime is text). Term aggs use .keyword.

Notes

  • Requires the grafana-opensearch-datasource and esnet-matrix-panel plugins — both already present on the perfSONAR Grafana.
  • etc/grafana/README.md documents provisioning + gotchas.
  • Every query verified live through Grafana's datasource proxy on a test host; all dashboards provision cleanly.
  • Not yet wired into the deb/rpm packaging (provisioned manually per the README) — left for a follow-up once the approach is agreed.

bradojev added 5 commits June 25, 2026 11:05
Proof-of-concept for the hybrid Grafana integration: tabular/stat/time-series
views native in Grafana (querying the dragonlab OpenSearch index directly),
while the geographic map stays the custom /microdep/ app (linked from a panel).
Complements the existing grafana_dashboard_patch button; does not replace it.

- etc/grafana/microdep-datasource.yaml: opensearch datasource for the dragonlab
  index (uid microdep-dragonlab, timeField @timestamp - the only date-typed
  field; timestamp is epoch-float, datetime is text).
- etc/grafana/microdep-dashboards.yaml: file provider loading a Microdep folder.
- etc/grafana/dashboards/microdep-gaps.json: total gaps (stat), gaps over time,
  top-10 source hosts by gap count, and a button to the map.
- etc/grafana/README.md: provisioning steps, gotchas, extension notes.

Verified live on a test host: datasource + dashboard provision cleanly and a
query through Grafana's datasource proxy returns the expected top-host table.
Add a "Microdep - Map" dashboard that embeds the existing /microdep/ map
full-size as an <iframe> in a Text panel, so the geographic view lives in
Grafana alongside the native "Gaps overview" - without reimplementing the map.

Works because grafana.ini has [panels] disable_sanitize_html = true and the map
sends no blocking X-Frame-Options / CSP (it is same-origin with Grafana).

Verified live: the dashboard provisions into the Microdep folder and the panel
renders the iframe to /microdep/.
The iframe used height:88vh inside a 28-row panel, so it overflowed the panel
box and the bottom - including the map's own controls (date/period, dark-light
toggle) - was clipped. Switch to position:absolute; inset:0 so the iframe fills
the panel content box exactly (no vh mismatch, no clipping), and make the panel
taller (h 28 -> 32).
New native panels (querying OpenSearch directly), grouped in a
"Microdep — Details" dashboard:
- Jitter percentiles (h_jit p50/p95/p99) over time, from dragonlab_jitter.
- Top link pairs (from->to) by time lost (sum of tloss, ms).
- Source x target gap matrix via the esnet-matrix-panel plugin (count per pair).
- Gap and jitter data-freshness stats (max @timestamp, shown as "N ago").

Adds a second datasource (microdep-jitter -> dragonlab_jitter) because the
OpenSearch datasource binds one index per datasource. Field names confirmed
against the archive (tloss = "Time lost"; h_jit float; @timestamp date); the
freshness stat needs a date_histogram bucket (a metric-only query is rejected).
Verified live via Grafana's datasource proxy.
The esnet-matrix-panel uses a fixed cell size and doesn't auto-fit, so with a
small mesh it looked cramped and hostname labels were truncated. Bump cellSize
26->46, txtLength 16->18, txtSize 11->12, and give it a taller, squarer panel
(w12 h12 -> w10 h16) with the table widened to w14. These are still tunable
live in the panel editor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant