Hi Octo,

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.
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 over
6 identifier instead of 1. I will do that.


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]
-- collectd - The system statistics collection daemon Website:
http://collectd.org [2] Google+: http://collectd.org/+ [3] Github:
https://github.com/collectd [4] Twitter: http://twitter.com/collectd [5]



Links:
------
[1] https://github.com/octo/collectd/tree/cf/mysql
[2] http://collectd.org
[3] http://collectd.org/+
[4] https://github.com/collectd
[5] http://twitter.com/collectd

_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd

Reply via email to