Get access to Reports ( SLA ) from external system

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
reidara
Posts: 9
Joined: Thu Oct 06, 2016 8:12 am

Get access to Reports ( SLA ) from external system

Post by reidara »

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
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Get access to Reports ( SLA ) from external system

Post by jomann »

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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
reidara
Posts: 9
Joined: Thu Oct 06, 2016 8:12 am

Re: Get access to Reports ( SLA ) from external system

Post by reidara »

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
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Get access to Reports ( SLA ) from external system

Post by jomann »

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.
reidara
Posts: 9
Joined: Thu Oct 06, 2016 8:12 am

Re: Get access to Reports ( SLA ) from external system

Post by reidara »

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 ?
reidara
Posts: 9
Joined: Thu Oct 06, 2016 8:12 am

Re: Get access to Reports ( SLA ) from external system

Post by reidara »

Thank you. I found the backend ticket in the database for the user.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Get access to Reports ( SLA ) from external system

Post by rkennedy »

Awesome, are we good to mark this thread as resolved?
Former Nagios Employee
reidara
Posts: 9
Joined: Thu Oct 06, 2016 8:12 am

Re: Get access to Reports ( SLA ) from external system

Post by reidara »

Yepp ;-) :D
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Get access to Reports ( SLA ) from external system

Post by avandemore »

Glad your issue is resolved, thanks for using the Nagios forums. Please start a new thread if you have future issues.
Previous Nagios employee
Locked