[collectd] collectd write mysql plugin
Bastian Ballmann
bastian.ballmann at inf.ethz.ch
Mon Feb 25 16:19:55 CET 2013
Hi all,
why is the write_mysql plugin that can be found in branch
https://github.com/octo/collectd/tree/cf/mysql
not in the master branch?
Except that the sql file to create the database is not in sync with the
source code (i updated it see attached file) the plugin seems to work
perfectly.
Any reason for not using it / merging it officially into the master branch?
Thanks && have a nice day
Basti
--
ETH Zürich, Bastian Ballmann, IT Service Group
CAB E 44.1, Universitätsstrasse 6, CH-8092 Zürich
Tel +41 44 632 72 04
-------------- next part --------------
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `collectd` /*!40100 DEFAULT CHARACTER SET latin1 */;
grant all privileges on collectd.* to collectd at localhost identified by "collectd";
USE `collectd`;
DROP TABLE IF EXISTS `identifier`;
CREATE TABLE `identifier` (
`id` int(11) NOT NULL auto_increment,
`host` varchar(255) NOT NULL,
`plugin` varchar(255) NOT NULL,
`plugin_instance` varchar(255) NOT NULL,
`type` varchar(255) NOT NULL,
`type_instance` varchar(255) NOT NULL,
`data_source_name` varchar(255) NOT NULL,
`data_source_type` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `host` (`host`),
KEY `plugin` (`plugin`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `data`;
CREATE TABLE `data` (
`id` int(11) NOT NULL auto_increment,
`identifier_id` int(11) NOT NULL,
`timestamp` timestamp NOT NULL,
`value` double NOT NULL,
PRIMARY KEY (`id`),
KEY `timestamp` (`timestamp`),
KEY `identifier_id` (`identifier_id`),
CONSTRAINT `data_fk_ident` FOREIGN KEY (`identifier_id`) REFERENCES `identifier` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
More information about the collectd
mailing list