for the same metric, i want to have multiple rules in alert manager, to have longer FOR: times for some special cases.
the way i do this now is:
alert1 # general
probe_succes{ somelabel !~"specialcase1|specialcase2"}
alert2 # special
probe_success{somelabel =~"specialcase1|specialcase2"}
.. which is obviously badly maintainable and ugly and won't scale..
but it looks a bit, well, hard to maintain..
so i got this idea, what would happen if i did this:
in prometheus rules :
alert1 # handles the special case
ie. probe_success{somelabel="XYZ"}
labels:
someswitch: true
alert 2 #handles the general case
probe_success{}
define an inhibit rule which mutes the general alert, if there is also an special case one, based on the someswitch label, would that work?