I have alerts based on a metric which in my case, sometimes, may disappear. Let's say the metric as up(env=prod) and up(env=staging). I have an alert based on the value of this metric. Now, I want to trigger another alert if up(env='staging') is not present. I can sum the metric by env and look at the value but it does not tell me which env is missing.
You can do this with absent(up{env="staging"})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With