Skip to content

fix(k8s): the kubernetes, node and ingress dashboards query only series something serves, checked against captured exporter families and the chart allow lists #1136

Closed

Description

@dan-petty

Problem

Several shipped dashboards query series that nothing serves, so their panels are permanently empty. Re-checked at origin/release/v0.2.25 against live Prometheus on 2026-10-03.

  1. Traefik v2 names. ingress-tunnel.json queries sum(traefik_entrypoint_open_connections{...}) and sum by (service)(traefik_service_open_connections{...}). The live Traefik is v3.7.13, whose only open-connections series is traefik_open_connections{entrypoint, protocol}: 4 series, with no service label. Every other traefik_* name the dashboard uses is served.
  2. The kube-state-metrics v1 HPA name. k8s-views-global.json:548 and k8s-views-namespaces.json:401 use sum(kube_hpa_labels{...}). KSM v2.20.0 serves only kube_horizontalpodautoscaler_*. fix(k8s): k8s-monitoring collectors run in the chart's preset shapes, and node-exporter keeps the series the node dashboards read #1129 removes the matching allow-list entry. The cluster has no HPA today, so the corrected panel stays empty until one exists, which is correct.
  3. Kubelet volume stats on local-path. k8s-views-namespaces.json and k8s-views-nodes.json query kubelet_volume_stats_{used,capacity}_bytes and the inode variants. There are 0 such series. All 8 PVCs use local-path or fast-nvme, both provisioned by rancher.io/local-path, which reports no volume stats. prometheus-values.yaml:232 and :256 already say so, and LogOrMetricVolumeDiskLow reads node_filesystem_* on the node holding the claim instead.
  4. A gauge read as a counter. k8s-views-nodes.json:3768 applies rate() to node_disk_io_now, which is a gauge (I/Os in progress). fix(k8s): k8s-monitoring collectors run in the chart's preset shapes, and node-exporter keeps the series the node dashboards read #1129 brings the series back.
  5. A lazily created failure counter. otel-collector.json's rate(otelcol_exporter_send_failed_spans{...}) has no series until the first failure. The existing gate (tests/test_stack_dashboards.py) accepts it through the fixture's from_source entry and rejects an or vector(0) fallback as a false zero (test_a_constant_fallback_fails_however_it_is_spelled). So the panel shows "No data" where "none recorded" is meant.

tests/test_stack_dashboards.py already checks llm-stack.json, otel-collector.json and prometheus-server.json against captured metric families (tests/fixtures/metrics/: names, types and label names only). The Kubernetes views, the node dashboard and ingress-tunnel.json are not covered. Neither is the allow-list filter that decides whether a captured family reaches Prometheus. That gap is how #923's allow-list regression (#1129) went unnoticed.

Acceptance criteria

  • ingress-tunnel.json:
    • the entrypoint open-connections panel is sum by (entrypoint) (traefik_open_connections{entrypoint=~"$entrypoint"});
    • the per-service open-connections panel becomes sum by (service) (rate(traefik_service_requests_total{...}[$__rate_interval])), titled as request rate.
  • Both k8s-views dashboards query kube_horizontalpodautoscaler_labels.
  • The kubelet_volume_stats_* panels are removed from k8s-views-namespaces.json and k8s-views-nodes.json. Each dashboard's description says why: local-path reports no volume stats; see the node filesystem panels and LogOrMetricVolumeDiskLow.
  • node_disk_io_now is read without rate().
  • The otel-collector.json failed-spans panel sets the panel option noValue: "none recorded". Its query is unchanged.
  • Captures are added for traefik, kube-state-metrics, node-exporter, kubelet and cAdvisor, in the existing fixture format: names, types and label names, never label values, plus the image or version they came from.
  • tests/test_stack_dashboards.py's dashboard-to-exporter map covers ingress-tunnel.json (traefik) and the three k8s-views-*.json (kube-state-metrics, node-exporter, kubelet, cAdvisor).
  • For the families behind k8s-monitoring, a family counts as served only if it also passes the effective allow list: the chart default plus includeMetrics, read from fix(k8s): k8s-monitoring collectors run in the chart's preset shapes, and node-exporter keeps the series the node dashboards read #1129's fixture and a KSM/kubelet/cAdvisor counterpart copied from the same chart version.
  • Verified by mutations in review, each of which must make the test fail:
    • re-adding kube_hpa_labels to a dashboard;
    • setting useIntegrationAllowList: false.
  • The README dashboard table notes that the Kubernetes views are checked against captures.
  • No test reaches the network. Each new test's call phase is under 1 s, and uv run devops ci stays within budget.
  • Pending a person, after Grafana reloads the dashboards: every panel on Ingress & Tunnel, K8s Views Global, K8s Views Namespaces and K8s Views Nodes shows data or an explained empty state. The HPA panel is empty while no HPA exists.

Key questions

Strategic alignment

Update 2026-10-08: refinement

The five problems remain. k8s-monitoring 4.5.2's default list has no kube_horizontalpodautoscaler_labels, so add it to includeMetrics or query one of the four HPA names. After #1129, node-exporter is unfiltered; copy the other default lists in #1131's format. The mutation becomes removing an includeMetrics entry a dashboard reads.

Activity

  1. added
    scope/k8s
    scope/telemetry
    priority/p3-low
    on Oct 3, 2026
  2. dan-petty commented on Oct 18, 2026

    @dan-petty
    OwnerAuthor

    Update 2026-10-18 from a read-only cluster audit (main 3dd7fa6). Two more gaps fit this item, because it already edits k8s-views-nodes.json and extends the dashboard-to-exporter map. Problems 1 and 2 above still reproduce live.

    6. The node dashboard's per-pod CPU and memory panels select image="", which the chart drops.

    • k8s-views-nodes.json:1241,1252,1263 ("CPU usage by Pod", title at :1269) and :1360,1371,1382 ("Memory usage by Pod", :1388) select image="".
    • Live, count(container_cpu_usage_seconds_total) = 61 = count(container_cpu_usage_seconds_total{image!=""}). Series with image="" existed until about 2026-10-02/03 (daily distinct series 171, 92, 93, then 0). Since then the k8s-monitoring Alloy cAdvisor pipeline has dropped them: ConfigMap monitoring/k8s-monitoring-alloy-metrics has the rule "Drop empty image labels" (empty container field gives 2x sum in container_cpu_usage_seconds_total google/cadvisor#2688), covering container_cpu_.*, container_memory_.*, container_network_.* and others. Both panels have read "No data" for about 15 days.
    • Proposed criterion: replace image="" with container!="" and keep the sum by (pod) aggregation over the container series. Do not set the chart's dropEmptyImageLabels: false, which would bring back the duplicate cgroup-level series.
    • The planned capture check records label names only, so it would not catch this. Add a value-aware rule that rejects an empty-value matcher on image or container for container_* families, or record the chart's empty-label drop rules with the cAdvisor capture. Mutation: re-adding image="" must fail the test.

    7. One provisioned dashboard is checked by no capture, and the README overstates coverage.

    • nvidia-dcgm.json is provisioned (k8s/monitoring/dashboards/kustomization.yaml:46; the live ConfigMap grafana-stack-dashboards holds 7 dashboards), but DASHBOARD_EXPORTERS (tests/test_stack_dashboards.py:139-143) maps only llm-stack, otel-collector and prometheus-server. Its 6 DCGM names do appear in tests/fixtures/metrics/dcgm-exporter.yaml, so mapping it as ("dcgm-exporter",) costs one line.
    • k8s/README.md:179 leaves nvidia-dcgm.json out of the grafana-stack-dashboards row. k8s/README.md:200 says the test "checks every query against captures", which is true for 3 of 7. Reword it to name the dashboards checked once this item has extended the map.

    The goroutine profile-type typo in pyroscope.json goes to #1134, and the sre-service Loki pod selector is #1357.

  3. dan-petty commented on Oct 23, 2026

    @dan-petty
    OwnerAuthor

    Delivered by #1786: the dashboards query only served series, and tests/test_stack_dashboards.py checks them against captured exporter families and the chart allow lists. #1958 fixed the rest of the empty panels.

  4. added
    type/bug
    and removed on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p3-lowscope/k8sscope/telemetrytype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions