资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

配置nagios遇到的错误

Error: Could not read host and service status information!

创新互联公司技术团队十余年来致力于为客户提供做网站、成都网站设计、成都品牌网站建设全网整合营销推广、搜索引擎SEO优化等服务。经过多年发展,公司拥有经验丰富的技术团队,先后服务、推广了近1000家网站,包括各类中小企业、企事单位、高校等机构单位。

 

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 

 

 

 


网站标题:配置nagios遇到的错误
文章出自:http://cdkjz.cn/article/gcohcd.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220