配置nagios遇到的錯誤

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 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章