温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

配置nagios遇到的错误

发布时间:2020-06-23 17:28:22 来源:网络 阅读:3512 作者:xingmenghaohan 栏目:移动开发

Error: Could not read host and service status information!

 

Error: Could not stat() command file '/usr/local/nagios/var/rw/nagios.cmd'! 
The external command file may be missing, Nagios may not be running, and/or Nagios may not be checking external commands.

 

 

apache的运行用户要对文件写的权限 ,权限设置目录、/usr/local/nagios/var/rw

 

查看apache进程,什么用户在运行

[root@standby objects]# ps -ef | grep http
root      4406     1  0 11:29 ?        00:00:00 /usr/sbin/httpd
nagios    4408  4406  0 11:29 ?        00:00:00 /usr/sbin/httpd
nagios    4409  4406  0 11:29 ?        00:00:00 /usr/sbin/httpd
nagios    4410  4406  0 11:29 ?        00:00:00 /usr/sbin/httpd
nagios    4411  4406  0 11:29 ?        00:00:00 /usr/sbin/httpd
nagios    4412  4406  0 11:29 ?        00:00:00 /usr/sbin/httpd
nagios    4413  4406  0 11:29 ?        00:00:00 /usr/sbin/httpd
nagios    4414  4406  0 11:29 ?        00:00:00 /usr/sbin/httpd

然后 更改权限

chmod 777 /usr/local/nagios/var/rw

重启服务

service nagios restart

 

 

 

被监控机上安装 nagios-plugins 插件时报错

check_http.c: In function ‘process_arguments’:
check_http.c:312: 错误:‘ssl_version’ 未声明 (在此函数内第一次使用)
check_http.c:312: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
check_http.c:312: 错误:所在的函数内只报告一次。)
make[2]: *** [check_http.o] 错误 1
make[2]: Leaving directory `/root/rpm/nagios-plugins-1.4.16/plugins'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/root/rpm/nagios-plugins-1.4.16'
make: *** [all] 错误 2

这个是因为没有安装ssl导致,安装ssl解决

yum install openssl openssl-devel 

 

 

 

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI