From: Marc Fournier Date: Tue, 27 Oct 2015 23:03:06 +0000 (+0100) Subject: Merge branch 'collectd-5.5' X-Git-Tag: collectd-5.6.0~589 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=5bf93412e903fb36943088e711031a013495ce11;hp=7bab45b57d6ef99ae55c499c51478dd63c3b1397;p=collectd.git Merge branch 'collectd-5.5' --- diff --git a/src/collectd-exec.pod b/src/collectd-exec.pod index 10f9f618..0e4cd53a 100644 --- a/src/collectd-exec.pod +++ b/src/collectd-exec.pod @@ -17,7 +17,7 @@ collectd-exec - Documentation of collectd's C =head1 DESCRIPTION -The C forks of an executable either to receive values or to +The C forks off an executable either to receive values or to dispatch notifications to the outside world. The syntax of the configuration is explained in L but summarized in the above synopsis. @@ -42,7 +42,7 @@ time and continuously write values to C. See L below for a description of the output format expected from these programs. -B If the executable only writes one value and then exits I will be +B If the executable only writes one value and then exits it will be executed every I seconds. If I is short (the default is 10 seconds) this may result in serious system load. diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 59247da0..3e43ca26 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -7758,7 +7758,7 @@ C. =item B B|B -If set the B, append the name of the I (DS) to the +If set to B, append the name of the I (DS) to the "service", i.e. the field that, together with the "host" field, uniquely identifies a metric in I. If set to B (the default), this is only done when there is more than one DS. diff --git a/src/write_redis.c b/src/write_redis.c index 7ba476c9..5560b4d1 100644 --- a/src/write_redis.c +++ b/src/write_redis.c @@ -68,7 +68,6 @@ static int wr_write (const data_set_t *ds, /* {{{ */ char *value_ptr; int status; redisReply *rr; - int i; status = FORMAT_VL (ident, sizeof (ident), vl); if (status != 0) @@ -81,39 +80,6 @@ static int wr_write (const data_set_t *ds, /* {{{ */ memset (value, 0, sizeof (value)); value_size = sizeof (value); value_ptr = &value[0]; - -#define APPEND(...) do { \ - status = snprintf (value_ptr, value_size, __VA_ARGS__); \ - if (((size_t) status) > value_size) \ - { \ - value_ptr += value_size; \ - value_size = 0; \ - } \ - else \ - { \ - value_ptr += status; \ - value_size -= status; \ - } \ -} while (0) - - APPEND ("%s:", time); - - for (i = 0; i < ds->ds_num; i++) - { - if (ds->ds[i].type == DS_TYPE_COUNTER) - APPEND ("%llu", vl->values[i].counter); - else if (ds->ds[i].type == DS_TYPE_GAUGE) - APPEND (GAUGE_FORMAT, vl->values[i].gauge); - else if (ds->ds[i].type == DS_TYPE_DERIVE) - APPEND ("%"PRIi64, vl->values[i].derive); - else if (ds->ds[i].type == DS_TYPE_ABSOLUTE) - APPEND ("%"PRIu64, vl->values[i].absolute); - else - assert (23 == 42); - } - -#undef APPEND - status = format_values (value_ptr, value_size, ds, vl, /* store rates = */ 0); pthread_mutex_lock (&node->lock); if (status != 0)