Page 1 of 1
Pass credentials to Nagios XI
Posted: Tue Dec 01, 2015 6:31 am
by goger
Hello.
I'm planning to communicate between Nagios XI and another software by different ways
For this, I need this other software to login to Nagios XI with the current user that it uses.
For example :
On the software, a href link to nagios XI with args (username, password...) to avoid the user entering again its credentials.
Is it possible ?
I saw some $SESSION variables like username, password but I saw other variables too like TOKEN.
Thanks.
Re: Pass credentials to Nagios XI
Posted: Tue Dec 01, 2015 10:28 am
by rkennedy
Once logged in, what are you attempting to have the link do?
The reason I ask is because we have an API built, and there may be a better route then this already.
Re: Pass credentials to Nagios XI
Posted: Tue Dec 01, 2015 10:33 am
by goger
Well, once logged in, the user should have access to everything that he can.
To be clear, I have a user logged in ODOO (an ERP frontend). In this, we add a link in the menu "go to supervision" which lands on /nagiosxi
But I want to avoid the user to log in again.
He's already logged in Odoo, I don't want the user to enter its credentials again in Nagios to access its own dashboard and views
Re: Pass credentials to Nagios XI
Posted: Tue Dec 01, 2015 12:39 pm
by rkennedy
Thanks for the clarification. Yes - this is possible.
Here's an example of how it would work -
http://nagios/nagiosxi/?username=userto ... apikeyhere
Replace 'usertologinas' with their username, and 'apikeyhere' with the API key associated with that user.
Re: Pass credentials to Nagios XI
Posted: Wed Dec 02, 2015 4:16 am
by goger
Thanks a lot for the help !
What do you call the "API key" ? Do you refer to the "backend_ticket" field in the database ? Because it's working with it. Is there any documentation on this field ?
Re: Pass credentials to Nagios XI
Posted: Wed Dec 02, 2015 10:16 am
by scottwilkerson
goger wrote:Thanks a lot for the help !
What do you call the "API key" ? Do you refer to the "backend_ticket" field in the database ? Because it's working with it. Is there any documentation on this field ?
Yes, the "backend_ticket" is being transitioned to "API key" in newer versions