[collectd] New plugin for collectd : write_mysql
collectd at feraudet.com
Tue Mar 20 14:39:28 CET 2012
> 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 , to track development of this
> plugin. I intend to do the following changes in the next couple of
> * 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
I just started to work on this thing using mysql.c and write_mongodb.c
as example. I will pull it soon.
> * 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.
I'm not sure to understand all statement usage, needn't we to bind data
each time it change ?
> * 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.
Your'e right, especially when a REPLACE is made cause tests are made
6 identifier instead of 1. I will do that.
> If you'd like to work on some of those things, you're very welcome!
> please let me know so we don't duplicate work.
> Best regards,
> 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!
> -- collectd - The system statistics collection daemon Website:
> http://collectd.org  Google+: http://collectd.org/+  Github:
> https://github.com/collectd  Twitter: http://twitter.com/collectd
More information about the collectd