使用nagios做heartbeat监控时,在nagios服务器端报警提示:NRPE: Command 'check_heartbeat' not defined
在nagios客户端/usr/local/nagios/libexec/check_nrpe -H 192.168.3.211 -c check_heartbeat都能够正常执行。
几种情况:
1,nagios客户端nrpe.cfg配置文件命令写错
2,nagios客户端libexec下没有此命令
查看/var/log/message报如下错误:
Jan 29 17:04:41 usvr-210 xinetd[30971]: bind failed (Address already in use (errno = 98)). service = nrpe
Jan 29 17:04:41 usvr-210 xinetd[30971]: Service nrpe failed to start and is deactivated.
lsof -i:5666检查端口并没有启动,但是ps -ef |grep nrpe是有的,于是重启nrpe:
nagios可以正常监控了。