Page 1 of 1

disable notification from CLI

Posted: Thu May 04, 2017 8:25 am
by zaji_nms
Dear Expert

Some time due to very high process, we unable to OFF the Email Notification from http/web. Please let us know how to disable Notification globally via CLI mode.

We want to OFF the Notification due to server (severe) issue from Linux root

Regards

Re: disable notification from CLI

Posted: Thu May 04, 2017 9:41 am
by dwhitfield
There are many ways to do this, but none through the Nagios API, if that is what you are asking about. You *could* change all of your hosts and services through the API, but it isn't global in the sense that you want.

Possibly the most straight forward and cleanest way to do this is just to close the ports mail is going out on (25, 587, whatever it is in your environment). Depending on your version of CentOS/RHEL either IPTables or firewalld would be the way to do this. You would need to flush your mail queue once things are back up though.

Another option would be to turn off nagios with service nagios stop. Checks aren't running then, so that would not be good if reporting is important, but it means you don't have to remember to flush the mail queue. If don't want notifications and you can't reach the web to see status there, this does seem like a reasonable approach. You might as well also bring down ndo2db during this time with service ndo2db stop, but you'll need to turn then both back on when you have everything cleared up.

Nothing about Core 5.0.0 has been officially decided, but there's a possibility that there will be more notifications options in the future: https://github.com/NagiosEnterprises/na ... /issues/52

Please let us know if you'd like any additional detail on the firewall or API.