Data Extraction API

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
sync32
Posts: 4
Joined: Sat Mar 24, 2012 2:09 pm

Data Extraction API

Post by sync32 »

Hi,

I'm wondering if there is an API of any sort built in to Cacti. I'd like to have a PHP script running on another server which can query the Cacti server, ideally over HTTP, and retrieve some of the data on a specific host.

For example, I would use a link like this:-

Code: Select all

https://cacti.mynetwork.com/cacti/api.php?hostid=34
and get a result like this:-

Code: Select all

<CACTI>
  <DEVICE>
     <NAME="SERVER01">
     <HOSTNAME="192.168.0.23">
     <CURRENT="44.6">
     <AVAILABILITY="98.3">
  </DEVICE>
</CACTI>
Is anything like this already built in to Cacti? The output doesn't have to be XML, so long as I can deal with it from within another PHP script. I've searched the documentation but not had any success. If nothing already exists I'm going to attempt to implement something myself, I assume the best way to do this is through the plug-in architecture? Any pointers would be greatly appreciated!

Thanks,
Thomas
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Data Extraction API

Post by Howie »

Check out phalek's NMID plugins. I think one is a web API for his Android app.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests