I have nagios working in my office. Problem is if I make any changes in config and restart the service I get sms alerts. All I wanted to know is there any good way by taking all nagios config in maintenance mode so I shouldnt get any sms alert for that time?
Today I replace the sms entry in contacts.cfg with a temp email id.
email [email protected]
}
After making changes I restarted the nagios service and tested every thing was fine. but when I put the sms gateway back in contacts.cfg and restarted the nagios service I got 1000 sms again … As restarting nagios send alerts that these services/hosts are down …
If we make any changes in contacts.cfg do we have to restart the nagios service?
A normal rule is that when you make modifications to the Nagios configuration files you have to restart Nagios. When you make modifications to the objects files, you just have to reload Nagios.
When I reload nagios it finds like unable to read any host and all services are down and then it throws huge number of SMS alert to me. All I can’t understand if I run /etc/init.d/nagios reload then it shouldnt behave like this. I mean just read the new changes in config but shouldn’t break the existing sessions.
but I get the alerts on both cases either reload the service or restart it. Where did you get to know it shouldnt send alert on restart?
Many thanks for reply.
You are right it shouldnt but in my case I don’t know what else is wrong then
Format: retain_state_information=<0/1>
Example: retain_state_information=1
This option determines whether or not Nagios will retain state information for hosts and services between program restarts. If you enable this option, you should supply a value for the state_retention_file variable. When enabled, Nagios will save all state information for hosts and service before it shuts down (or restarts) and will read in previously saved state information when it starts up again.
0 = Don’t retain state information (default)
1 = Retain state information