From: Florian Forster Date: Fri, 25 Jan 2013 22:05:30 +0000 (+0100) Subject: Merge branch 'collectd-5.1' into collectd-5.2 X-Git-Tag: collectd-5.2.1~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9b1d951382d05b688350d8a5f300c9936170f1aa;p=collectd.git Merge branch 'collectd-5.1' into collectd-5.2 Conflicts: ChangeLog src/write_graphite.c version-gen.sh --- 9b1d951382d05b688350d8a5f300c9936170f1aa diff --cc ChangeLog index d7dcbdf4,4e0439ac..6f0ae549 --- a/ChangeLog +++ b/ChangeLog @@@ -1,52 -1,21 +1,70 @@@ +2012-11-17, Version 5.2.0 + * collectd: The performance of the LISTVAL command has been improved. + Thanks to Yves Mettier for the patch. + * collectd: The possibility to configure the collection interval on a + per-plugin basis has been added. Huge thanks to Sebastian Harl for + his work. + * collectd-tg: This new binary allows to generate random but real + looking collectd network traffic. This can be used to load-test new + plugin, for example. + * libcollectdclient: Code for constructing and sending network packets + in the binary format has been added. + * aggregation plugin: This new plugin allows to aggregate multiple + value lists into one. + * amqp and write_http plugins: Meta data is now included in the JSON + output format. Thanks to Mark Wong for the patch. + * amqp plugin: Support for "Graphite" output has been added. Thanks to + Thomas Meson for the patch. + * contextswitch plugin: Support for AIX has been added. Thanks to + Manuel Rozada for his patch. + * disk plugin: The "UseBSDName" config option has been added to the + Mac OS X version. + * GenericJMX plugin: Automatically determine the host name if it isn't + configured. + * libvirt plugin: The "number" interface format has been added. Thanks + to "Davide Guerri" for the patch. + * memcached plugin: Support for multiple connections has been added. + Thanks to Nicolas Szalay for the patch. + * ntpd plugin: The "IncludeUnitID" config option has been added. The + behavior when a peer is unreachable has been improved. Thanks to + Johan Kiviniemi for the patches. + * oracle plugin: The "Host" config option has been added. + * pf plugin: This new plugin allows to collect statistics from BSD's + packet filter "pf". Thanks to Pierre-Yves Ritschard and Stefan Rinkes + for their work. + * postgresql plugin: The "Instance" config option has been added. + Support for writing values to a PostgreSQL database has been added. + Thanks to Sebastian Harl for the patches. + * processes plugin: Support for Solaris has been added. Thanks to + Cosmin Ioiart for the patch. + * redis plugin: Support for authenticating via password has been added. + Thanks to biancalana for the patch. + * rrdcached plugin: The "HeartBeat", "RRARows", "RRATimespan", + "StepSize" and "XFF" config options have been added. + * swap plugin: The "ReportBytes" config option has been added. The AIX + version now also exports "reserved" pages and swap-in / swap-out + "traffic". Thanks to Manuel Rozada for the patch. + * tcpconns plugin: Use a netlink socket rather than reading from /proc + for improved performance. Thanks to Michael Stapelberg for the patch. + + 2013-01-25, Version 5.1.2 + * Build system: "make distcheck" has been fixed. Thanks to Yves + Mettier for his patches. + * collectd: The complaint mechanism was fixed. It reported messages + more frequently than intended. + * dns plugin: Build issues on FreeBSD have been fixed. Thanks to + Ed Schouten for his patch. + * ethstat plugin: Fix the "Map" config option. An incorrectly used + character pointer may lead to a segmentation fault. + * network plugin: Build issues on FreeBSD have been fixed. Thanks to + Ed Schouten for his patch. + * varnish plugin: Fix a problem with instances without name. + * write_graphite: Improve reporting of connection errors to not spam + log files too much. Thanks to Pierre-Yves Ritschard for reporting + this problem. + * zfs_arc plugin: Fix the type used for mutex misses. Thanks to Yves + Mettier for reporting this bug. + 2012-11-11, Version 5.1.1 * collectd: Create new directories with mode 0777 and let umask remove unwanted permission bits. diff --cc src/write_graphite.c index 735283f5,a3bead39..87befb63 --- a/src/write_graphite.c +++ b/src/write_graphite.c @@@ -46,8 -46,8 +46,9 @@@ #include "configfile.h" #include "utils_cache.h" + #include "utils_complain.h" #include "utils_parse_option.h" +#include "utils_format_graphite.h" /* Folks without pthread will need to disable this plugin. */ #include @@@ -348,18 -523,40 +357,18 @@@ static int wg_write_messages (const dat return -1; } - for (i = 0; i < ds->ds_num; i++) - { - const char *ds_name = NULL; - - if (cb->always_append_ds || (ds->ds_num > 1)) - ds_name = ds->ds[i].name; - - /* Copy the identifier to `key' and escape it. */ - status = wg_format_name (key, sizeof (key), vl, cb, ds_name); - if (status != 0) - { - ERROR ("write_graphite plugin: error with format_name"); - return (status); - } - - escape_string (key, sizeof (key)); - /* Convert the values to an ASCII representation and put that into - * `values'. */ - status = wg_format_values (values, sizeof (values), i, ds, vl, - cb->store_rates); - if (status != 0) - { - ERROR ("write_graphite plugin: error with " - "wg_format_values"); - return (status); - } + memset (buffer, 0, sizeof (buffer)); + status = format_graphite (buffer, sizeof (buffer), ds, vl, + cb->prefix, cb->postfix, cb->escape_char, cb->format_flags); + if (status != 0) /* error message has been printed already. */ + return (status); - /* Send the message to graphite */ - status = wg_send_message (key, values, vl->time, cb); - if (status != 0) - { - /* An error message has already been printed. */ - return (status); - } ++ /* Send the message to graphite */ + wg_send_message (buffer, cb); + if (status != 0) + { - ERROR ("write_graphite plugin: wg_send_message failed " - "with status %i.", status); ++ /* An error message has already been printed. */ + return (status); } return (0); @@@ -432,9 -629,10 +441,10 @@@ static int wg_config_carbon (oconfig_it cb->prefix = NULL; cb->postfix = NULL; cb->escape_char = WG_DEFAULT_ESCAPE; - cb->store_rates = 1; + cb->format_flags = GRAPHITE_STORE_RATES; pthread_mutex_init (&cb->send_lock, /* attr = */ NULL); + C_COMPLAIN_INIT (&cb->init_complaint); for (i = 0; i < ci->children_num; i++) {