分类: BSD
2008-11-04 09:58:18
define service{
use generic-service
host_name aiyo-vhost223
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
define service{
use generic-service
host_name aiyo-vhost223
service_description Uptime
check_command check_nt!UPTIME
}
define service{
use generic-service
host_name aiyo-vhost223
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
define service{
use generic-service
host_name aiyo-vhost223
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}
define service{
use generic-service
host_name aiyo-vhost223
service_description W3SVC
check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
}
define service{
use generic-service
host_name aiyo-vhost223
service_description Explorer
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
}
define service{
use generic-service
host_name aiyo-vhost223
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}
保存退出!
3。编辑主配置文件nagios.cfg
里面添加:cfg_file=/usr/local/nagios/etc/objects/vhost.cfg
然后检测/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
如果没有出错,!那么可以启动了!