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 插件时报错
这个是因为没有安装ssl导致,安装ssl解决
yum install openssl openssl-devel
转载于:https://blog.51cto.com/yangcheng/1225792