I want to query Prometheus, as if my cluster metric exceeds some threshold then I want to check which of my hosts are exceeding a specific threshold, and eventually fire a script based on that for the host.
Asked
Active
Viewed 1,608 times
1 Answers
0
Let's say you have a label called cluster
, then you can do:
metric > 5 and on (cluster) avg by (cluster)(metric > 10)
If the metric averages over 10 for the cluster, it'll return each instance that is over 5.

brian-brazil
- 31,678
- 6
- 93
- 86