Spine Tee Data to Database/CSV or Other

Anything that you think should be in Cacti.

Moderators: Moderators, Developers

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

Spine Tee Data to Database/CSV or Other

#1 Post by anthonyhurst » Mon Jan 09, 2012 12:48 pm

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: 2786
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Spine Tee Data to Database/CSV or Other

#2 Post by cigamit » Mon Jan 09, 2012 1:10 pm

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

#3 Post by anthonyhurst » Mon Jan 09, 2012 5:45 pm

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: 2786
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Spine Tee Data to Database/CSV or Other

#4 Post by cigamit » Mon Jan 09, 2012 5:56 pm

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

#5 Post by anthonyhurst » Tue Jan 10, 2012 1:12 pm

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

Thanks,
Anthony

Post Reply