[collectd] New plugin for collectd : write_mysql
Cyril Feraudet
collectd at feraudet.com
Sun Feb 19 21:11:45 CET 2012
On 19 févr. 2012, at 12:09, Florian Forster wrote:
> Hi Cyril,
>
> On Tue, Feb 14, 2012 at 11:54:01AM +0200, Cyril Feraudet wrote:
>> Here the write_mysql output plugin patch (from 5.0.2) with
>> modifications suggested by Octo.
>
> thank you very much for your patch!
>
> I've created the "cf/mysql" branch [0], to track development of this
> plugin. I intend to do the following changes in the next couple of
> weeks:
>
> * Move settins into a struct and pass it to the write function as a
> user data pointer. This way we can write to multiple databases at
> once.
> * Provide scrap space (most likely a struct) and do the statement
> binding _once_. I don't think that binding is an expensive
> operation, but it's annoying to go through this over and over again.
> * Change the schema to have one "data" table and an "identifier"
> table. Currently, the identifier is spread over the "host",
> "plugin", "type" _and_ "data" tables, which is sub-optimal IMHO.
>
> If you'd like to work on some of those things, you're very welcome! Just
> please let me know so we don't duplicate work.
>
> Best regards,
> —octo
>
> P.S.: I've split out the "use mysql-config --lib_r" part and put that
> into the collectd-4.10 branch. It's included in the 4.10.6
> release. Thanks for spotting this!
>
> [0] <https://github.com/octo/collectd/tree/cf/mysql>
Hi Octo,
Thank you for having taken the time to read my patch.
As you can see, I'm not an expert in C. Your help makes me progress a lot.
I will look into DBI plugin to execute your first asking and to transform write_mysql to
write_dbi.
Actually I work in part time to develop a frontend (soon published in GPL) to
Collectd. The rest of my time, I maintain a very large park of Unix server using
Collectd for watching performance and doing post mortem analyze.
So, most of my work turn around Collectd. I think I will have a look to the roadmap,
especially to the item: "RRDTOOL plugin Type-Specific configuration".
Best Regards,
Cyril
More information about the collectd
mailing list