Help with Performance graphs with Backend API

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cloberjewels
Posts: 23
Joined: Wed Sep 21, 2011 10:59 am

Help with Performance graphs with Backend API

Post by cloberjewels »

Hi,

I'd like to be able to use the Nagios XI Backend API to pull specific performance graphs.

Something like this url:
http:// mynagiosserver/nagiosxi/includes/components/perfdata/graphApi.php?host=RHBUILD64&service=CHECK_CPU&source=2&view=1&start=&end=&rand=1339785888

When I use that url:
http:// mynagiosserver/nagiosxi/backend/?cmd=pnpproxy&username=images&ticket=myticket&url=http://mynagiosserver/nagiosxi/includes ... 1339785888

It says I'm not logged in.

A previous TOPIC (http://support.nagios.com/forum/viewtop ... api#p13707) mentions that it is possible to pull performance graphs through the Backend API but no details as to how.

Other APIs are working such as getusers, getsysstat, etc... all work fine so I believe I have it configured properly.

Thanks for any help.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Help with Performance graphs with Backend API

Post by mguthrie »

You *should* be able to access a graph image directly by using the initial URL that you posted:
http:// mynagiosserver/nagiosxi/includes/components/perfdata/graphApi.php?host=RHBUILD64&service=CHECK_CPU&source=2&view=1&start=&end=&rand=1339785888
and then adding just adding the "username=<myUsername>&ticket=<myTicket>" to the end of it. The "Backend API URL" component can give you the backend ticket for the user you're requesting it for.
cloberjewels
Posts: 23
Joined: Wed Sep 21, 2011 10:59 am

Re: Help with Performance graphs with Backend API

Post by cloberjewels »

Ah! I over complicated it. That worked! Thanks.