標籤:nagios
一、啟動時報錯
“Starting nagios:This account is currently not available”
解決方案:
修改/etc/passwd
將/sbin/nologin改成/bin/bash
二、nagios安裝好後,網頁訪問出現如下錯誤:
無權查看任何主機的資訊。
請檢查HTTP伺服器關於該CGI的存取權限設定。
解決辦法:
vi /usr/local/nagios/etc/cgi.cfg
將use_authentication的值改為0.
use_authentication=0
然後重啟nagios服務
service nagios restart
還有可能:
設定檔中的hostname和service_description使用了中文。
建議hostname和service_description 不要使用中文
三、訪問時出現亂碼
一般是apache 設定檔的編碼問題
解決方案:
vim /usr/local/apache2/conf/
最後添加AddDefaultCharset utf-8
四、出現 The requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server錯誤
解決方案:
確定安裝gd-devel包
然後回到解壓目錄,
#make clean
重新編譯安裝一下
# ./configure --with-gd-lib=/usr/lib --with-gd-inc=/usr/include
接下來
#./configure --with-command-group=nagcmd
#make all;
make install;
make install-init;
make install-config;
make install-commandmode;
makeinstall-webconf
五、查看nagios.log日誌出現如下錯誤:
ndomod: Could not open data sink! I‘ll keep trying, but some output may get lost...
解決思路:
# vim /usr/local/nagios/etc/ndo2db.cfg
ndo2db_user=nagios
ndo2db_group=nagcmd
注意第二個,ndo2db的所屬組,是nagcmd.因為前面系統加的使用者nagios是nagcmd組的.
nagios 安裝常見錯誤