--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/e34b891c-a5ea-43c8-b567-83588354f831n%40googlegroups.com.
Thanks for your reply Julius Volz.Yes, we are monitoring servers with Node Exporter. We are looking for Uptime average based on calendar Month instead of last 30 days.For example, February Month it should give the uptime average for 28days i.e., 1st Feb to 28th feb
On Saturday, February 18, 2023 at 2:11:33 AM UTC+5:30 Julius Volz wrote:
Assuming you are monitoring your servers via something like the Node Exporter, and you want the trailing 30-day upness percentage, you could use the Node Exporters "up" metric like this:
avg_over_time(up{job="node"}[30d]) * 100
You would need to adjust the query to be
avg_over_time(up{job="node"}[28d]) * 100
-- Stuart Clark