Page 1 of 1

Unable to access hostgroups, cgi.cfg

Posted: Mon Jun 09, 2014 6:10 pm
by FuriouS
I have 3 identicle Nagios servers. 2 of the 3 allow me to access hostgroups properly.

One of them says:
"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."
I have verified the cgi.cfg file, permissions of the file, and the /etc/httpd/conf.d/nagios.conf files are the same but the issue persists. I did a clean rebuild of the entire server and the issue persists. It's not SELinux related, I have disabled SELinux and the issue persisist.

For some reason the system is unable to allow nagiosadmin rights to the hostgroups. I can access everything else without issue. There is no help in the error logs even when set to debug levels.

cgi.cfg

Code: Select all

main_config_file=/usr/local/nagios/etc/nagios.cfg
physical_html_path=/usr/local/nagios/share
url_html_path=/nagios
show_context_help=0
use_pending_states=1
use_authentication=1
use_ssl_authentication=0
authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin,readonly
authorized_for_all_hosts=nagiosadmin,readonly
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin
authorized_for_read_only=readonly
default_statusmap_layout=5
default_statuswrl_layout=4
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
refresh_rate=90
result_limit=100
escape_html_tags=1
action_url_target=_blank
notes_url_target=_blank
lock_author_names=1
navbar_search_for_addresses=1
navbar_search_for_aliases=1
Anyone with any suggestions on this, please help.

Re: Unable to access hostgroups, cgi.cfg

Posted: Tue Jun 10, 2014 1:40 pm
by abrist
Stop, kill, and restart all the relevant service just to be sure.

Code: Select all

service httpd stop
service nagios stop
killall nagios
killall httpd
ps -aef | grep "httpd\|nagios.cfg"
service nagios start
service httpd start
Now try to browse to one of the those cgis. When it fails, post a tail of the httpd error and access logs:

Code: Select all

tail -25 /var/log/httpd/error_log
tail -25 /var/log/httpd/access_log 

Re: Unable to access hostgroups, cgi.cfg

Posted: Thu Jul 24, 2014 6:39 am
by lokir
Hi,

I would like to join with same problem. Nagios 3.5.1 on Centos 6.5 installed via yum. Everything it working perfectly apart of hostgroups. I like to add pretty os pictures to host groups and also be able to view my host groups. I have 2 Nagios servers 1st very old on Debian 6 working like a charm (hostgroups included). But on my new Nagios server im getting this:

Service Overview For All Host Groups

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.


I have spend quite some time googling with no success. All permissions are correct, selinux is off. Nagios is working in all other aspects apart of host groups.

Please advise.

Best Regards
Lokir

Re: Unable to access hostgroups, cgi.cfg

Posted: Thu Jul 24, 2014 11:40 am
by lokir
Hi,

I found reason of my problem.

For some reason hostgroup.cfg was ignored by nagios when located in /etc/nagios/object I have moved file to /etc/nagios/conf.d and problem is solved.


Thank You.
Lokir