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.
- hosts.cfg
-
- define host{
-
- host_name WWW-Server
-
- alias WWW-Server
-
- address 193.1.16.100
-
- check_command check-host-alive
-
- max_check_attempts 5
-
- check_period 24x7
-
- notification_interval 10
-
- notification_period 24x7
-
- notification_options d,u,r
-
- notifications_enabled 1
-
- contact_groups chengnan
-
- }
-
- Services.cfg
-
- define service{
-
- host_name WWW-Server
-
- service_description Check_HTTP
-
- check_command check_http
-
- max_check_attempts 10
-
- normal_check_interval 3
-
- retry_check_interval 2
-
- check_period 24x7
-
- notification_interval 5
-
- notification_period 24x7
-
- notification_options w,u,c,r
-
- contact_groups admin
-
- }
-
- define service{
-
- host_name WWW-Server
-
- service_description Check_Jetty
-
- check_command check_tcp!8080
-
- max_check_attempts 10
-
- normal_check_interval 3
-
- retry_check_interval 2
-
- check_period 24x7
-
- notification_interval 5
-
- notification_period 24x7
-
- notification_options w,u,c,r
-
- contact_groups admin
-
- }
-
- Contacts. cfg
-
- Define contact {
-
- Contact_name chengnan
-
- Alias chengnan
-
- Service_icationication_period 24x7
-
- Host_icationication_period 24x7
-
- Service_icationication_options w, u, c, r
-
- Host_icationication_options d, u, r
-
- Service_icationication_commands notify-service-by-email
-
- Host_icationication_commands notify-host-by-email
-
- Email chengnan@139.com // email
-
- }
-
- define contactgroup{
-
- contactgroup_name chengnan
-
- alias Nagios Administrators
-
- members chengnan
-
- }
-