找回密码
 注册
查看: 3771|回复: 3

nagios界面出现:It appears as though you do not have permission to view

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2017-12-14 11:53:54 | 显示全部楼层 |阅读模式
Description: If you click on "View Config" and you get: """It appears as though you do not have permission to view the configuration information you requested... If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI and check the authorization options in your CGI configuration file."""3 Z( x" R: V" f" V6 _! f, R

3 A/ Y9 U) X% x) x' E7 l' }$ q1 W" X7 h
报错解决办法:- W( J; i' U; `* W6 S
3 ?2 O& o  C# \" t7 J
* U+ J' Q5 V( ~/ H% W2 P
修改/usr/local/nagios/etc/cgi.cfg文件:
" a" |7 M, b7 I  D# i4 yauthorized_for_configuration_information" in cgi.cfg6 v/ F( \/ ]" Z* @( h7 t
authorized_for_configuration_information=nagiosadmin
) z; d7 `9 y% C* f2 E# A/ }% j' n' z1 ^

0 Q0 Z, ~+ `& f" w& S! _# e其中nagiosadmin所有的配置 都替换成nagios
% \# b# P8 d# Q
; ?; M* T' m! t- @: t3 C6 d* m( L# n- D2 v* \: ^
修改为设置的用户;
! |: Y7 U8 N! X& {本处认证的用户为nagios    修改实例如下:
8 n5 i% V  U4 @authorized_for_configuration_information=nagios
) S7 M0 T# a3 E; I) ~2 v+ ]重启httpd服务,重启nagios服务,问题解决。
! }/ A0 \) v/ q) o3 m+ A' |

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2017-12-14 11:54:48 | 显示全部楼层
还需要将cgi的文件由0修改为1;如下
4 u5 P' K: v6 f% V5 c/ B3 Z1 c4 \7 ause_authentication=1

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2017-12-14 11:57:36 | 显示全部楼层

; J6 u6 B7 i' ~) t( i% c2 h! G也可以借鉴背的地方的方法:添加一个当前设置的认证用户4 G) S4 `$ W, @
edit /usr/local/nagios/etc/cgi.cfg
: F( f& y+ A+ B8 Y" k  _  m& Q: [8 I1 V9 G' X$ ?
add username , without any space like this
$ j% \9 n* ^) S- y- ^
( P& G0 f2 h- E$ X7 G3 qauthorized_for_system_information=nagiosadmin,username,username2
  j/ ~+ U$ D; I, O如下修改的本次的结果:: ~( r9 |: V+ L9 m, I
3 o2 Q4 D! A; n# |
authorized_for_system_information=nagiosadmin,nagios   
. w. d& ^# x# x, f$ ?. k保存文档  重启nagios服务和httpd服务% A0 F6 Z7 @  ]* e! T  m
save file and restart nagios service using service nagios restart

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2017-12-14 11:58:35 | 显示全部楼层
或者使用添加一个另外的认证方式,加入一个新的认证文件即可:
) j1 B- E+ S1 y+ d( H& a+ v5 l8 q) NI have also faced the same issue and I solved running command9 m9 Y0 J! b$ x# R

" x- J+ x$ [* G3 K9 |9 Asudo htpasswd -b -c /usr/local/nagios/etc/htpasswd.users nagiosadmin nagiosadmin
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 03:02 , Processed in 0.016453 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表