Friday, February 5, 2010

Nagios configuring notifications

mailx must be installed and configured. (see prev post)
The commands also have to be amended:
Edit the Nagios email notification commands found in /usr/local/nagios/etc/objects/commands.cfg and change any '/bin/mail' references to '/usr/bin/mail'. Once you do that you'll need to restart Nagios to make the configuration changes live.

sudo /etc/init.d/nagios restart

Contacts and groups are configured in contact.cfg. By default email are sent to admin. Default member is nagiosadmin. Nagios admin email address (your's) are set in the same file.

2)States and flapping
When a problem appear it first goes to "soft state" and after 3 checks (3/3) it change to "hard state" and the notification is sent.

If the hard state change on and off too often the service is determined to be "flapping". To change the flapping thresholds add these lines to the service definition:
high_flap_threshold 35.0
low_flap_threshold 30.0

When the service is flapping no notifications is sent until it stops flapping.
If we want to have a notification when flapping start add this line to service definition:
notification_options w,u,c,r,f
(f for flapping)

No comments:

Post a Comment