Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Why Your Grafana Dashboard Shows No Data (When Prometheus Is Fine)

Описание и применение

Панели Grafana показывали «No data», хотя Prometheus работал. Проблема была в самореферентных переменных, которые не возвращали значения. Исправление переменных и сохранение текущих значений позволило панели отображать данные.

Задача

Grafana dashboards display “No data” even though Prometheus has healthy metrics.

Результат

The dashboard now renders correctly on all hosts; empty panels are intentional and documented.

Рабочий процесс

  • 1. Verify target scraping via Prometheus API
  • 2. Check metric existence directly with Prometheus query
  • 3. Test panel expression manually
  • 4. Identify variable layer causing empty results
  • 5. Remove self-referencing variable and set explicit defaults
  • 6. Save current values for variables
  • 7. Verify Grafana’s saved variable values via API
  • 8. Resolve $__all sentinel to allValue before expanding

Доказательства

All three were green: 7 targets up, 25k series ingested, and the panel's raw expression returned data when I ran it by hand.

Источник

The dashboard had a host picker. Two variables chained: $nodename and $node. The definition of the first one was: # BROKEN — the variable filters on its own value label_values(node_uname_info{job="unraid-host", nodename=~"$nodename"}, nodename)

Источник

The fix is to stop the self-reference and give each variable an explicit saved default: # FIXED — no self-reference, one hop per variable # $nodename label_values(node_uname_info{job="unraid-host"}, nodename) # $node label_values(node_uname_info{job="unraid-host", nodename="$nodename"}, instance)

Источник

  • Дата записи: 2026-11-01T07:59:19.560Z