Spine Tee Data to Database/CSV or Other

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
anthonyhurst
Posts: 11
Joined: Mon Jan 09, 2012 10:32 am
Contact:

Spine Tee Data to Database/CSV or Other

Post by anthonyhurst »

So, spine very efficiently populates the RRD files however I was wondering if it was possible to not only populate the RRDs necessary but also have spine pipe the data out to a CSV, Flat file format, or MySQL Database so that other applications can hook into this valuable data.

Are there any plugins to do this? If not are there any easy hacks to put into spine to at least get it to dump data to a CSV?

Thanks,
Anthony
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Spine Tee Data to Database/CSV or Other

Post by cigamit »

You can easily write a plugin for Cacti to do it. Thold, dsstats, boost all are examples of how to snag the data as its pulled.
anthonyhurst
Posts: 11
Joined: Mon Jan 09, 2012 10:32 am
Contact:

Re: Spine Tee Data to Database/CSV or Other

Post by anthonyhurst »

I'll look into it. If so that would be fantastic. I'll search for documentation on plugin development. Thanks again.

Anthony
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Spine Tee Data to Database/CSV or Other

Post by cigamit »

In particular, you are going to want to look into the poller_output hook.

Thold registers to use it here

Code: Select all

function plugin_thold_install () {
	// <SNIP>
	api_plugin_register_hook('thold', 'poller_output', 'thold_poller_output', 'includes/polling.php');
}
Which calls the function

Code: Select all

function thold_poller_output ($rrd_update_array) {
<SNIP>
}
All the data you need should be in $rrd_update_array, you will just have to parse out what you need. The data should come in small clumps (not one big glob).
anthonyhurst
Posts: 11
Joined: Mon Jan 09, 2012 10:32 am
Contact:

Re: Spine Tee Data to Database/CSV or Other

Post by anthonyhurst »

By the way your THOLD plugin looks great. I may tinker with that as well.

Thanks,
Anthony
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests