Page 1 of 1

Authentication Required on Nagios Mobile not working

PostPosted: Thu Jun 25, 2015 9:44 am
by mvargas
Version of Nagio XI 2014R2.7
CentOS 6.6
64bit
VMware Image

I have installed Nagios Mobile as outlined in the following article with no failures during the each step of the process. The article I refer to is: https://assets.nagios.com/downloads/exchange/nagiosmobile/Installing_Nagios_Mobile.pdf

When I go to http://nagios.xxxx.edu/nagiosmobile I am prompted with Authentication Required. I input my regular Nagios credentials for User Name: and Password: but it returns me right back to the Authentication Required dialogue box.

I get Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials or your browser doesn't understand how to supply the credentials required.

Apache/2.2.15 (CentOS) Server at nagios.xxxx.edu Port 80

I am using a Galaxy S5 phone with Chrome installed.

Intrestingly enough if I go on my phone to just http://nagios.xxxx.edu I get right to my Nagios Welcome page and I proceed to the login page I can authenticate with my credentials and view the standard GUI.

Has anyone ran into this issue or know of some possible leads on getting my credentials to work in nagiosmobile?

Thank you in advance.

Mike

Re: Authentication Required on Nagios Mobile not working

PostPosted: Thu Jun 25, 2015 10:23 am
by jolson
A good starting point would be to take a look at your apache logs.

First, attempt to log in via Nagios Mobile.

Next, check your logs:

Code: Select all
tail -n20 /var/log/httpd/error_log
tail -n20 /var/log/httpd/access_log

Re: Authentication Required on Nagios Mobile not working

PostPosted: Thu Jun 25, 2015 3:02 pm
by mvargas
My output:

[root@monitor01 ~]# tail -n20 /var/log/httpd/error_log
[Thu Jun 25 14:57:42 2015] [error] [client ::1] PHP Notice: include_once(): 1. h->opened_path=[/usr/local/nagiosxi/html/includes/components/xicore/dashlets-status.inc.php] h->filename=[/usr/local/nagiosxi/html/includes/components/xicore/dashlets-status.inc.php]\n in /usr/local/nagiosxi/html/includes/components/xicore/dashlets.inc.php on line 14
[Thu Jun 25 14:57:42 2015] [error] [client ::1] PHP Notice: include_once(): apc_cache_find [360771]\n in /usr/local/nagiosxi/html/includes/components/xicore/dashlets.inc.php on line 14


[root@monitor01 ~]# tail -n20 /var/log/httpd/access_log
172.16.1.39 - - [25/Jun/2015:14:58:16 -0500] "GET /nagiosxi/includes/components/nocscreen/nocscreenapi.php?summary=true HTTP/1.1" 200 27 "http://172.16.0.16/nagiosxi/includes/components/nocscreen/noc.php" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36"

On the access_log it's hitting an internal IP in bold. How do I change httpd to access the outside IP instead?

Re: Authentication Required on Nagios Mobile not working

PostPosted: Thu Jun 25, 2015 4:31 pm
by tgriep
FYI, Nagios Mobile is enabled on Nagios XI by default for a while so the document needs to reflect that it isn't needed anymore for the new versions. It was added in this version 2012RC2 - 09/04/2012.

Could you post the nagiosmobile_apache.conf and the nagiosmobile.conf files from the /etc/httpd/conf.d folder?

Re: Authentication Required on Nagios Mobile not working

PostPosted: Fri Jun 26, 2015 9:42 am
by mvargas
Here are the nagiosmobile_apache.conf and the nagiosmobile.conf files as requested:

Re: Authentication Required on Nagios Mobile not working

PostPosted: Fri Jun 26, 2015 12:36 pm
by tgriep
Remove the nagiosmobile_apache.conf file from the system and restart apache and see if the issue is resolved.
Code: Select all
service httpd restart