Monitoring Engine Status - Turn off Notifications

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Monitoring Engine Status - Turn off Notifications

Post by brdr »

Hi Nagios Support,

Presently, there is capability to turn off notifications via GUI using the Monitoring Engine Status. Very nice feature... However, after disabling through front-end and, if someone makes a configuration change and hits 'Apply Configuration' the notification process gets turned back on.

The only way I know to permanently disable notifications, that is not affected by config changes is to edit the /usr/local/nagios/etc/nagios.cfg entry:

enable_notifications=1 <--- make this 0

Then bounce the nagios service by doing: service nagios restart

We would like to give our Operations Team the ability to temporarily shut off notifications (via the GUI) even if admins are making config changes. Is there a way to do this?

Thank you!
brdr
Last edited by dwhitfield on Tue Feb 21, 2017 11:50 am, edited 1 time in total.
Reason: marking with green check mark
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitoring Engine Status - Turn off Notifications

Post by rkennedy »

I just tested, and this persisted through an apply configuration without issue. When you navigate back to the monitoring engine status page AFTER applying configuration, does the box appear to be green under value for Notifications?

Also seems to still be turned off in status.dat -

Code: Select all

programstatus {
        modified_host_attributes=1
        modified_service_attributes=1
        nagios_pid=5549
        daemon_mode=1
        program_start=1487347959
        last_log_rotation=0
        enable_notifications=0

Former Nagios Employee
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Re: Monitoring Engine Status - Turn off Notifications

Post by brdr »

Hello, I get the same result - does not persist after an apply configuration.

In Monitoring Engine Process table...

I click Action (X) for Notifications and wait until the value turns RED and Action then becomes a green check. I then go do a simple config update, then hit apply configuration, and Notifications value turns back to green and Action goes back to X.

NOTE: in my status.dat after disabling notifications via the Monitoring Engine Process it still show enable_notifications=1 . which tells me the disabling of notifications is turning it to 0.

programstatus {
modified_host_attributes=0
modified_service_attributes=0
nagios_pid=1421
daemon_mode=1
program_start=1487346136
last_log_rotation=0
enable_notifications=1
active_service_checks_enabled=1
passive_service_checks_enabled=0
active_host_checks_enabled=1
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Monitoring Engine Status - Turn off Notifications

Post by mcapra »

Are you using something other than the stock Nagios XI notification handler? That's all the setting on the "Monitoring Engine Status" page enables/disables. It won't address any sort of custom notification handlers.
Former Nagios employee
https://www.mcapra.com/
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Re: Monitoring Engine Status - Turn off Notifications

Post by brdr »

We are not using custom notification handler. We are using 'xi_host_notification_handler' command.

Still, when I initially disable notifications via Monitoring Engine Process table the flag enable_notifications is set from 1 to 0. Which is what we want, but then after Apply Configuration it goes from 0 to 1.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Monitoring Engine Status - Turn off Notifications

Post by mcapra »

Can you share the full contents of your /usr/local/nagios/etc/nagios.cfg file? There may be a setting that's preventing retention.dat from being leveraged and resetting the monitoring engine' settings to default each time.
Former Nagios employee
https://www.mcapra.com/
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Re: Monitoring Engine Status - Turn off Notifications

Post by brdr »

attach is nagios.cfg.

Note: this is occurring in our PreProd environment as well.

Thank you
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Monitoring Engine Status - Turn off Notifications

Post by mcapra »

Your configuration isn't retaining the program state:

Code: Select all

use_retained_program_state=0
Try switching that to 1 and see if it resolves the issue.
Former Nagios employee
https://www.mcapra.com/
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Re: Monitoring Engine Status - Turn off Notifications

Post by brdr »

Yes, that fixed my issue. Thank you! :D

plz close

brdr
Locked