feat: add MC AKS node health metrics to gather-observability - #6676
feat: add MC AKS node health metrics to gather-observability#6676Gerd Oberlechner (geoberle) wants to merge 1 commit into
Conversation
1460cb0 to
0b3e24f
Compare
There was a problem hiding this comment.
Pull request overview
Adds an “MC AKS Metrics” observability panel for management-cluster node health and resource usage.
Changes:
- Adds node phase and unhealthy-condition charts.
- Adds CPU, memory, disk, and pod-capacity charts.
- Applies management-cluster filtering and replica deduplication.
Suppressed comments (5)
test/cmd/aro-hcp-tests/gather-observability/queries.yaml:344
- As with the CPU query,
instanceis a node-exporter scrape address rather than the Kubernetes node name, so this selector does not remove system/infra nodes. The resulting maximum memory value can therefore be driven by an excluded pool and does not satisfy the chart's user-node scope. Map the series throughkubelet_node_nameor otherwise apply the pool filter using the actual node label before taking the max.
and on (node, cluster)
test/cmd/aro-hcp-tests/gather-observability/queries.yaml:357
- This
instancefilter has the same identity mismatch: node-exporter exposes the scrape endpoint ininstance, not the AKS node name. System/infra root filesystems therefore remain in the max, so a full system disk can falsely report user-node disk pressure. Apply the pool exclusion after mapping the node-exporter series to the Kubernetes node (for example viakubelet_node_name).
),
test/cmd/aro-hcp-tests/gather-observability/queries.yaml:254
- Because this PR adds a metrics visualization, the PR description must include the required before/after screenshots (with annotations if needed) and a linked Jira/GitHub tracking issue or an explanation for why no issue exists, per the Pull Request Standards. Please update the description before approval.
)
test/cmd/aro-hcp-tests/gather-observability/queries.yaml:254
- This PR changes metrics visualizations by adding six charts. CONTRIBUTING.md requires before/after screenshots for graph, dashboard, and metrics-visualization changes; the current PR description does not include them. Please attach the required screenshots (and annotate any subtle changes) before approval.
)
test/cmd/aro-hcp-tests/gather-observability/queries.yaml:254
- The PR description does not reference a Jira/GitHub tracking issue. CONTRIBUTING.md requires every PR to include a ticket link or explain why no ticket exists; please add that reference or explanation before approval.
)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Suppressed comments (5)
test/cmd/aro-hcp-tests/gather-observability/queries.yaml:437
kubelet_running_podsis keyed by the kubelet scrape targetinstance, whilekube_node_status_capacityis keyed by Kubernetesnode. Relabeling the capacity node intoinstancedoes not join these series (the repository's existing KubeletTooManyPods rule useskubelet_node_namefor this mapping), so this query will normally return no pod-capacity data. Join running pods tokubelet_node_nameon(cluster, instance), then divide by capacity on(cluster, node)and apply the user-node filter there.
label_replace(
kube_node_status_capacity{cluster=~".*-mgmt-.*", node!~"aks-system-.*|aks-infra.*-.*", resource="pods"},
"instance", "$1", "node", "(.*)"
test/cmd/aro-hcp-tests/gather-observability/queries.yaml:323
- The test plan is entirely unchecked, so the PR provides no evidence that the required parser test or the chart/data smoke checks passed. Please run the listed validation and update the checklist, or document any unrelated/flaky failure, before requesting approval.
- title: "MC AKS Metrics"
test/cmd/aro-hcp-tests/gather-observability/queries.yaml:395
- Filtering by
instancedoes not select Kubernetes node names in this Prometheus setup. The existing node-exporter rules map each target tonodevia(cluster, namespace, pod), and repository fixtures show endpoint-style instances such as10.0.0.4:9100; consequently this matcher does not exclude system/infra nodes and the cluster maximum can report a non-user node. Join to the node label before filtering and aggregating (or use an equivalent recording rule).
rate(node_cpu_seconds_total{cluster=~".*-mgmt-.*", instance!~"aks-system-.*|aks-infra.*-.*", mode="idle"}[5m])
test/cmd/aro-hcp-tests/gather-observability/queries.yaml:409
- These memory operands apply the pool exclusion to
instance, but node-exporterinstanceis the scrape target identity rather than the Kubernetes node label in this deployment. System/infra nodes can therefore contribute to the maximum despite the chart claiming to show user nodes. Map the node-exporter target tonodefirst, then filter/aggregate by that label.
max by (instance, cluster) (node_memory_MemAvailable_bytes{cluster=~".*-mgmt-.*", instance!~"aks-system-.*|aks-infra.*-.*"})
/
max by (instance, cluster) (node_memory_MemTotal_bytes{cluster=~".*-mgmt-.*", instance!~"aks-system-.*|aks-infra.*-.*"})
test/cmd/aro-hcp-tests/gather-observability/queries.yaml:422
- The root-filesystem operands have the same incorrect pool filter on scrape-target
instanceinstead of Kubernetesnode. This can include system/infra filesystems in the cluster maximum and make the user-node disk chart inaccurate. Attach the node label before filtering and aggregate by node.
max by (instance, cluster) (node_filesystem_avail_bytes{cluster=~".*-mgmt-.*", instance!~"aks-system-.*|aks-infra.*-.*", mountpoint="/", fstype!="tmpfs"})
/
max by (instance, cluster) (node_filesystem_size_bytes{cluster=~".*-mgmt-.*", instance!~"aks-system-.*|aks-infra.*-.*", mountpoint="/", fstype!="tmpfs"})
|
/lgtm |
Add a new "MC AKS Metrics" panel to the gather-observability Spyglass artifacts with six charts for management cluster node health visibility: - Node count by phase (Ready/NotReady/Joining) — faceted per MC - Unhealthy node conditions — faceted per MC, only non-zero conditions - CPU, memory, disk usage — max across user nodes per MC - Pod capacity utilization — max across user nodes per MC All queries filter to management clusters (cluster=~".*-mgmt-.*") and exclude system/infra pool nodes. Queries handle HA replica dedup and dual kube-state-metrics instance dedup to avoid double-counting.
0b3e24f to
5dfc8bf
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bennerv, geoberle, raelga The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Gerd Oberlechner (@geoberle): The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
Jira: https://issues.redhat.com/browse/ARO-29285
cluster=~".*-mgmt-.*") and exclude system/infra pool nodesTest plan
go test ./test/cmd/aro-hcp-tests/gather-observability/...passes (validates queries.yaml parsing)