On 20/07/2022 08:49, BHARATH KUMAR wrote:
Hello all,

I installed node exporters on many servers (around 300). Few of the servers are unreachable. So because of that, we are unable to get the CPU, and memory values of those servers.

Now I want to add a filter in the Grafana dashboard to check the least CPU used, most CPU used servers. But due to unreachability, we are not getting values for a few servers.

My question is
"*how to compare the output of the Prometheus query is NULL"*

Generally, I am comparing the output of the prom query like
I) if the CPU usage is less than 10% then I am comparing like
query >=0<=10%
ii) if the CPU usage is greater than 10% and less than 30% then I am comparing like
query >10<=30
*similarly how to check the null values using the Prometheus query.*

For servers which can't be scraped there will be no metrics, so any queries won't have any data to query.

However Prometheus itself creates certain metrics for all scrape targets, including one called "up" which is either 0 or 1 - where 0 means the scrape failed. You can therefore create dashboards and alerts that list the servers which aren't accessible (up == 0).

--
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/53716e29-ceb2-7304-b003-17eba5262684%40Jahingo.com.

Reply via email to