ITPub博客

首页 > 应用开发 > IT综合 > Log check error: Log file /var/log/messages is not readable!

Log check error: Log file /var/log/messages is not readable!

原创 IT综合 作者:Michael_DD 时间:2014-11-25 12:15:29 0 删除 编辑
Log check error: Log file /var/log/messages is not readable!


check_nrpe报错

被监控服务器:
[root@test log]# /usr/local/nagios/libexec/check_log -F /var/log/messages -O /tmp/tmp_messages -q "ERROR|Error|error|WARNING|Warning|warning" -e "end_request: I/O error"
Log check ok - 0 pattern matches found

监控服务器:
[root@test libexec]# ./check_nrpe -H 192.168.0.78 -c check_log
Log check error: Log file /var/log/messages is not readable!

被监控服务器端运行监测命令正常,监控服务器运行监控命令不正常!!


原因分析:

在被监控服务器是使用root用户监测的,所以有权限访问!!!
但是从监控服务器端访问,通过ssl方式,用的是nagios用户,所以导致了/var/log/messages文件无法被nagios用户访问!!



解决办法:
在被监控服务器上对/var/log/messages文件增加权限:
[root@test log]# chmod 766 /var/log/messages





[root@sznagios libexec]# ./check_nrpe -H 192.168.129.21 -c check_log
Log check error: Log file /var/log/messages does not exist!


chown nagios /var/log
chown nagios /var/log/messages
chown nagios /tmp/tmp_messages

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29500582/viewspace-1345805/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: RAC常用管理命令
请登录后发表评论 登录
全部评论

注册时间:2014-02-22

  • 博文量
    326
  • 访问量
    2671975