Hi,
- What Grafana version and what operating system are you using?
Grafana v11.3.0 on K8s
- What are you trying to achieve?
I am looking to aggregate in a table a certain number of metrics from Prometheus on the nodes of a Kubernetes cluster.
Host ip | Hostname | Kube Version | node name | %CPU | %RAM & status
- How are you trying to achieve it?
Query A : label_replace(node_uname_info{}, “host”, “$1”, “instance”, “(.):9100")
Query B: label_replace(kube_node_info{}, “host”, “$1”, “internal_ip”, "(.)”)
Query C: label_replace(100 - (avg (rate(node_cpu_seconds_total{mode=“idle”}[1m]) ) by (instance) * 100), “host”, “$1”, “instance”, “(.):(.)”)
Query D: label_replace(100 * (1 - ( node_memory_MemAvailable_bytes{} / node_memory_MemTotal_bytes{}) ), “host”, “$1”, “instance”, “(.):(.)”)
Query E : label_replace(100 - sum by (instance) (node_filesystem_free_bytes{}) / sum by (instance) (node_filesystem_size_bytes{}) * 100, “host”, “$1”, “instance”, “(.*):9100”)
With transformation ‘merge’ it aggregates well all row with host and with rename by Field i get : Host ip | Hostname | Kube Version | node name | %CPU | %RAM
- What happened?
But now I want to add Status from query : kube_node_status_condition{status=“true”} == 1 but even with an inner join on node (available in 2 queries) i don’t manage to add this metric
It seems it can be applied only one merge/join
-
What did you expect to happen?
-
Can you copy/paste the configuration(s) that you are having problems with?
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
-
Did you follow any online instructions? If so, what is the URL?