Nagios的安装与配置(6)
本帖最后由 monicazhang 于 2015-10-30 21:38 编辑20151030淡然续上
monday 00:00-12:00 tuesday 00:00-12:00 wednesday 00:00-12:00 thursday 00:00-12:00 friday 00:00-12:00 saturday 00:00-12:00 }define timeperiod{ timeperiod_name pm 开源监控软件 alias pm sunday 12:00-24:00 monday 12:00-24:00 tuesday 12:00-24:00 wednesday 12:00-24:00 thursday 12:00-24:00 friday 12:00-24:00 saturday 12:00-24:00 }Ø 定义contact,内容如下 nagios安装define contact { contact_name test1 //定义上午接收邮件报警用户 alias system administrator service_notification_period am host_notification_period am service_notification_options w,u,c,r host_notification_options d,u,r service_notification_commandsnotify-service-by-email host_notification_commands notify-host-by-email email test1@ nagios配置 }define contact { contact_name test2 //定义下午接收短信报警用户 alias test2 service_notification_period pm host_notification_period pm service_notification_options w,u,c,r host_notification_options d,u,r service_notification_commandsnotify-service-by-fetion host_notification_commands notify-host-by-fetion email test2@ }Ø 定义contactgroups,内容如下define contactgroup { contactgroup_name network alias network administrator group members test1}define contactgroup { contactgroup_name system alias system administrator group 监控软件 members test2}Ø 定义host,内容如下define host { use host-pnp host_name nagios-test1 alias nagios test1 address 172.26.188.202 contact_groups network,system check_command check-host-alive max_check_attempts 5 notification_interval 60 notification_period 24x7 notification_options d,u,r }define host { use host-pnp host_name GIS01 alias GIS01 address 172.26.188.212 contact_groups network,system check_command check-host-alive nagios实施 max_check_attempts 5 notification_interval 60 notification_period 24x7 notification_options d,u,r}Ø 定义service,内容如下define service { use srv-pnp host_name nagios-test1 service_description check_tcp 80 check_period 24x7 max_check_attempts 4 normal_check_interval 3 retry_check_interval2 contact_groups system,network notification_interval 60 notification_period 24x7 notification_options w,u,c,r event_handler_enabled 1 event_handler restart-httpd nagios培训 check_command check_tcp!80 }
本帖关键字:Nagios
页:
[1]