Alarm during working hours

Is it possible to activate the evaluation of the alarm only in the days and working hours?



we had the same request from our managers…

What I did was to setup two more alarm queries (we use MSSQL as data source), besides the one that triggers the alarm.

  1. get the current hour of the day (from 0 to 23)
  2. another one to get the current day of the week (1 to 7)
  3. condition that triggers the alarm.

set the 3 conditions with AND operator and that way only send alerts from hour 9 to 17, and from day 2 to 6.

You can check in the Internet for the many ways of getting the current hour and day of the week.

hope that helps.

1 Like

I think this would be a good feature to have, it makes Grafana much more appealing as a replacement for other monitoring systems like Nagios, Opsview, etc.

In our case, we worked around this by sending to email the alerts that we don’t want to be woken up for. In other words, if it needs to be handled right away then it goes to SMS but if it can wait for business hours then we send it to email.

There are other benefits to time slots for alerts though. For example, you might know that a certain process runs during a certain window of time and you don’t want to alert during that window, but during any other time you want more sensitive monitoring. Many backup processes run during “maintenance windows” and it would be nice to have either more tolerant checks or the ability to not check at all during that window.