溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

配置nagios遇到的錯(cuò)誤

發(fā)布時(shí)間:2020-06-23 17:28:22 來(lái)源:網(wǎng)絡(luò) 閱讀:3527 作者:xingmenghaohan 欄目:移動(dòng)開(kāi)發(fā)

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的運(yùn)行用戶要對(duì)文件寫(xiě)的權(quán)限 ,權(quán)限設(shè)置目錄、/usr/local/nagios/var/rw

 

查看apache進(jìn)程,什么用戶在運(yùn)行

[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

然后 更改權(quán)限

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

重啟服務(wù)

service nagios restart

 

 

 

被監(jiān)控機(jī)上安裝 nagios-plugins 插件時(shí)報(bào)錯(cuò)

check_http.c: In function ‘process_arguments’:
check_http.c:312: 錯(cuò)誤:‘ssl_version’ 未聲明 (在此函數(shù)內(nèi)第一次使用)
check_http.c:312: 錯(cuò)誤:(即使在一個(gè)函數(shù)內(nèi)多次出現(xiàn),每個(gè)未聲明的標(biāo)識(shí)符在其
check_http.c:312: 錯(cuò)誤:所在的函數(shù)內(nèi)只報(bào)告一次。)
make[2]: *** [check_http.o] 錯(cuò)誤 1
make[2]: Leaving directory `/root/rpm/nagios-plugins-1.4.16/plugins'
make[1]: *** [all-recursive] 錯(cuò)誤 1
make[1]: Leaving directory `/root/rpm/nagios-plugins-1.4.16'
make: *** [all] 錯(cuò)誤 2

這個(gè)是因?yàn)闆](méi)有安裝ssl導(dǎo)致,安裝ssl解決

yum install openssl openssl-devel 

 

 

 

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI