Nagios: It appears as though you do not have permission to view information for any of the hosts you requested…

You have to do configuration in cgi.cfg, my cgi.cfg is located in /usr/local/nagios/etc/cgi.cfg

The default user with permission to access is nagiosadmin, but my username is admin.

# SYSTEM/PROCESS INFORMATION ACCESS
# This option is a comma-delimited list of all usernames that
# have access to viewing the Nagios process information as
# provided by the Extended Information CGI (extinfo.cgi).  By
# default, *no one* has access to this unless you choose to
# not use authorization.  You may use an asterisk (*) to
# authorize any user who has authenticated to the web server.

authorized_for_system_information=nagiosadmin

# CONFIGURATION INFORMATION ACCESS
# This option is a comma-delimited list of all usernames that
# can view ALL configuration information (hosts, commands, etc).
# By default, users can only view configuration information
# for the hosts and services they are contacts for. You may use
# an asterisk (*) to authorize any user who has authenticated
# to the web server.

authorized_for_configuration_information=nagiosadmin

# SYSTEM/PROCESS COMMAND ACCESS
# This option is a comma-delimited list of all usernames that
# can issue shutdown and restart commands to Nagios via the
# command CGI (cmd.cgi).  Users in this list can also change
# the program mode to active or standby. By default, *no one*
# has access to this unless you choose to not use authorization.
# You may use an asterisk (*) to authorize any user who has
# authenticated to the web server.

authorized_for_system_commands=nagiosadmin

# 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.


authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin

# GLOBAL HOST/SERVICE COMMAND ACCESS
# These two options are comma-delimited lists of all usernames that
# can issue host or service related commands via the command
# CGI (cmd.cgi) for all hosts and services that are being monitored.
# By default, users can only issue commands 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.

authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin

Change all the parameters to the user you set to permit viewing.You can alternatively add user for authorization by using a comma after nagiosadmin.

Restart the nagios service after the cgi.cfg has been modified.

cyruslab@Nachos:/usr/local/nagios/sbin$ sudo service nagios restart
Running configuration check...done.
Stopping nagios: done.
Starting nagios: done.

You will have no problems henceforth with permission viewing:

Advertisements
This entry was posted in Network Maintenance and tagged , , . Bookmark the permalink.

4 Responses to Nagios: It appears as though you do not have permission to view information for any of the hosts you requested…

  1. Pingback: Abrão Ximenes | It appears as though you do not have permission to view the log file di Nagios3

  2. sriman says:

    thanks for the article

  3. Pingback: Nagios with Hiawatha and PHP-FPM 5.6 | Squirrel5 – Linux Systems Administration services

  4. Fulanoda Silva says:

    Thanks! It worked for me too!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s