[PR #7028] [misc] fix broken queries in the management Grafana dashboard #27846

Open
opened 2026-08-05 07:09:19 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/7028
Author: @tugay-radity
Created: 8/2/2026
Status: 🔄 Open

Base: mainHead: fix/management-dashboard-broken-panels


📝 Commits (1)

  • 6dc5f7e [misc] fix broken queries in the management Grafana dashboard

📊 Changes

1 file changed (+15 additions, -15 deletions)

View changed files

📝 infrastructure_files/observability/grafana/dashboards/management.json (+15 -15)

📄 Description

Describe your changes

Four panels of the management Grafana dashboard return no data. Two separate faults cause it.
signal.json and relay.json are not affected.

$interval is undefined

templating.list declares datasource, cluster, environment, job and host. It declares no
interval, and $interval is not a Grafana built-in, so Prometheus receives the literal token:

Bad Request: 1:137: parse error: unexpected character in duration expression: '$'

That breaks Update Channel operations and Update Channel methods p95 Duration. Percentage of Recreated channels then fails as a dependent expression with [sse.dependencyError].

The other 37 range selectors in the same file already use $__rate_interval, as do both sibling
dashboards. The three panels now match.

management_http_request_duration_ms_bucket is never published

The histogram declares an explicit unit, and the Prometheus exporter appends it. The published name
is management_http_request_duration_ms_milliseconds_bucket.

Registration Metric and unit Dashboard spelling
http_api_metrics.go#L23-L122 management.http.request.duration.ms, milliseconds suffix missing — corrected here
http_api_metrics.go#L127-L130 …duration.ms.total, milliseconds …_ms_total_milliseconds_bucket
accountmanager_metrics.go#L36-L37 management.account.get.peer.network.map.duration.ms, milliseconds …_ms_milliseconds_bucket

Two panels of the same dashboard already carry the suffix, which makes the third a typo. That
breaks p90 latency by endpoint. The series exist, so only the per-endpoint split of p90 is lost.

Not required. The change corrects two queries in a dashboard JSON file and alters no product
behavior.

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • I ran and tested this change locally — I did not rely on CI to find out whether it works
  • This PR has a single purpose (not a fix + refactor + feature in one)
  • This change is a trivial fix, OR it links an issue the NetBird team agreed on beforehand.

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

dashboards/readme.md already describes the variables and the exported_endpoint expectation. The
change corrects queries only. It adds no variable and no new expectation.

Docs PR URL (required if "docs added" is checked)

n/a

Summary by CodeRabbit

  • Bug Fixes
    • Improved Grafana dashboard query intervals for more reliable HTTP latency and update-channel metrics.
    • Corrected the HTTP latency metric reference to ensure dashboard panels display accurate data.
    • Improved percentile and recreated-channel percentage visualizations for more consistent monitoring results.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/7028 **Author:** [@tugay-radity](https://github.com/tugay-radity) **Created:** 8/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/management-dashboard-broken-panels` --- ### 📝 Commits (1) - [`6dc5f7e`](https://github.com/netbirdio/netbird/commit/6dc5f7ef6ca018c7b4a19c69278c61dcd2976f8b) [misc] fix broken queries in the management Grafana dashboard ### 📊 Changes **1 file changed** (+15 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `infrastructure_files/observability/grafana/dashboards/management.json` (+15 -15) </details> ### 📄 Description ## Describe your changes Four panels of the management Grafana dashboard return no data. Two separate faults cause it. `signal.json` and `relay.json` are not affected. ### `$interval` is undefined `templating.list` declares `datasource`, `cluster`, `environment`, `job` and `host`. It declares no `interval`, and `$interval` is not a Grafana built-in, so Prometheus receives the literal token: ``` Bad Request: 1:137: parse error: unexpected character in duration expression: '$' ``` That breaks `Update Channel operations` and `Update Channel methods p95 Duration`. `Percentage of Recreated channels` then fails as a dependent expression with `[sse.dependencyError]`. The other 37 range selectors in the same file already use `$__rate_interval`, as do both sibling dashboards. The three panels now match. ### `management_http_request_duration_ms_bucket` is never published The histogram declares an explicit unit, and the Prometheus exporter appends it. The published name is `management_http_request_duration_ms_milliseconds_bucket`. | Registration | Metric and unit | Dashboard spelling | | --- | --- | --- | | [`http_api_metrics.go#L23-L122`](https://github.com/netbirdio/netbird/blob/f2318a8fef230219110c9eeb58ca7f60e247ad98/management/server/telemetry/http_api_metrics.go#L23-L122) | `management.http.request.duration.ms`, `milliseconds` | suffix missing — corrected here | | [`http_api_metrics.go#L127-L130`](https://github.com/netbirdio/netbird/blob/f2318a8fef230219110c9eeb58ca7f60e247ad98/management/server/telemetry/http_api_metrics.go#L127-L130) | `…duration.ms.total`, `milliseconds` | `…_ms_total_milliseconds_bucket` | | [`accountmanager_metrics.go#L36-L37`](https://github.com/netbirdio/netbird/blob/f2318a8fef230219110c9eeb58ca7f60e247ad98/management/server/telemetry/accountmanager_metrics.go#L36-L37) | `management.account.get.peer.network.map.duration.ms`, `milliseconds` | `…_ms_milliseconds_bucket` | Two panels of the same dashboard already carry the suffix, which makes the third a typo. That breaks `p90 latency by endpoint`. The series exist, so only the per-endpoint split of p90 is lost. ## Issue ticket number and link Not required. The change corrects two queries in a dashboard JSON file and alters no product behavior. ## Stack <!-- branch-stack --> ### Checklist - [x] Is it a bug fix - [x] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [x] I ran and tested this change locally — I did not rely on CI to find out whether it works - [x] This PR has a single purpose (not a fix + refactor + feature in one) - [x] This change is a trivial fix, **OR** it links an issue the NetBird team agreed on beforehand. > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) `dashboards/readme.md` already describes the variables and the `exported_endpoint` expectation. The change corrects queries only. It adds no variable and no new expectation. ### Docs PR URL (required if "docs added" is checked) n/a <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved Grafana dashboard query intervals for more reliable HTTP latency and update-channel metrics. * Corrected the HTTP latency metric reference to ensure dashboard panels display accurate data. * Improved percentile and recreated-channel percentage visualizations for more consistent monitoring results. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 07:09:19 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#27846