Hi,
On 2020-12-17 23:06, Alan Miller wrote:
The problem is that my "instance" fields are IP address:port (eg:
10.123.5.5:9182).
The best solution would be to fix exactly this. ;)
https://www.robustperception.io/controlling-the-instance-label
So this query returns the instances and what looks like % cpu utilization:
( 100 - (avg by (instance)
(irate(windows_cpu_time_total{mode="idle"}[5m])) * 100) > 95)
And this query gets me the hostnames I'm looking for:
windows_cs_hostname{hostname=~".*as.*"}
So how do I combine them so that I get the CPU utilization value for
ONLY hostnames
starting with "as" (here again, the instance fields are the same
ipaddress:port pairs.
Try something like:
( 100 - (avg by (instance)
> (irate(windows_cpu_time_total{mode="idle"}[5m])) * 100) > 95) and
on(instance) windows_cs_hostname{hostname=~".*as.*"}
Kind regards,
Christian
--
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/cca4e46f-4e41-be6d-f318-56f86d342b35%40hoffmann-christian.info.