#Disabling alerts during selected hours

1 messages · Page 1 of 1 (latest)

grand fractal
#

Hi, is there any way to disable selected alerts during selected hours? I would like to turn off the "load" and "cpu" alerts between 01:00 and 03:00. Is editing the "alarm-notify.sh" file the only way to achieve this functionality?

late pasture
#

As alarm-notify.sh is executed by the Netdata, I am pretty sure that you can disable alerts there if you want. For example by checking if the time is within your range and then just doing exit 0

wispy ice
#

I think would be a useful feature to add to netdata cloud to be able to schedule calls to this in a nice easy way in NC.

grand fractal
#

@wispy ice , thank you for your response. I didn't specify how I use Netdata. I don't use Netdata Cloud, only the children and parent. Alerts are sent directly from the children.

Perhaps my goal could be achieved through variables available in load.conf and cpu.conf configuration files. I noticed that there are variables such as "active_processors" or "load_cpu_number" in there. If I had a "current_hour" variable, it would solve my problem.

Is there any documentation available for these variables? Is there a list of variables that are available in these configurations?
Perhaps I can add my own variable that will be accessible from these configurations?

wispy ice
#

I imagine you could do it via a custom notify.sh if you wanted for sure and then would avoid needing any api stuff

#

Another idea could be to adapt the alert itself based on the timestamp itself. This has come up a few times so let me see if I can dog in to find any examples tommorow as I think could be useful for many users if was easy way to just build in timestamp into alert config