Page 1 of 1
Suppress All alerts from Nagios
Posted: Fri Apr 05, 2019 11:57 am
by jsalsbury
Good morning or afternoon
I was recently approached by out patching team that most if not all of our servers are going to undergo maintenance. Is there a was to just turn off all Nagios alerting for a few hours?
Re: Suppress All alerts from Nagios
Posted: Fri Apr 05, 2019 1:25 pm
by benjaminsmith
Hi
@jasalsbury,
Yes. You can use the scheduled downtime feature in Nagios XI. Go to Home > Incident Management > Schedule Downtime and select all hosts and the schedule downtime for associated services option (see guide below).
Nagios XI Configuring Downtime
Alternatively, you can turn off notifications in the main configuration file.
See:
https://assets.nagios.com/downloads/nag ... gmain.html
Re: Suppress All alerts from Nagios
Posted: Fri Apr 05, 2019 1:29 pm
by npolovenko
Hello,
@jsalsbury. There are a few ways to do that. You can open:
/usr/local/nagios/etc/nagios.cfg
And change:
enable_notifications=1
to
enable_notifications=0
And then restart the nagios service to apply changes:
service nagios restart
Or can do it from the GUI by clicking on the X next to "Notifications":
Untitled.png
Re: Suppress All alerts from Nagios
Posted: Fri Apr 05, 2019 1:33 pm
by jsalsbury
Thank you, very helpful.
One last question, they won't build up and all send out once they are turned back on right?
Re: Suppress All alerts from Nagios
Posted: Fri Apr 05, 2019 1:36 pm
by npolovenko
@jsalsbury, Not if you turn them off before hosts go into a critical state and notifications go out to the mailing queue. In that case, you can run the following query to clear out the notification tables in the database(and that should stop notifications):
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | mysql -uroot -pnagiosxi nagiosxi
Re: Suppress All alerts from Nagios
Posted: Fri Apr 05, 2019 3:04 pm
by jsalsbury
I also found this, It looks as if i could turn off services alerts and still have the same outcome?
Re: Suppress All alerts from Nagios
Posted: Fri Apr 05, 2019 3:09 pm
by npolovenko
@jsalsbury, Yes, scheduled downtime would work as well. Especially if you don't have that many service and host checks. I'd not recommend scheduling downtime for 10 thousand hosts and services though. In that case two options I mentioned earlier would work better.
Re: Suppress All alerts from Nagios
Posted: Fri Apr 05, 2019 3:12 pm
by jsalsbury
Outstanding
thanks
Re: Suppress All alerts from Nagios
Posted: Fri Apr 05, 2019 3:27 pm
by npolovenko
@jsalsbury, I will be closing this thread as resolved but feel free to open a new one if you have any other questions.
Thanks!