1.NSClient - ERROR: Invalid password.
vi commands.cfg
找到 check_nt 修改密码
# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$ -s redhat
}
2.修改nsclient++配置文件增加密码项:
C:\Program Files\NSClient++\ nsclient.txt
; PASSWORD - Password used to authenticate againast server
password = redhat
重启服务
检测:
./check_nt -H 10.0.0.52 -p 12489 -s redhat -v UPTIME
q:
CRITICAL - Socket timeout after 10 seconds
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -t 30 # 加上一个 -t 30 指定时间为 30 秒
}
重启nagios服务
windows 客户端安装:
1.双击
NSCP-0.4.3.77-x64
2.下一步
选typical
3选参数
4.填监控端IP 及密码
4.安装
5.确定服务启动正常
services.msc
6.确认防火墙正常
7.检测是否通讯正常
./check_nt -H 10.0.0.56 -p 12489 -s redhat -v UPTIME
进程检测
./check_nt -H 10.0.0.52 -p 12489 -s redhat -v PROCSTATE -l Explorer.exe