Trigger alarm when value is 0 since 6h without including night hours?

49 views Asked by At

I have many metrics that are tracking if we have activity on specific stream of data.

  • I trigger an alarm if we didn’t received a message since 6h, sometimes less.
  • Alarm are muted between 7pm and 8am + week-end

But the issue is sometimes first activity start after 8am, so I have some noise between 8am and 8:30am.

I would like to know how I could still have the 6h or less limit but, do not count the mute interval?

For example:

  • Last message the Monday at 4pm, mute timing at 7pm, alarm is for 6h without message.
  • No message the Thuesday, mute timing until 8am, alarm firing at 11am

If it too complicated at least start counting hours without message but only after 8am, so fire alarm after 8am + hour interval specified.

1

There are 1 answers

3
hagen1778 On

I'm a bit confused with examples - not clear if you want those alerts to fire or not fire. But for "start counting hours...after 8am" you can use functions like hour. For example, (up==1) and on() (hour() > 8 < 19) should return true only if both conditions are met.