Page 1 of 2
Automatic logout
Posted: Mon Feb 05, 2018 12:05 pm
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
Re: Automatic logout
Posted: Mon Feb 05, 2018 12:15 pm
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.)
Increasing or decreasing this value specifies the session.
Re: Automatic logout
Posted: Mon Feb 05, 2018 12:34 pm
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.
Re: Automatic logout
Posted: Mon Feb 05, 2018 3:45 pm
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.
Re: Automatic logout
Posted: Mon Feb 05, 2018 4:17 pm
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.
Re: Automatic logout
Posted: Tue Feb 06, 2018 3:02 am
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
Re: Automatic logout
Posted: Tue Feb 06, 2018 12:41 pm
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
[email protected] to get a quote.
Re: Automatic logout
Posted: Tue Feb 06, 2018 4:26 pm
by eltrasimaco
OK, thank you.
Re: Automatic logout
Posted: Tue Feb 06, 2018 4:38 pm
by kyang
Did you have any more questions?
Re: Automatic logout
Posted: Thu Feb 08, 2018 2:40 am
by eltrasimaco
No, thanks