1、安裝完nagios及nagios-plugins時,卡在這了,forbidden 禁止訪問
創(chuàng)新互聯(lián)建站是專業(yè)的順慶網(wǎng)站建設(shè)公司,順慶接單;提供網(wǎng)站制作、成都做網(wǎng)站,網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行順慶網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊,希望更多企業(yè)前來合作!
apache日志顯示如下
Directory index forbidden by Options directive: /usr/local/nagios/share/”
1、apache的配置問題默認(rèn)頁面是否是index.php,還有是否支持php模塊(ll /etc/httpd/conf.d/php.conf)
2、相應(yīng)目錄的權(quán)限問題 是否可讀
3、是否正確配置的賬戶驗證,
如下示例:
配置http驗證 【配置驗證時注意驗證用戶的名字,建議為nagiosadmin,不然就記得修改cgi.cfg及contact.cfg保持賬號的一致,不然就會遇到下面的錯誤5.】
兩種方式
第一種方式,在安裝nagios的時候,直接makeinstall –webconf
這個會在/etc/httpd/conf.d/生成一個nagios.conf文件
htpasswd-c /etc/nagios/htpasswd.users nagiosadmin
第二種方式
直接自行配置nagios的http驗證,可直接在主配置文件nagios.conf中添加如下
ScriptAlias/nagios/cgi-bin /usr/local/nagios/sbin
<Directory "/usr/local/nagios/sbin">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile/etc/nagios/htpasswd
//用于此目錄訪問身份驗證的文件
Require valid-user
</Directory>
Alias /nagios/usr/local/nagios/share
<Directory"/usr/local/nagios/share">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile/etc/nagios/htpasswd
#//用于此目錄訪問身份驗證的文件
Require valid-user
</Directory>
htpasswd-c /etc/nagios/htpasswdnagios
2、The requested URL/nagios/cgi-bin/statusmap.cgi was not found on this server.

沒有map圖形,
yuminstall gd-devel -y
重新編譯,
若是源碼安裝gd-devel,需要手動來指明gd-lib的存放,通過yum安裝的不需要,可以自動加載到
./configure --with-gd-lib=/usr/lib --with-gd-inc=/usr/include
make install; makeinstall-init; make install-config; make install-commandmode; make install-webconf
重啟nagios服務(wù)
3、錯誤:
Error: Service check command'check_nrpe' specified in service 'check_total_procs' for host '192.168.15.183'not defined anywhere!
沒有定義nagios的命令模板
編輯commands.cfg 添加即可
例:define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
4、安裝nrpe,編譯的時候提示以下信息checkingfor SSL headers... configure: error: Cannot find ssl headers原因是缺少openssl-devel包,yum -yinstall openssl-devel 問題解決!
5、It appears as thoughyou do not have permission to view information for any of the hosts yourequested...
If you believe this is an error, check the HTTP serverauthentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.
解決:
第一種:
配置cgi.cfg
78 use_authentication=1默認(rèn)值為1,改為0,即取消賬號驗證
第二種:同樣也是配置cgi.cfg中的參數(shù),
在末行模式下執(zhí)行 %s/nagiosadmin/username/g
此username是你在htpasswd生成的自定義驗證用戶
開啟認(rèn)證認(rèn)證的用戶必須是 cgi.cfg 配置文件里有的默認(rèn)是 nagiosadmin
如果你新建的其他用戶需要添加進(jìn)去多用戶用逗號分開
authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin
如果不是 nagiosadmin 需要到后面添加
例子 authorized_for_system_information=nagiosadmin,username
愿積極跟貼,共建nagios故障解決手冊。。。。
文章標(biāo)題:nagios監(jiān)控故障排除
當(dāng)前網(wǎng)址:http://www.js-pz168.com/article40/pojcho.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站制作、靜態(tài)網(wǎng)站、面包屑導(dǎo)航、品牌網(wǎng)站制作、網(wǎng)站設(shè)計、微信小程序
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)