Hello Nagios Support,
Some colleagues of mine are working to integrate OpsGenie with Nagios XI. The XI integration for OpsGenie is written to use the old backend-ticket authentication to perform actions on the Nagios XI server. We're having trouble with this... A couple of examples:
1. Starting at a low level - This example URL works in a web browser, but not when run through a script or simply by curl on the command line:
https://<nagios_server>/nagiosxi/index.php?username=<username>&ticket=<insecure login ticket>
When run in curl or through a script, we always get the message, "Your session has timed out".
2. Going deeper -- OpsGenie integration is trying to execute a command like this in a script:
https://<nagios_server>/nagiosxi/includes/components/nagioscore/ui/trends.php?createimage&host=<hostname>&username=<username>&ticket=<insecure login ticket>
This only works in a web browser - and only if we are logged into Nagios XI (as any user). It will not work if we are not logged in, and will not work on command line. Failures result in the same "Your session has timed out" message.
Are these conditions by chance a bug? Or is it something more likely like browser session cookies not being handed off correctly?
Is there anything we can do to work around these issues?
Thanks,
-marc
Help with insecure login / backend ticket authentication.
Re: Help with insecure login / backend ticket authentication
This is because we are no longer updating the old backend component because it has been deprecated for a while now (See Admin > Manage Components > Backend API URL) and the auth system has changed, OpsGenie will need to update their utility to use the new API or utilize auth tokens.
The only way to get it to work would be use to utilize auth tokens:
For example:
The only way to get it to work would be use to utilize auth tokens:
Code: Select all
http:/YOURXISERVER//nagiosxi/help/auth-token-reference.php
Code: Select all
curl -XPOST -k -L 'http://YOURXISERVER/nagiosxi/api/v1/authenticate?pretty=1' -d 'username=nagiosadmin&password=YOURPASS&valid_min=5'
curl -k -L 'http://YOURXISERVER/nagiosxi/includes/components/nagioscore/ui/trends.php?createimage&host=localhost&token=TOKEN' > image.png
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Help with insecure login / backend ticket authentication
No problem.yo_marc wrote:Thank you!!
May we lock the thread?
Re: Help with insecure login / backend ticket authentication
Certainly - Thanks for checking.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Help with insecure login / backend ticket authentication
Great!yo_marc wrote:Certainly - Thanks for checking.
Locking thread