How can I access the availability reports or SLA reports programmatically from outside the nagios server.
It seems that the JSON API's are missing this.
The sessions cookie 'nagiosxi' are preventing me ( naturally). Is there a way around ?
BR,
Reidar
Get access to Reports ( SLA ) from external system
Re: Get access to Reports ( SLA ) from external system
You can use the backend ticket, which will log you in. However, your session will remain open until you log out when using this.
Got to Admin > Manage Components > Backend API URL > select the user you want the backend ticket for and click "Apply Settings"
You will get a page with a bunch of URLS. The way to authenticate is shown in the GET variables: ?cmd=gethoststatus&username=<username>&ticket=<ticket>
You must have both the username and ticket passed to be able to authenticate. Treat the ticket like a password though since it can authenticate you to your system.
Got to Admin > Manage Components > Backend API URL > select the user you want the backend ticket for and click "Apply Settings"
You will get a page with a bunch of URLS. The way to authenticate is shown in the GET variables: ?cmd=gethoststatus&username=<username>&ticket=<ticket>
You must have both the username and ticket passed to be able to authenticate. Treat the ticket like a password though since it can authenticate you to your system.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Get access to Reports ( SLA ) from external system
Thank you for the attention 
I use the latest nagiosxi version and in the Backend APU URL it show me this: : Deprecated API This feature is now deprecated. Please use the new REST API that is documented here.
And I have used the standard REST JSON objects. But they dont give me what I need. I need reports.
BR, Reidar
I use the latest nagiosxi version and in the Backend APU URL it show me this: : Deprecated API This feature is now deprecated. Please use the new REST API that is documented here.
And I have used the standard REST JSON objects. But they dont give me what I need. I need reports.
BR, Reidar
Re: Get access to Reports ( SLA ) from external system
The authentication method (username & ticket combo) is not being removed, it's just that those endpoints that use the "backend" URL will eventually be removed in some later version of Nagios XI.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Get access to Reports ( SLA ) from external system
I have created a user. But in the Backend API URL page the dropdown does not list any user at all. Does this mean that the function is depreaciated ?
Re: Get access to Reports ( SLA ) from external system
Thank you. I found the backend ticket in the database for the user.
Re: Get access to Reports ( SLA ) from external system
Awesome, are we good to mark this thread as resolved?
Former Nagios Employee
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: Get access to Reports ( SLA ) from external system
Glad your issue is resolved, thanks for using the Nagios forums. Please start a new thread if you have future issues.
Previous Nagios employee