401 error with Nagstamon after loggin into CCM

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
skunkbag
Posts: 2
Joined: Wed Aug 14, 2013 2:02 am

401 error with Nagstamon after loggin into CCM

Post by skunkbag »

When user nagiosadmin logs into CCM of NagiosXI 5.x , Nagstamon breaks and throws a 401 error.
This is when NagiosXI is configured with SSL.
This error is already described here, but with no solution:
https://support.nagios.com/forum/viewto ... =18&t=2820

To my experience this is the fix:

Create a NEW admin user in NagiosXI Gui. : ie: nagstamon

Set Htaccess for nagios and nagiosxi with this new made nagstamon user:

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagstamon
htpasswd -c /usr/local/nagiosxi/etc/htpasswd.users nagstamon


Use this nagstamon user in the Nagstamon application.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: 401 error with Nagstamon after loggin into CCM

Post by tmcdonald »

Just to get this out of the way, Nagstamon is not something we wrote so we can't really guarantee it will work.

My guess is it has not been updated to work with the latest version of Core/XI that is running in your environment, however the last thread on this matter is from quite a while ago, so that would seem to counter my thoughts.

What do you get for 401 errors in your /var/log/httpd/error_log after Nagstamon 401s?
Former Nagios employee
skunkbag
Posts: 2
Joined: Wed Aug 14, 2013 2:02 am

Re: 401 error with Nagstamon after loggin into CCM

Post by skunkbag »

[error] [client xxx;xxx;xxx;xxx] user nagiosadmin: authentication failure for "/nagios/cgi-bin/status.cgi": Password Mismatch

This is the error, but the password is correct.. In Nagstamon you have the possibility to go straight to the nagiosxi homepage with a rightclick.
And that works, so the pass given in the nagstammon settings are correct.
The way back to fix it was to reset the htaccess nagiosadmin pass and log out of ccm nagiosxi.
As soon as you log back into CCM with nagiosadmin -> NAGSTAMON gives 401 error.

This happens only when nagstamon is accessing the nagiosxi server in SSL mode. In http everything keeps on working.


I just wanted to share a possible solution for this particular problem with Nagtstamon, since there is no much info on the net about it.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: 401 error with Nagstamon after loggin into CCM

Post by tmcdonald »

Glad it's working, and thanks for the tip!

And yea, we don't get a lot of questions about it, and even when we do we can't say much since we don't develop it, but it's always nice to see community-driven projects serving a purpose!

I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked