#Disabling alerts during selected hours
1 messages · Page 1 of 1 (latest)
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
There is the health management api
https://learn.netdata.cloud/docs/agent/web/api/health#health-management-api
But still up to you as user then to schedule it.
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.
Oh this actually also came up last week and I made a feature request.
https://github.com/netdata/netdata-cloud/issues/729
Maybe feel free to upvote of think could be useful
Problem It would be nice if i could set up cron jobs in Netdata Cloud to orchestrate my use of the health management api in a nice and painless way. https://learn.netdata.cloud/docs/agent/health/re...
@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?
I think you could just hit the health management api on the agents direct and turn off the specific alarms and then just turn them back on again.
https://learn.netdata.cloud/docs/agent/web/api/health#disable-or-silence-specific-alarms
So like a cronjob to disable them and then another cronjob to re-enable them.
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