- 论坛徽章:
- 8
|
我现在已经把linux监控起来了,现在有几台windows机器,我现在用的是NSClient来进行C/S模式,12489端口也已经开启,我的nagios监控windows的配置如下:
[root@cacti objects]#more nagios.cfg
cfg_file=/usr/local/nagios/etc/objects/voice_service.cfg
[root@cacti objects]# more command.cfg
# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
} [root@cacti objects]# more hosts.cfg
define host {
host_name voice
address 192.168.100.211
contact_groups sagroup
process_perf_data 1
check_command check-host-alive
max_check_attempts 10
notification_interval 10
notification_period 24x7
notification_options d,u,r
} [root@cacti objects]# more voice_service.cfg
define service{
host_name voice
service_description check_C_disk
check_command check_nt!192.168.100.211!USEDDISKSPACE! -p 12489 -l c -w 80 -c 90
max_check_attempts 3
normal_check_interval 2
retry_check_interval 2
check_period 24x7
notification_interval 10
notification_period 24x7
notification_options w,u,c,r
contact_groups sagroup
}
我用手动的方式试了下 可以返回正确的信息,但是放到配置文件,在web页面就出现问题了,
[root@cacti objects]# ../../libexec/check_nt -H 192.168.100.211 -p 12489 -v USEDDISKSPACE -l c -w 80 -c 90
c:\ - total: 39.06 Gb - used: 6.02 Gb (15%) - free 33.04 Gb (85%) | 'c:\ Used Space'=6.02Gb;31.25;35.15;0.00;39.06
check_CPULOAD UNKNOWN 06-29-2009 14:10:58 0d 0h 32m 30s 3/3 check_nt: Could not parse arguments
出现unknown 不知道哪里配置错误的问题 还是什么问题 希望有监控windows的前辈给与指点.
还有一个问题就是command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
这里的-V后面为什么有2个变量,不太明白.
[ 本帖最后由 wiliiwin 于 2009-6-29 14:21 编辑 ] |
|