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.
Help with Performance graphs with Backend API
-
- Posts: 23
- Joined: Wed Sep 21, 2011 10:59 am
-
- Posts: 4380
- Joined: Mon Jun 14, 2010 10:21 am
Re: Help with Performance graphs with Backend API
You *should* be able to access a graph image directly by using the initial URL that you posted:
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.http:// mynagiosserver/nagiosxi/includes/components/perfdata/graphApi.php?host=RHBUILD64&service=CHECK_CPU&source=2&view=1&start=&end=&rand=1339785888
-
- Posts: 23
- Joined: Wed Sep 21, 2011 10:59 am
Re: Help with Performance graphs with Backend API
Ah! I over complicated it. That worked! Thanks.