配置 新的Nagios(1)(2)
清单 3. 配置 3:添加新主机
- define host{
- host_name ubuntu_1_2
- alias Ubuntu test server
- address 192.168.1.2
- check_command check-host-alive
- max_check_attempts 20
- notifications_enabled 1
- event_handler_enabled 0
- flap_detection_enabled 0
- process_perf_data 1
- retain_status_information 1
- retain_nonstatus_information 1
- notification_interval 60
- notification_period 24x7
- notification_options d,u,r
- }
Nagios 配置的最后一步是为配置的主机定义服务。这个示例使用了一个预定义的“ping”Nagios 插件,它将发送 Internet 控制信息协议(Internet Control Message Protocol,ICMP)回显请求以确定主机是否有响应。
清单 4. 配置 4:添加新服务
- define service{
- use service-template
- host_name ubuntu_1_2
- service_description PING
- check_period 24x7
- contact_groups server-admins
- notification_options c,r
- check_command check_ping!300.0,20%!1000.0,60%
- }
在完成了这个配置工作之后,重新启动您的 Nagios 守护进程,稍等几秒钟让 Nagios 进行初始化,然后,证实 Web 管理接口中 ping 服务的可见性。
通过文章的描述,我们知道了配置Nagios的四大点,希望大家能掌握它们!
- 配置和安装Nagios所需的工具与命令
- FreeBSD 7.0上的nagios安装完全攻略
- nagios plugins之 check_http ZT
- Nagios图形化Pnp 安装和配置 ZT
- Redhat Nagios安装详解
- Nagios 配置文件解析
- Nagios安装笔记
评论暂时关闭