Nagios-새로운 사용자가 활성화 된 권한을 얻지 못함 시작하십시오. 그러나 nagios 웹

웹 전체의 가이드에서 간단한 단계를 따릅니다.

a) 명령을 통해 사용자를 Nagios에 추가 htpasswd htpasswd.users username

b) cgi.cfg 파일에서이 사용자를 라인에 추가하십시오.

authorized_for_system_information=nagiosadmin, username
authorized_for_configuration_information=nagiosadmin, username
authorized_for_system_commands=nagiosadmin, username
authorized_for_all_services=nagiosadmin, username
authorized_for_all_hosts=nagiosadmin, username
authorized_for_all_service_commands=nagiosadmin, username
authorized_for_all_host_commands=nagiosadmin, username

c) nagios3 서비스를 다시 시작하십시오. 심지어 apache2 서비스를 다시 시작하십시오.

그러나 nagios 웹 인터페이스에서 아무것도 나열하려고하면 여전히이 성가신 메시지가 표시됩니다.

It appears as though you do not have permission to view information for any of the services 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.

문제가 될 수있는 곳은 어디입니까?



답변

구성을 볼 수있는 권한 없음 에서 Nagios FAQ를 확인하십시오 .

설명 : “구성보기”를 클릭하면 다음과 같은 결과가 나타납니다. “” “요청한 구성 정보를 볼 수있는 권한이없는 것 같습니다 … 이것이 오류라고 생각되면 HTTP 서버 인증 요구 사항을 확인하십시오. 이 CGI에 액세스하고 CGI 구성 파일에서 인증 옵션을 확인하십시오. “” ”

해결 방법 : cgi.cfg에서 “authorized_for_configuration_information”을 설정해야합니다.

EL6 시스템에서 기본적으로 ‘authorized_for_configuration_information’은 ‘nagiosadmin’으로 설정되어 있습니다. 많은 사이트에서이를로 설정 authorized_for_configuration_information=*하여 문제를 해결합니다.

또한 HTTP 인증을 올바르게 사용하고 있는지 확인하십시오. http://nagios.sourceforge.net/docs/3_0/cgiauth.html을 참조 하십시오

CGI에서 인증 / 권한 부여 기능 활성화

다음으로해야 할 일은 CGI가 사용자가 액세스 할 수있는 정보 및 / 또는 명령을 결정할 때 인증 및 권한 부여 기능을 사용하도록 구성되어 있는지 확인하는 것입니다. CGI 구성 파일의 use_authentication 변수를 0이 아닌 값으로 설정하면됩니다. 예:

use_authentication = 1


답변

/usr/local/nagios/etc/cgi.cfg 편집

공백없이 username을 추가하십시오

authorized_for_system_information=nagiosadmin,username,username2

파일 저장 및 서비스 nagios restart를 사용하여 nagios 서비스 다시 시작


답변

  1. 터미널에서 :

    sudo htpasswd -c /etc/nagios/htpasswd.users new_user
        # set password for user "new_user"
    
  2. 터미널에서 :

    nano /usr/local/nagios/etc/cgi.cfg
    

    (cgi.cfg 파일에서이 섹션을 찾으십시오) :

    # GLOBAL HOST/SERVICE VIEW ACCESS
    # These two options are comma-delimited lists of all usernames that
    # can view information for all hosts and services that are being
    # monitored.  By default, users can only view information
    # for hosts or services that they are contacts for (unless you
    # you choose to not use authorization). You may use an asterisk (*)
    # to authorize any user who has authenticated to the web server.
    

    (줄 끝에 “new_user”사용자를 추가하십시오) :

    authorized_for_all_services=nagiosadmin,new_user
    authorized_for_all_hosts=nagiosadmin,new_user
    

    (나노 저장 및 종료)

  3. nagios 서비스를 다시 시작하십시오.

    sudo systemctl restart nagios.service
    

이제 “new_user”로 웹 페이지에 액세스하고 모든 개체를 모니터링 할 수 있습니다.


답변

나는 또한 같은 문제에 직면했고 명령 실행을 해결했다.

sudo htpasswd -b -c /usr/local/nagios/etc/htpasswd.users nagiosadmin nagiosadmin


답변

nagios 폴더의 cgi.cfg에서 아래 줄을 확인하십시오.

certified_for_all_services = nagiosadmin, noc authorized_for_all_hosts = nagiosadmin, noc


답변