Disabling Notifications & Event Handlers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Disabling Notifications & Event Handlers

Post by Fred Kroeger »

I have a Test instance of Nagios that I refesh from a Prod Backup via the XI Restore script. This is all working correctly.
As I don't want any Notifications or events to be sent out, I have a script that edits the nagios.cfg file and updates the relevant entries.
These are the values in the cfg file when the script completes.

Code: Select all

enable_event_handlers=0
enable_notifications=0
I restart the nagios service ( service nagios restart ) to use the updated cfg file.
However, if I check the Nagios Monitoring Engine Status , it shows that both the Notifications & Event Handlers are Enabled (Green Dot). I actually have to manually click on each one to disable them.
Is there something else I need to update/change so that I can automate the Disable process?
Running NagiosXI 2012R2.8c

regards... Fred Kroeger
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Disabling Notifications & Event Handlers

Post by lmiltchev »

Fred, this *should* work at least it works for me. :) Are you sure you don't have any other issues on the system - multiple instances of nagios running, etc. I followed the same steps, and after restarting the nagios service, I can see that notifications and event handlers are disabled globally on my test box.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Disabling Notifications & Event Handlers

Post by Fred Kroeger »

I'll go through the DR process again & check what is running during the import , nagios.cfg edit & restart phases.

There is another function that I need to disable that is running on the Prod instance that I need to disable on the DR instance after the import.
However I can't find an entry in the nagios.cfg file for them?

I need to Disable Outbound Transfers (or Disable NRDP output & Disable NSCA Output)

regards.... Fred
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Disabling Notifications & Event Handlers

Post by Fred Kroeger »

Ok - went throught the import of the Prod instance to the DR Server. The config file is updated correctly, Nagios is restarted and there is only one Nagios process running.
The nagios.cfg definitely shows that enable_event_handlers & enable_notifications are set to 0 .
Other parameters that I edit - Enable Active Service Checks & Enable Active Host Checks are both set to 0 and display correctly on the Status screen.

I have attached the Monitoring Engine Status screen & it definitely shows that despite what is configured they are Enabled and email notifications are getting sent out.
The only way I can stop the notications & event handler is to click on the corresponding tick, whereupon they then go to disabled.
Note also that a restart of Nagios is not required for these to be disabled - which is why I was wondering if there is somwewhere else that these get enabled/disabled or there is a lookup to a database entry instead of the values in the cfg file?
monitor-engine-status.png
regards... Fred
You do not have the required permissions to view the files attached to this post.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Disabling Notifications & Event Handlers

Post by Fred Kroeger »

Another curious observation is that even though Active checks are disabled, the Scheduled events graph show that they are still being scheduled ?

Fred
monitor-engine-status-2.png
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Disabling Notifications & Event Handlers

Post by abrist »

They may continue to be scheduled, but should not actually run. I presume this is done to maintain the check separation and timing.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Disabling Notifications & Event Handlers

Post by Fred Kroeger »

I've upgraded to NagiosXI 2014 and am still having the same issue with not being able to disable Notification & Event Handlers.
The process I use is:
1) Import the Nagios Backup from the Prod server
2) Stop Nagios
3) Update the nagios.cfg file and set enable_event_handlers & enable_notifications to 0
4) Start Nagios

This is what is in the nagios.cfg file

Code: Select all

enable_event_handlers=0
enable_notifications=0
And this is what the Monitoring Engine Status screen shows.
screenshot019.jpg
The only way I can disable event handlers & notifications is to click on the X next to each Process Setting.
When I disable the notifications this way, the Green tick in the top right of screen chnages to a Blue i

regards.... Fred
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Disabling Notifications & Event Handlers

Post by scottwilkerson »

Once you have clicked any of these, they will take precedsence over your nagios.cfg if you have the following in your nagios.cfg

Code: Select all

use_retained_program_state=1
From the Core Documentation
This option determines whether or not Nagios will send out notifications when it initially (re)starts. If this option is disabled, Nagios will not send out notifications for any host or service. Note: If you have state retention enabled, Nagios will ignore this setting when it (re)starts and use the last known setting for this option (as stored in the state retention file), unless you disable the use_retained_program_state option. If you want to change this option when state retention is active (and the use_retained_program_state is enabled), you'll have to use the appropriate external command or change it via the web interface.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Disabling Notifications & Event Handlers

Post by Fred Kroeger »

Thank Scott - that makes sense now that I know what that parameter does!
I've set that value to 0 and will try the restore again.

Fred
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Disabling Notifications & Event Handlers

Post by lmiltchev »

Let us know if this worked out for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked