On 25/07/2022 07:30, BHARATH KUMAR wrote:
I am talking about grafana dashboard. I created a custom variable as follows:

CPU:
All : <=100,
lt 10 && gt 0 : >0<=10,
lt 30 && gt 10 : >10<=30

So this CPU filter will be added at the top of grafana dashboard. Now If I select ALL in CPU filter I am not able to find the unreachable servers list in the grafana dashboard as those servers are not present in prometheus Data Source(since these are in unreachable state).

My query:
((1 - avg(irate(node_cpu_seconds_total{mode="idle",instance=~"$ip"}[5m])) by (instance)) * 100) $CPU

Here we are comparing the value in $cpu

Is there any other way to compare the values that are not present in prometheus data source so that when I click ALL option I can able to see all servers data.

If you are not scraping something (because the scrape is failing) then no data exists about that server.

For the drop down selector in Grafana you could use the "up" metric, which will still have values for servers that weren't able to be scraped, but selecting one of those would then result in an empty dashboard as there wouldn't be any CPU values.

--
Stuart Clark

--
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/b9017c3d-2464-084d-419f-394d0e3d5e5f%40Jahingo.com.

Reply via email to