summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f97a020)
raw | patch | inline | side by side (parent: f97a020)
author | Florian Forster <octo@collectd.org> | |
Fri, 18 Jan 2013 10:55:53 +0000 (11:55 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 18 Jan 2013 10:55:53 +0000 (11:55 +0100) |
src/collectd.conf.in | patch | blob | history | |
src/collectd.conf.pod | patch | blob | history | |
src/write_riemann.c | patch | blob | history |
diff --git a/src/collectd.conf.in b/src/collectd.conf.in
index d2cf950ba95e12a96c22bdd74b9b5ab9f9a18c68..31dce556d10d4ae308b820c7890a1d7a357254ea 100644 (file)
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
# Host "localhost">
# Port 5555
# StoreRates true
-# Delay 1
# </Node>
# Tag "foobar"
#</Plugin>
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index 904f18624f8834eece0597f61fa165fa2523a2d2..6afd0b0e4a7639285587e270848d038841fb92a7 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
Service name or port number to connect to. Defaults to C<5555>.
-=item B<Delay> I<Seconds>
-
-Time (in seconds) that is added to each I<data set's> interval when calculating
-the I<time to live> (TTL) of the metric to be sent to I<Riemann>. Defaults to
-B<1>.
-
=item B<StoreRates> B<false>|B<true>
If set to B<true> (the default), convert counter values to rates. If set to
diff --git a/src/write_riemann.c b/src/write_riemann.c
index 79898908111852665cdc05b768390b2e5b408a7d..cd0132d28c30a9855035e36cb89b4334c4304ae1 100644 (file)
--- a/src/write_riemann.c
+++ b/src/write_riemann.c
#include <inttypes.h>
#include <pthread.h>
-#define RIEMANN_DELAY 1
#define RIEMANN_HOST "localhost"
#define RIEMANN_PORT "5555"
#define F_CONNECT 0x01
uint8_t flags;
pthread_mutex_t lock;
- int delay;
_Bool store_rates;
char *node;
char *service;
@@ -277,7 +275,7 @@ static Event *riemann_value_to_protobuf (struct riemann_host const *host, /* {{{
event->host = strdup (vl->host);
event->time = CDTIME_T_TO_TIME_T (vl->time);
event->has_time = 1;
- event->ttl = CDTIME_T_TO_TIME_T (vl->interval) + host->delay;
+ event->ttl = CDTIME_T_TO_TIME_T (2 * vl->interval);
event->has_ttl = 1;
riemann_event_add_tag (event, "plugin:%s", vl->plugin);
host->reference_count = 1;
host->node = NULL;
host->service = NULL;
- host->delay = RIEMANN_DELAY;
host->store_rates = 1;
status = cf_util_get_string (ci, &host->name);
"option.");
break;
}
- } else if (strcasecmp(child->key, "delay") == 0) {
- if ((status = cf_util_get_int(ci, &host->delay)) != 0)
- break;
} else if (strcasecmp ("StoreRates", child->key) == 0) {
status = cf_util_get_boolean (ci, &host->store_rates);
if (status != 0)