標籤:
無權查看任何主機的資訊。 請檢查HTTP伺服器關於該CGI的存取權限設定。
搜尋了一下方法
確保 htpasswd.user的所有組為nagios
解決辦法:
vi /usr/local/nagios/etc/cgi.cfg
將use_authentication的值改為0.
use_authentication=0
然後重啟nagios服務
service nagios restart
還有另外一種可能:
設定檔中的hostname稱service_description使用了中文導致的。
記住:hostname和service_description 都最好不要使用中文哦
註:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
use_authentication=0
按照上面修改將預設的1 改為0,但是改這個之後在服務作業的介面,在想調整服務檢測的時候就會出現這樣的一個提示:
Sorry Dave, I can‘t let you do that...
其實並不需要降低cgi 的安全性,你只需要把你的nagios 管理員賬戶添加到cgi.cfg 檔案就可
以了,比如我的nagios 系統管理使用者是linux(這個命令產生的賬戶 htpasswd -c /usr/local/nagios/etc/htpasswd.users linux
只有添加第一個賬戶要用-c 參數)
就需要在cgi.cfg 檔案中修改如下幾項:
將每項的nagiosadmin 更改為linux 即可,多使用者用”,”分割。
authorized_for_system_information=linux
authorized_for_configuration_information=linux
authorized_for_system_commands=linux
authorized_for_all_services=linux
authorized_for_all_hosts=linux
authorized_for_all_service_commands=linux
authorized_for_all_host_commands=linux
Nagios 請檢查HTTP伺服器關於該CGI的存取權限設定