0

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.

1 Answers1

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