Automatic logout

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

Automatic logout

Post by eltrasimaco »

Hi, I was looking for some method by what, entering a nagiosxi URL in the browser, performs an autologout. I have seen the "logout" button in nagiosxi , but that doesn't work for me, because it adds a "&nsp=XXXXX" token or something, which changes between sessions. I tried to read the login.php file with no results.
Any solution for this?
Thanks in advance
kyang

Re: Automatic logout

Post by kyang »

Could you try to tell me what you are trying to accomplish? Something to auto logout the user when typing it in the URL?

The auto logout option is based on time in the /etc/php.ini file.

Under this option. (This value is in seconds.)

Code: Select all

session.gc_maxlifetime = 1440
Increasing or decreasing this value specifies the session.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Automatic logout

Post by npolovenko »

@eltrasimaco, There's not really a simple way to do this, other than what @kyang suggested. You could use some automated software solution that would grab the log out link + the &nsp part each time and pass it to your script.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

Re: Automatic logout

Post by eltrasimaco »

I need this because I have a menu; the default option must go straight to the nagiosxi default entry (with the guest account), and the other option (the logout one) is where the user must autenthicate with his own user and password
Example:
1.- log to nagios with guest user
2.- log to nagios with your own user

So, to go to the 2nd option, one should first log in (as guest, the default login method), press the "logout" button, and write his name and password. I was looking for a more, say, "straight" way to do this.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Automatic logout

Post by npolovenko »

@eltrasimaco, I know that many browsers support "anonymous mode", basically when a browser doesn't remember cookies or site data. So if you open XI guest user in anonymous mode, and then just open another anonymous tab you'll be prompted with a login page again. I'm not sure how your menu is set up, whether it's a program that opens a web browser or whether its a website, but this may be a way to do it.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

Re: Automatic logout

Post by eltrasimaco »

Thanks, the problem with incognito mode is that, although it doesn't keep cookies, when you go to the nagios web page, you get in as the "guest" user (which is necessary), but i'm trying to find an alternate method from which, by means of inserting something in the url, you get the login/password page.
In short: option 1=don't ask for user, standard login as guest; option 2=Ask for login user & password
kyang

Re: Automatic logout

Post by kyang »

This for sure doesn't seem like something we have out of the box.

Or something that isn't implemented and falls under custom development.

We do offer custom development for these types of things. If you are interested you can contact our Sales department at sales@nagios.com to get a quote.
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

Re: Automatic logout

Post by eltrasimaco »

OK, thank you.
kyang

Re: Automatic logout

Post by kyang »

Did you have any more questions?
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

Re: Automatic logout

Post by eltrasimaco »

No, thanks
Locked