Disable notifications after a restore
Posted: Mon Mar 08, 2021 9:33 am
Hi All,
We do a weekly back up from our primary and restore it on our Secondary using a script
To disable the notifications we edit the configs as below, it seems to be the only way to guarantee no emails are sent.
sed -i 's/ host_notifications_enabled 1/ host_notifications_enabled 0/g' /usr/local/nagios/etc/contacts.cfg
sed -i 's/ service_notifications_enabled 1/ service_notifications_enabled 0/g' /usr/local/nagios/etc/nagios.cfg
This works fine until the configuration is applied on the UI, as the above options are still all enabled in the UI.
We use the Secondary for testing so we need to apply the configuration.
Is there a way to disable the notifications and individual user notifications in the UI via command line, as we are using scripts to do the restores?
Thank you
We do a weekly back up from our primary and restore it on our Secondary using a script
To disable the notifications we edit the configs as below, it seems to be the only way to guarantee no emails are sent.
sed -i 's/ host_notifications_enabled 1/ host_notifications_enabled 0/g' /usr/local/nagios/etc/contacts.cfg
sed -i 's/ service_notifications_enabled 1/ service_notifications_enabled 0/g' /usr/local/nagios/etc/nagios.cfg
This works fine until the configuration is applied on the UI, as the above options are still all enabled in the UI.
We use the Secondary for testing so we need to apply the configuration.
Is there a way to disable the notifications and individual user notifications in the UI via command line, as we are using scripts to do the restores?
Thank you