我遇到的错误报警实际上是真的报警了,那是因为我的服务器上部署有很多站点,而当默认站点挂掉后,我去拿别的站点测试,才认为是误报警的
------------------------------------------
1、错误提示:CHECK_NRPE: - Socket timeout after 10 seconds
解决方法:nrpe 进程执行某些脚本可能是大于10秒钟,而默认的是10秒钟。所以会发报警信息,解决的方法是在commands.cfg加上-t 参数 如我的commands.cfg 的check_nrpe配置如下 :
define command{
- command_name check_nrpe
- command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -t 30
- }
------------------------------
2、CRITICAL - Socket timeout after 10 seconds
Try using the
-N
option of check_http
.
I ran into similar problems, and in my case the web server didn't terminate the connection after sending the response (https was working, http wasn't). check_http tries to read from the open socket until the server closes the connection. If that doesn't happen then the timeout occurs.
The
-N
option tells check_http
to receive only the header, but not the content of the page / document.
define command{
command_name check_http
command_line $USER1$/check_http -N -I $HOSTADDRESS$ $ARG1$ -t 20
}
我试着像上面改了下,起初没生效,过了一阵问题解决了,不知道是生效慢,还是自己又恢复了,待测试啊,去掉看看回头
command_name check_http
command_line $USER1$/check_http -N -I $HOSTADDRESS$ $ARG1$ -t 20
}
我试着像上面改了下,起初没生效,过了一阵问题解决了,不知道是生效慢,还是自己又恢复了,待测试啊,去掉看看回头
©著作权归作者所有:来自51CTO博客作者hongfan93627524的原创作品,如需转载,请注明出处,否则将追究法律责任
0
收藏
转载于:https://blog.51cto.com/liuer/999727