Not able to select "Host/Service Status Totals".

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
danjoh
Posts: 73
Joined: Mon Dec 07, 2015 10:43 am
Location: Zürich, Switzerland
Contact:

Not able to select "Host/Service Status Totals".

Post by danjoh »

After searching for a host - the host and it's services shows up correctly.
If I now select one of the "topics" in either "Host Status Totals" or "Service Status Totals" at the top of the page I only get the following:
"It appears as though you do not have permission to view information for any of the hosts you requested..."

If I, instead of searching, select "Hosts" and then click on "View Service Details For This Host". I I then select one of the "topics", E.g. "All Problems" under "Service Status Total", everything works as expected.

I am logged in with my user "dajoha" (ldap authenticated) which has "superuser" rights in cgi.cfg

Code: Select all

# egrep -v "^(#|$)" cgi.cfg 
main_config_file=/etc/nagios/nagios.cfg
physical_html_path=/usr/share/nagios/html
url_html_path=/nagios
show_context_help=0
use_pending_states=1
use_authentication=1
use_ssl_authentication=0
authorized_for_system_information=nagios,dajoha
authorized_for_configuration_information=nagios,dajoha
authorized_for_system_commands=nagios,dajoha
authorized_for_all_services=nagios,dajoha
authorized_for_all_hosts=nagios,dajoha
authorized_for_all_service_commands=nagios,dajoha
authorized_for_all_host_commands=nagios,dajoha
default_statusmap_layout=6
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
This is on a Nagios 4.2.4 installation (compiled from source) on a RHEL 7.3 server.

Any suggestions on what I could have done wrong?
--
D/\N
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Not able to select "Host/Service Status Totals".

Post by rkennedy »

What integration are you using for the LDAP side of things? This could be affecting the name you're logged in as perhaps.

Are you experiencing the same thing with the nagios user as well? (is that a non-LDAP account?)
Former Nagios Employee
danjoh
Posts: 73
Joined: Mon Dec 07, 2015 10:43 am
Location: Zürich, Switzerland
Contact:

Re: Not able to select "Host/Service Status Totals".

Post by danjoh »

This is the code that I have in place for the LDAP auth in apache (redacted) for both "sections" (../nagios/cgi-bin/ and ../nagios/html):

AuthName "Nagios Access"
AuthType Basic
AuthBasicProvider file ldap
AuthUserFile /etc/nagios/passwd
AuthLDAPURL "ldaps://somehost.uzh.ch/ou=my_ou,dc=uzh,dc=ch"
AuthLDAPBindDN "cn=my_cn,ou=my_ou,dc=uzh,dc=ch"
AuthLDAPBindPassword "MyPassword"


Have I missed some configuration option that has to be set in Nagios?

Logging in with the user nagios (which is not in LDAP, but in the passwd file) everything works OK.

In both cases the CGI shows the correct "Logged in as".
--
D/\N
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Not able to select "Host/Service Status Totals".

Post by tgriep »

Check the permission of the status.cgi script to see if it is setup to be executable for the nagios user and group.
On a default system, it can be found in this folder.

Code: Select all

/usr/local/nagios/sbin
Be sure to check out our Knowledgebase for helpful articles and solutions!
danjoh
Posts: 73
Joined: Mon Dec 07, 2015 10:43 am
Location: Zürich, Switzerland
Contact:

Re: Not able to select "Host/Service Status Totals".

Post by danjoh »

Yes it is executable (by all):

# ll /usr/lib64/nagios/cgi-bin/status.cgi
-rwxrwxr-x 1 root root 336120 Dec 12 13:58 /usr/lib64/nagios/cgi-bin/status.cgi


As are all other CGI-scripts in that directory:
# ll /usr/lib64/nagios/cgi-bin
total 5532
-rwxrwxr-x 1 root root 351824 Dec 12 13:58 archivejson.cgi
-rwxrwxr-x 1 root root 319848 Dec 12 13:58 avail.cgi
-rwxrwxr-x 1 root root 313768 Dec 12 13:58 cmd.cgi
-rwxrwxr-x 1 root root 290848 Dec 12 13:58 config.cgi
-rwxrwxr-x 1 root root 19600 Dec 12 13:58 daemonchk.cgi
-rwxrwxr-x 1 root root 331776 Dec 12 13:58 extinfo.cgi
-rwxrwxr-x 1 root root 282600 Dec 12 13:58 histogram.cgi
-rwxrwxr-x 1 root root 257920 Dec 12 13:58 history.cgi
-rwxrwxr-x 1 root root 257880 Dec 12 13:58 notifications.cgi
-rwxrwxr-x 1 root root 353376 Dec 12 13:58 objectjson.cgi
-rwxrwxr-x 1 root root 249752 Dec 12 13:58 outages.cgi
-rwxrwxr-x 1 root root 253792 Dec 12 13:58 showlog.cgi
-rwxrwxr-x 1 root root 336120 Dec 12 13:58 status.cgi
-rwxrwxr-x 1 root root 351144 Dec 12 13:58 statusjson.cgi
-rwxrwxr-x 1 root root 278848 Dec 12 13:58 statusmap.cgi
-rwxrwxr-x 1 root root 274472 Dec 12 13:58 statuswml.cgi
-rwxrwxr-x 1 root root 258080 Dec 12 13:58 statuswrl.cgi
-rwxrwxr-x 1 root root 278664 Dec 12 13:58 summary.cgi
-rwxrwxr-x 1 root root 270336 Dec 12 13:58 tac.cgi
-rwxrwxr-x 1 root root 5336 Dec 12 13:58 traceroute.cgi
-rwxrwxr-x 1 root root 286792 Dec 12 13:58 trends.cgi
--
D/\N
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Not able to select "Host/Service Status Totals".

Post by tgriep »

Does the server have selinux enabled? If so, disable it and see if that fixes the issue.

Another thing to try is to look at the Apache log files by running the following as root.
tail -f /var/log/httpd/*_log
Then generate the error in the Nagios GUI and hopefully the error is caught by the tail command.
Post the output of the tail command here so we can view it for errors.
Be sure to check out our Knowledgebase for helpful articles and solutions!
danjoh
Posts: 73
Joined: Mon Dec 07, 2015 10:43 am
Location: Zürich, Switzerland
Contact:

Re: Not able to select "Host/Service Status Totals".

Post by danjoh »

In preparation of providing the log-files I stopped apache, "cleaned" the logfiles and rebooted the server.
After this everything works as expected :), must have been some "leftover" from my experimentation ...
I am really sorry for the noise.
This thread can now be closed.

Regards,
--
D/\N
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Not able to select "Host/Service Status Totals".

Post by rkennedy »

Thanks for letting us know!

Will go ahead and close this one up. Feel free to make a new thread if you have questions in the future!
Former Nagios Employee
Locked