описал сервисы для группы хостов# check that web services are running
define service {
hostgroup_name http-servers
service_description HTTP
check_command check_http
use generic-service
notification_interval 0 ; set > 0 if you want to be renotified
}
# check that ssh services are running
define service {
hostgroup_name ssh-servers
service_description SSH
check_command check_ssh
use generic-service
notification_interval 0 ; set > 0 if you want to be renotified
}
#Группа Windows машин версия NSClient++
define service {
hostgroup_name Winhosts
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
use generic-service
}
#Группа Windows машин врням работы без отключения
define service {
hostgroup_name Winhosts
service_description UPTIME
check_command check_nt!UPTIME
use generic-service
}
#Группа Windows машин загрузка проца
define service {
hostgroup_name Winhosts
service_description CPU load
check_command check_nt!CPULOAD!-1 5,80,90
use generic-service
}
#Группа Windows машин размер пмяти на диске
define service {
hostgroup_name Winhosts
service_description C:\ Drive space
check_command check_nt!USEDDISKSPACE!-1 c -w 80 -c 90
use generic-service
}
отредактировал check_nt
root@posts:/etc/nagios-plugins/config# cat nt.cfg
# If you are confused about this command definition, cause you was
# reading other suggestions, please have a look into
# /usr/share/doc/nagios-plugins/README.Debian
# 'check_nt' command definition
define command {
command_name check_nt
command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -p 12489 -s pass -v '$ARG1$'
}
# 'check_nscp' command definition
define command {
command_name check_nscp
command_line /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -p 12489 -v '$ARG1$'
}
захожу в веб интерфейс - Uptime и версия проги отображаются, а вот загрузка проца и размер памяти на диске нет , в логах
[1317758400] CURRENT SERVICE STATE: Windows;C:\ Drive space;UNKNOWN;HARD;4;missing -l parameters
[1317758400] CURRENT SERVICE STATE: Windows;CPU load;UNKNOWN;HARD;4;missing -l parameters
[1317758400] CURRENT SERVICE STATE: Windows;NSClient++ Version;OK;HARD;1;NSClient++ 0.3.9.329 2011-09-02
[1317758400] CURRENT SERVICE STATE: Windows;UPTIME;OK;HARD;1;System Uptime - 0 day(s) 13 hour(s) 11 minute(s)
[1317758400] CURRENT SERVICE STATE: debiantest;FTP;OK;HARD;1;FTP OK - 0,007 second response time on port 21 [220 Welcome to blah FTP service.]
[1317758400] CURRENT SERVICE STATE: debiantest;HTTP;OK;HARD;1;HTTP OK: HTTP/1.1 200 OK - 453 bytes in 0,003 second response time
[1317758400] CURRENT SERVICE STATE: debiantest;SSH;OK;HARD;1;SSH OK - OpenSSH_5.5p1 Debian-6 (protocol 2.0)
[1317758400] CURRENT SERVICE STATE: localhost;Current Load;OK;HARD;1;OK - load average: 0.00, 0.00, 0.00
[1317758400] CURRENT SERVICE STATE: localhost;Current Users;OK;HARD;1;USERS OK - 2 users currently logged in
[1317758400] CURRENT SERVICE STATE: localhost;Disk Space;OK;HARD;1;DISK OK
[1317758400] CURRENT SERVICE STATE: localhost;HTTP;OK;HARD;1;HTTP OK: HTTP/1.1 200 OK - 453 bytes in 0,004 second response time
[1317758400] CURRENT SERVICE STATE: localhost;SSH;OK;HARD;1;SSH OK - OpenSSH_5.5p1 Debian-6 (protocol 2.0)
[1317758400] CURRENT SERVICE STATE: localhost;Total Processes;OK;HARD;1;PROCS OK: 90 processes