Code

write_riemann plugin: Remove the "Delay" option.
authorFlorian Forster <octo@collectd.org>
Fri, 18 Jan 2013 10:55:53 +0000 (11:55 +0100)
committerFlorian Forster <octo@collectd.org>
Fri, 18 Jan 2013 10:55:53 +0000 (11:55 +0100)
src/collectd.conf.in
src/collectd.conf.pod
src/write_riemann.c

index d2cf950ba95e12a96c22bdd74b9b5ab9f9a18c68..31dce556d10d4ae308b820c7890a1d7a357254ea 100644 (file)
 #              Host "localhost">
 #              Port 5555
 #              StoreRates true
-#              Delay 1
 #      </Node>
 #      Tag "foobar"
 #</Plugin>
index 904f18624f8834eece0597f61fa165fa2523a2d2..6afd0b0e4a7639285587e270848d038841fb92a7 100644 (file)
@@ -5550,12 +5550,6 @@ Hostname or address to connect to. Defaults to C<localhost>.
 
 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
index 79898908111852665cdc05b768390b2e5b408a7d..cd0132d28c30a9855035e36cb89b4334c4304ae1 100644 (file)
@@ -31,7 +31,6 @@
 #include <inttypes.h>
 #include <pthread.h>
 
-#define RIEMANN_DELAY          1
 #define RIEMANN_HOST           "localhost"
 #define RIEMANN_PORT           "5555"
 
@@ -40,7 +39,6 @@ struct riemann_host {
 #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);
@@ -551,7 +549,6 @@ riemann_config_node(oconfig_item_t *ci)
        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);
@@ -581,9 +578,6 @@ riemann_config_node(oconfig_item_t *ci)
                                                "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)