Skip to content

feat(grafana): add Kubernetes kube-state-metrics 6417 curated pack - #389

Merged
shmsr merged 2 commits into
feat/grafana-315-kubernetes-cadvisorfrom
feat/grafana-6417-kubernetes-ksm
Sep 2, 2026
Merged

feat(grafana): add Kubernetes kube-state-metrics 6417 curated pack#389
shmsr merged 2 commits into
feat/grafana-315-kubernetes-cadvisorfrom
feat/grafana-6417-kubernetes-ksm

Conversation

@shmsr

@shmsr shmsr commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Curated pack for Grafana 6417 (kube-state-metrics + node_exporter): metric_map renames, resource-split query_overrides for allocatable/requests, deployment table grouped by labels.deployment, honest OutOfDisk gap.
  • plugin.py rewrites constant .* $node/$namespace to multi-select label_values() controls so first paint is Grafana All, not the first concrete namespace/node. Cluster usage/capacity tiles bind ?node via MV_CONTAINS.
  • Absolute CPU/Memory requested tiles reshape to kube_pod_container_resource_requests{resource=...}. Producer emits full KSM 0/1 phase series so Pending/Failed/Succeeded/Unknown render 0 instead of N/A.

Stacks on #388 (feat/grafana-315-kubernetes-cadvisor).

Test plan

  • pytest tests/test_curated_packs.py -k 6417
  • make lint
  • Migrate + upload 6417 against metrics-k8s.prometheus-default; confirm first paint Number of Nodes=all, request tiles populate, phase tiles are 0 not N/A, OutOfDisk stays empty

Fixes #393

@shmsr shmsr added program:curated-packs Curated Grafana community dashboard packs source:grafana Grafana source migration asset:dashboards Dashboard migration assets labels Sep 1, 2026
@shmsr

shmsr commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

Tracking: closes #393 under https://github.com/elastic/obs-integration-team/issues/1200. Please add Fixes #393 to the PR body.

@shmsr shmsr self-assigned this Sep 1, 2026
@shmsr
shmsr force-pushed the feat/grafana-6417-kubernetes-ksm branch 2 times, most recently from 084cacd to d782a5e Compare September 1, 2026 18:43
Curated pack for grafana.com dashboard 6417 ("Kubernetes Cluster
(Prometheus)"), a kube-state-metrics + node_exporter cluster-health
dashboard authored against an older KSM/node_exporter lineage. Stacked on
the cAdvisor 315 pack (shares the parity-rig k8s_exporter added there).

The pack modernizes the source metric surface:
- metric_map bridges renamed names (node_filesystem_size/_free ->
  *_bytes, kube_pod_container_status_restarts -> *_total)
- metric_kinds classify the KSM gauges and the restarts counter
- query_overrides reshape the resource-split KSM metrics
  (kube_node_status_allocatable{resource=cpu|memory|pods} filtered
  per-resource) so the cluster CPU/Memory/Pod usage tiles compute the
  correct allocatable denominator, and group the Deployment Replicas
  table by deployment

The removed OutOfDisk node condition is documented as an honest gap, and
the constant .* $node/$namespace variables become bound Kibana controls.

Live render audit against the parity-rig k8s_exporter: 29 rendered / 0
error. Fidelity manifest, design doc, docs/sources/grafana.md, and offline
fixture tests included; registry provenance pinned (rev 1) and verified.
Constant .* $node/$namespace hydrated to the first concrete option on
upload, and the absolute request tiles still named the old per-resource
metrics. Multi-select label_values controls plus resource-split overrides
restore Grafana's all-match first paint and populate CPU/memory requested.
@giorgi-imerlishvili-elastic
giorgi-imerlishvili-elastic force-pushed the feat/grafana-6417-kubernetes-ksm branch from d782a5e to a3b5c0c Compare September 1, 2026 22:44
@shmsr
shmsr merged commit 294a7df into main Sep 2, 2026
14 checks passed
An error occurred while trying to automatically change base from feat/grafana-315-kubernetes-cadvisor to main September 2, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asset:dashboards Dashboard migration assets program:curated-packs Curated Grafana community dashboard packs source:grafana Grafana source migration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pack] Grafana 6417 Kubernetes cluster (kube-state-metrics)

1 participant