- 论坛徽章:
- 0
|
小弟在使用nagios时碰到两个问题,求助版主,及各位高手,帮忙看看
1:nagios连接不了windows的客户端,telnet客户端的12489端口是通的 windows客户端安装的是:NSClient++-0.3.6-Win32.msi 在监控端运行/usr/lib/nagios/plugins/check_nt -H 192.16
8.1.27 -v CLIENTVERSION
提示:could not fetch information from server
2: 监控端使用的是飞信短信报警,每次我关机测试时需要五分钟左右的时间才能检测到主机已DOWN机,如果只是重启,nagios检测不到。请教各位这是什么问题啊?
windows客户端设置我是按照下面这个教程安装的:
下载NSClient++-0.3.6-Win32.msi并安装。
到安装目录打开NSC.ini文件进行修改:
在[modules]模块,将除CheckWMI.dll和RemoteConfiguration.dll外的所有dll文件明前的注释( 去掉。
在[Settings]模块可以设置一个连接密码password=PWD,为了简单,在此不设密码。设置 allowed_hosts=127.0.0.1/32,192.168.1.29,可以连接的监控服务器的地址,如果写成192.168.0.0/24 则表示该子网内的所有机器都可以访问;如果这个地方是空白则表示所有的主机都可以连接上来(注意在[NSClient]有allowed_hosts的同样设置,不要设置错了),最后不要忘记去掉前面的注释符(;)。
运行nsclient++
NSClient++ /install
NSClient++ SysTray install
NSClient++ /start
如果有防火墙,请开放相应端口
附件是我的配置文件,我的主机及windows主机的配置如下:请各位高手帮忙看看啊
define host{
name generic-host
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
failure_prediction_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
check_command check-host-alive
max_check_attempts 3
notification_interval 0
notification_period 24x7
notification_options d,u,f,r
contact_groups admins
register 0
}
define host{
use generic-host ; Inherit default values from a template
host_name fileserver2 ; The name we're giving to this host
alias windows-server ; A longer name associated with the host
address 192.168.1.27 ; IP address of the host
define service{
use generic-service
host_name fileserver2
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
define service{
use generic-service
host_name fileserver2
service_description Uptime
check_command check_nt!UPTIME
}
define service{
use generic-service
host_name fileserver2
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
define service{
use generic-service
host_name fileserver2
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}
define service{
use generic-service
host_name fileserver2
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}
define service{
use generic-service
host_name fileserver2
service_description W3SVC
check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
}
define service{
use generic-service
host_name fileserver2
service_description Explorer
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
} |
|