define timeperiod{
timeperiod_name 24x7
alias 24 Hours A Day, 7 Days A Week
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
} |
define contact {
contact_name sa //不要有空格
alias system administrator
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands service-notify-by-sms,service-
notify-by-email //这个命令读配置文件miscommands.cfg
host_notification_commands host-notify-by-email,host-noti
fy-by-sms //这个命令读配置文件miscommands.cfg
email sery@163.com
pager 13333333333 //手机号,收报警短信
} //不要把这个符号写掉了
define contact {
contact_name sery
alias system administrator
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands service-notify-by-sms,service-
notify-by-email
host_notification_commands host-notify-by-email,host-noti
fy-by-sms
email sery@sohu.com
pager 13312345678
} |
define contactgroup {
contactgroup_name sagroup //不要用空格
alias system administrator group
members sa,sery //本例有2个成员
} |
#define monitor host
#################################################################
# Wangjing IDC servers #
#################################################################
define host {
host_name nagios-server
alias nagios server
address 61.x..x.49
contact_groups sagroup //多个联系组用逗号分隔, |
#service definition
##############################################################
# Wangjing IDC servers service for host-live #
##############################################################
define service {
host_name nagios-server //来源:hosts.cfg
service_description check-host-alive
check_period 24x7
max_check_attempts 4
normal_check_interval 3
retry_check_interval 2
contact_groups sagroup //来源:contactgroups.cfg
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check-host-alive //检查主机是否存活
}
define service {
host_name 74-210
service_description check_tcp 80
check_period 24x7
max_check_attempts 4
normal_check_interval 3
retry_check_interval 2
contact_groups sagroup
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
check_command check_tcp!80 //检查tcp 80端口服务是否正常
} |
define hostgroup {
hostgroup_name sa-servers
alias sa servers
members nagios-server,24-25,24-26 //用逗号间隔多个主机
} |
Total Warnings: 0 Total Errors: 0 Things look okay - No serious problems were detected during the pre-flight check |
[root@netmonitor nagios]# bin/nagios -v etc/nagios.cfg Nagios 2.5 Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org) Last Modified: 07-13-2006 License: GPL Reading configuration data... Error: Could not find any host matching 'nagios-server' Error: Could not expand member hosts specified in hostgroup |
| 共3页: 上一页 [1] [2] 3 | ||
|
|
|||
| · 网络安全之网吧安全 · 2007盘点专题:有多少.. · 数字证书技术ABC · 身份认证技术 · 即时通信软件(IM)安.. · 电子邮件安全 · 运营商封堵非法ADSL共享 · ARP攻击防范与解决方案 |
· CISSP认证成长之路 · 数据库安全技术专题 · 网管系统介绍 · 2007年IT技术人员最喜.. · Windows Home Server .. · Sniffer安全技术从入门.. · TD-SCDMA、WiMAX、McWi.. · 802.11n:下一代的无线.. |
||
|
|||
| · SOA 面向服务架构 · 子网掩码教程 · 三层交换技术专题 · SQL Server入门到精通 · Windows远程桌面应用 · 深入了解PGP加密技术 · MySQL数据库备份 · VPN技术 |
· 病毒查杀专题 · Solaris 10 配置管理 · Linux 基础 · Linux防火墙 · SSL VPN详细知识 · 路由器设置与口令恢复 · 打造安全服务器 · Linux 集群技术专题 |
||
|
|||
| · VPN技术 · SQL Server入门到精通 · SOA 面向服务架构 · 子网掩码教程 · 三层交换技术专题 · Windows远程桌面应用 · MySQL数据库备份 · 身份认证技术 |
· 病毒查杀专题 · SSL VPN详细知识 · Sniffer安全技术从入门.. · 常用交换机典型配置 · Linux 集群技术专题 · VPN技术 · 路由器设置与口令恢复 · Linux 基础 |
||
| ·DB2 Viper快速入门 ·DB2 9数据库的镜像分割与.. |
·将XML应用程序从DB2 8.x.. ·DB2 9中的pureXML:如何.. |
| ·ASP.NET 2.0 Web Part编.. ·ASP.NET 2.0 Web Part编.. |
·ASP.NET 2.0 Web Part编.. ·ASP.NET 2.0服务器控件之.. |
| ·互联网送给我们的---“平.. ·P2P网络“自由”穿越NAT.. |
·P2P网络的结构学习 ·业务脆弱性评估是业务持.. |
| ·08第2周回顾:07年华为收.. ·08第1周回顾:TCP/IP协议.. |
·办理驾驶证降级攻略 ·12月29日上午51CTO.com访.. |
| · 家用路由器存在严重缺陷.. · 华为2008市场攻略 240亿.. · 全面细致讲解企业内部组.. |
· 浅谈国内的渗透评估过程 · VPN安全技术与应用 · 企业如何进行计算机取证.. |
| · IDC:2008年IT市场10大.. · Visual Studio 2005开发.. · 测试开发人员参考手册 |
· 年初17大热门技术 年底.. · 解析Ajax开发框架 走进A.. · 基于Google Maps与Ajax.. |
| · 热点:国内大型企业如此.. · IBM和Sun起争议 坚持不.. · 让Ubuntu"傻"的更彻底! .. |
· 中小企业刀片市场将达20.. · IT人员应当了解的七个存.. · IDC:2008年IT市场10大.. |
| · 甲骨文Oracle 11g正式发.. · Oracle数据库开发之PL/S.. · Oracle数据库开发基础教.. |
· IT人员应当了解的七个存.. · 希捷承认部分硬盘暗藏病.. · 硬盘之父获得诺贝尔物理.. |