Limit the number of Nagios alarms using escalations (1)

Source: Internet
Author: User

 

Figure-Nagios

NagiosIt is a very powerful monitoring tool, especially its alarm function. Now there are many forms of implementation on the Internet, such as combining mobile 139 mail, Fetion, MSN, etc, however, if the server fails to be resolved in a timely manner, Nagios will continuously send alarm messages, which is a headache. Use nowEscalations,The following method solves the issue of the number of Nagios alarms.

System Environment: CentOS 5.2

Nagios version: 3.0.6

Nagios installation path:/usr/local/nagios

Definition of configuration file content: # basic configuration will not be commented out.

 
 
  1. hosts.cfg  
  2.  
  3. define host{  
  4.  
  5. host_name WWW-Server  
  6.  
  7. alias WWW-Server  
  8.  
  9. address 193.1.16.100  
  10.  
  11. check_command check-host-alive  
  12.  
  13. max_check_attempts 5  
  14.  
  15. check_period 24x7  
  16.  
  17. notification_interval 10  
  18.  
  19. notification_period 24x7  
  20.  
  21. notification_options d,u,r  
  22.  
  23. notifications_enabled 1  
  24.  
  25. contact_groups chengnan  
  26.  
  27. }  
  28.  

 
 
  1. Services.cfg  
  2.  
  3. define service{  
  4.  
  5. host_name WWW-Server  
  6.  
  7. service_description Check_HTTP  
  8.  
  9. check_command check_http  
  10.  
  11. max_check_attempts 10  
  12.  
  13. normal_check_interval 3  
  14.  
  15. retry_check_interval 2  
  16.  
  17. check_period 24x7  
  18.  
  19. notification_interval 5  
  20.  
  21. notification_period 24x7  
  22.  
  23. notification_options w,u,c,r  
  24.  
  25. contact_groups admin  
  26.  
  27. }  
  28.  

 
 
  1. define service{  
  2.  
  3. host_name WWW-Server  
  4.  
  5. service_description Check_Jetty  
  6.  
  7. check_command check_tcp!8080  
  8.  
  9. max_check_attempts 10  
  10.  
  11. normal_check_interval 3  
  12.  
  13. retry_check_interval 2  
  14.  
  15. check_period 24x7  
  16.  
  17. notification_interval 5  
  18.  
  19. notification_period 24x7  
  20.  
  21. notification_options w,u,c,r  
  22.  
  23. contact_groups admin  
  24.  
  25. }  
  26.  

 
 
  1. Contacts. cfg
  2.  
  3. Define contact {
  4.  
  5. Contact_name chengnan
  6.  
  7. Alias chengnan
  8.  
  9. Service_icationication_period 24x7
  10.  
  11. Host_icationication_period 24x7
  12.  
  13. Service_icationication_options w, u, c, r
  14.  
  15. Host_icationication_options d, u, r
  16.  
  17. Service_icationication_commands notify-service-by-email
  18.  
  19. Host_icationication_commands notify-host-by-email
  20.  
  21. Email chengnan@139.com // email
  22.  
  23. }
  24.  

 
 
  1. define contactgroup{  
  2.  
  3. contactgroup_name chengnan  
  4.  
  5. alias Nagios Administrators  
  6.  
  7. members chengnan  
  8.  
  9. }  
  10.  


Related Article

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.