Hi
I've been trying to create a clone of my nagios servers (DDBB is offloaded to a secondary server) and besides other issues, my main problem is that notifications are still being send even tough I did change the enable_notifications to 0 in the clone. This is causing problems as notifications are getting mixed up. Mail is configured with SMTP using an external server but just in case I did also deleted the mails /var/spool/mail for nagios and root user before starting nagios. I can't continue with my configuration to make it all work until notifications are not being send.
I guess I can always clear the contacts.cfg but I'd like to avoid that.
Any idea of what can be the cause for the configuration not being applied?
enable_notifications=0 not working
Re: enable_notifications=0 not working
I believe it needs to be enable_notifications=0, not just enable_notifications 0 in your nagios.cfg. After making the change, make sure you either apply configuration or restart the nagios service.
The only other page I can think of in XI is Admin -> Monitoring Engine Status -> Click the 'X' next to the Notifications tab.
The only other page I can think of in XI is Admin -> Monitoring Engine Status -> Click the 'X' next to the Notifications tab.
Former Nagios Employee
Re: enable_notifications=0 not working
I have enable_notifications=0 in my nagios.cfg, sorry If it was not clear. I did restart the nagios service after changing the configuration but mails are still being send. My Nagios server was having problems connecting to the Nagios DDBB that it's offloaded to a different server. Maybe, as nagios can't save the configuration change in the DDBB the configuration change is not being applied? Sadly the webinterface was not working properly either so I can't apply the changes there.rkennedy wrote:I believe it needs to be enable_notifications=0, not just enable_notifications 0 in your nagios.cfg. After making the change, make sure you either apply configuration or restart the nagios service.
The only other page I can think of in XI is Admin -> Monitoring Engine Status -> Click the 'X' next to the Notifications tab.
As a workaround to avoid mails being send, If I delete the content of contacts.cfg It will be recreated once the nagios server is restarted or this configuration file can only be filled manually?
Re: enable_notifications=0 not working
If you deleted the content of contacts.cfg manually from the command line, the next time you apply configuration, it will get populated with whatever is in the database (CCM).
I would recommend checking for multiple nagios processes as they can cause notifications to be sent (even though they are disabled "globally"). Run the following command, and show the output:
Have you tried stopping/starting services
or rebooting the server?
I would recommend checking for multiple nagios processes as they can cause notifications to be sent (even though they are disabled "globally"). Run the following command, and show the output:
Code: Select all
ps -ef | head -1 && ps -ef | grep bin/nagiosCode: Select all
service nagios stop
service ndo2db stop
service ndo2db start
service nagios start
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: enable_notifications=0 not working
Just tried clearing completely the file but it raises a configuration error during the restart of nagios. I'll have to test latter to remove only the entries of the contacts I'm interested in.lmiltchev wrote:If you deleted the content of contacts.cfg manually from the command line, the next time you apply configuration, it will get populated with whatever is in the database (CCM).
I have stopped and started the services multiple times and also rebooted the server several times but it have make no difference. Usually the server is stopped and I only start it when I want to test something and as soon as the nagios service starts, the emails starts to arrive. As I'm using /usr/bin/mail -s for mailing in the commands.cfg I did clear the /var/spool/mail/ before starting the server to remove any possible mail in the queue.lmiltchev wrote: I would recommend checking for multiple nagios processes as they can cause notifications to be sent (even though they are disabled "globally"). Run the following command, and show the output:
Have you tried stopping/starting services
or rebooting the server?Code: Select all
service nagios stop service ndo2db stop service ndo2db start service nagios start
Re: enable_notifications=0 not working
Please PM one of us a copy of your profile, you can download it by going to Admin > System Config > System Profile and click the Download Profile button in the top right corner. I'd like to review your configuration to see if anything stands out.
Thank you
Thank you