I found same bugs on lab “Lab - Operators, Vector Matching, Aggregators”.
All exercices that neet same metric from instance loadbalancer isn`t scraped to prometheus.
exercice 7: the best way to count all cpu from the istance is:
count(sum(node_cpu_seconds_total{}) by (cpu))
but the check show wrong for me.
Hi,
Please share the lab link, I’ll check it.
Hi,
The issue is that your query isn’t filtering by the specific instance (loadbalancer:9100
).
The correct query is:
count(node_cpu_seconds_total{instance="loadbalancer:9100", mode="idle"})
This ensures you count only the CPUs for the loadbalancer:9100
instance. Save it in /root/query7.txt
, and the check should work.
Sorry, I think that I don`t all details for you. We have multiple problems, follow below:
-
All exercices that neet same metric from instance loadbalancer isn`t scraped to prometheus.
-
the best way to count all cpu from the istance is:
count(sum(node_cpu_seconds_total{instance=“loadbalancer:9100”}) by (cpu))
I dont need specify label mode to count total number of cpus. But the main problem is that metrics from loadbalancer instance weren
t scraped to prometheus.
let me show you more details: