Limit the number of Nagios alarms

Source: Internet
Author: User

Limit the number of Nagios alarms with escalations

After the integration of the fetion, if the problem can not be solved, then the consequences will be very "cup", every five minutes you will receive an alarm message, your mailbox will be filled with alarm mail. Nagios official also thought of this problem, so they gave the solution, http://nagios.sourceforge.net/docs/3_0/escalations.html, here is the official note, the following is my approach.

First edit the Contact.cfg, copy the original configuration in the following, into:
Define Contact{
Contact_Name Nagiosadmin
Use Generic-contact
Alias Nagios Admin
email [email protected];
Service_notification_commands notify-service-by-email,service-notify-by-fetion
Host_notification_commands notify-host-by-email,host-notify-by-fetion
Pager 13691515****
}

Define Contactgroup{
Contactgroup_name Admins
Alias Nagios Administrators
Members Nagiosadmin
}

Define Contact{
Contact_Name SCOMD
Use Generic-contact
Alias Nagios Admin
email [email protected]
Service_notification_commands Notify-service-by-email
Host_notification_commands Notify-host-by-email
Pager 13691515****
}

Define Contactgroup{
Contactgroup_name sysadmin
Alias sysadmin
Members SCOMD
}

Then create a configuration file: Escalations.cfg

#vi/usr/local/nagios/etc/objects/escalations.cfg

Add the following content:
Define Serviceescalation{
host_name scomd.com; Monitored host names, multiple separated by commas
First_notification 4; 4th message, change the frequency interval
Last_notification 0; From the nth information, the recovery frequency interval
Notification_interval 30; Notification interval (units: minutes)
Contact_groups sysadmin
}

Define Serviceescalation{
host_name scomd.com; Monitored host name
service_description PING; Monitored service name, multiple separated by commas
First_notification 4
Last_notification 0
Notification_interval 30
Contact_groups sysadmin
}

Finally, edit the Nagios.cfg file

#vi/usr/local/nagios/etc/nagios.cfg
Add to:
Cfg_file=/usr/local/nagios/etc/objects/escalations.cfg

Check that the Nagios configuration file is correct
/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios.cfg

Restart the Nagios service if you have no problem.
Service Nagios Restart

Limit the number of Nagios alarms

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.