Nagios CHECK_NRPE: Socket timeout after 10 seconds
两种方式:方式一,
nrpe 进程执行某些脚本可能是大于10秒钟,而默认的是10秒钟。所以会发报警信息,解决的方法如下:
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -t 30 # 加上一个 -t 30 指定时间为 30 秒
}
然后需要重新启动下 nagios 和 apache 的服务
# /etc/init.d/nagios restart
Running configuration check...done.
Stopping nagios: done.
Starting nagios: done.
You have new mail in /var/spool/mail/root
# /etc/init.d/httpd restart
Stopping httpd:
Starting httpd:
方式二:
这里不修改配置,直接修改源码,重新编译
nrpe-2.12/include/common.h
#define DEFAULT_SOCKET_TIMEOUT30 /* timeout after 10 seconds */
重新编译使用新的check_nrpe,拷贝到/usr/local/nagios/libexec即可。
页:
[1]