ServiceGroup View Permission error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
wintland
Posts: 9
Joined: Mon Feb 20, 2012 9:52 am

ServiceGroup View Permission error

Post by wintland »

Hello,

CentOS 6.2 x64
Manual Install of XI
profile.txt file is attached to this post
yes, I have read the FAQ located at http://support.nagios.com/wiki/index.php/Nagios_XI:FAQs
Yes, I have googled extensively my problem.

The Problem: When trying to view any ServiceGroup view (summary, overview or grid) I am getting the following error message:
It appears as though you do not have permission to view information for any of the hosts 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.
The issue occurs even when logged in as the Nagiosadmin user. Here is what I have done so far to try to correct the problem:

1. Checked file permissions for files in /usr/local/nagios/etc; They all look like this:

-rw-rw-r-- 1 apache nagios 648 Mar 22 23:06 servicedependencies.cfg
-rw-rw-r-- 1 apache nagios 650 Mar 22 23:06 serviceescalations.cfg
-rw-rw-r-- 1 apache nagios 668 Mar 22 23:06 serviceextinfo.cfg
-rw-rw-r-- 1 apache nagios 1951 Mar 22 23:06 servicegroups.cfg
drwsrwsr-x. 2 apache nagios 4096 Mar 22 13:20 services
-rw-rw-r-- 1 apache nagios 9955 Mar 22 23:06 servicetemplates.cfg

2. I have run the NagiosXI-FixPerms.sh script, this did not help.

3. Checked permissions of /usr/local/nagios/bin; the directory permissions are as follows:

-rwxr-xr-x. 1 root root 40049 Mar 5 12:49 file2sock
-rwxr-xr-x. 1 root root 41775 Mar 5 12:49 log2ndo
-rwxrwxr--. 1 nagios nagios 619248 Mar 5 12:46 nagios
-rwxrwxr--. 1 nagios nagios 44064 Mar 5 12:46 nagiostats
-rwxr-xr-x. 1 root root 270434 Mar 5 12:49 ndo2db
-rwxr-xr-x. 1 root root 153992 Mar 5 12:49 ndomod.o
-rwxr-xr--. 1 nagios nagios 26400 Mar 5 12:49 npcd
-rwxr-xr--. 1 nagios nagios 13024 Mar 5 12:49 npcdmod.o
-rwxrwxr-x. 1 nagios nagios 119852 Mar 5 12:49 nrpe
-rwxr-xr-x. 1 root root 94455 Mar 5 12:50 nsca
-rwxr-xr-x. 1 root root 36165 Mar 5 12:49 sockdebug

4. Checked nagios.cfg and cgi.cfg files to ensure user has permissions to access services. I am also getting the same issue with nagiosadmin user so I dont think its that.


I have tried about 1000 other things as well, basically anything I could find on nagios and permissions problems. Please someone help me before I run my car off of an overpass in frustration!!!

-B
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: ServiceGroup View Permission error

Post by scottwilkerson »

Just to clarify, if you log in as the nagiosadmin user, verify you have the same problem, and then look at the following
Admin -> Manage Users -> Edit nagiosadmin

Tell me what is selected in "Security Settings"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
wintland
Posts: 9
Joined: Mon Feb 20, 2012 9:52 am

Re: ServiceGroup View Permission error

Post by wintland »

Thanks for your help Scott.

Here are the permissions for the nagiosadmin user. Interestingly, all of the other users have the boxes checked at the bottom. I went ahead and checked all of the empty boxes at the bottom for the nagiosadmin user but it still did not fix the issue.

Image
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: ServiceGroup View Permission error

Post by scottwilkerson »

Check the following
Configure -> Core Config Manager -> Advanced -> Nagios Core CGI Config
find the lins starting with

Code: Select all

authorized_for*
and make sure that nagiosadmin is listed for all of them

Then click save
Apply Configuration

Also, lets verify that /usr/local/nagios/etc/cgi.cfg has the following permissions

Code: Select all

ls -l /usr/local/nagios/etc/cgi.cfg
-rw-r--r-- 1 apache nagios   886 Mar 26 13:48 cgi.cfg
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
wintland
Posts: 9
Joined: Mon Feb 20, 2012 9:52 am

Re: ServiceGroup View Permission error

Post by wintland »

The nagiosadmin user is in all of the authorized group. Interestingly though, it is in each group at least twice...some groups it is listed 3 or 4 times. Could this be the result of cloning users within the user admin screen? More importantly, could this cause a problem?

Code: Select all

authorized_for_all_host_commands=nagiosadmin,nagiosadmin
authorized_for_all_hosts=nagiosadmin,nagiosadmin
authorized_for_all_service_commands=nagiosadmin,nagiosadmin
authorized_for_all_services=nagiosadmin,nagiosadmin
authorized_for_configuration_information=nagiosadmin,nagiosadmin
authorized_for_system_commands=nagiosadmin,nagiosadmin
authorized_for_system_information=nagiosadmin,nagiosadmin
default_statuswrl_layout=4
escape_html_tags=1
lock_author_names=1
main_config_file=/usr/local/nagios/etc/nagios.cfg
notes_url_target=_blank
physical_html_path=/usr/local/nagios/share
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
refresh_rate=90
show_context_help=0
url_html_path=/nagios
use_authentication=1
use_pending_states=1
use_ssl_authentication=0
The permissions of the cgi.cfg folder look correct:
-rw-r--r-- 1 apache nagios 1.7K Mar 26 13:21 cgi.cfg
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: ServiceGroup View Permission error

Post by lmiltchev »

Any apache errors in the log file?

Code: Select all

# tail /var/log/httpd/error_log
Be sure to check out our Knowledgebase for helpful articles and solutions!
wintland
Posts: 9
Joined: Mon Feb 20, 2012 9:52 am

Re: ServiceGroup View Permission error

Post by wintland »

The only thing in the apache logs is this:

Code: Select all

[Mon Mar 26 10:28:16 2012] [error] [client 10.10.1.22] PHP Notice:  Undefined variable: varr in /usr/local/nagiosxi/html/includes/components/latestalerts/latestalerts.inc.php on line 282, referer: http://10.100.17.17/nagiosxi/includes/components/latestalerts/
I opened up the full log and searched back to the beginning and there is nothing in the log except for a billion or two of the above error.

Thanks again for your help, I really appreciate the assist!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: ServiceGroup View Permission error

Post by scottwilkerson »

Can you login to the following address with your nagiosadmin account

Code: Select all

http://<YOUR_NAGIOS_IP>/nagios/
Note: this is not your normal XI URL
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
wintland
Posts: 9
Joined: Mon Feb 20, 2012 9:52 am

Re: ServiceGroup View Permission error

Post by wintland »

Yes, I can. And I have the same permissions issue on seeing service groups in the old school Nagios core interface. Even with the Nagiosadmin user.

Image
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: ServiceGroup View Permission error

Post by scottwilkerson »

Could you attach or send via PM your cgi.cfg file as well as your /etc/httpd/conf.d/nagios.conf

Thanks.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked