summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b61d5cf)
raw | patch | inline | side by side (parent: b61d5cf)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Thu, 15 Jan 2015 08:06:24 +0000 (09:06 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Thu, 15 Jan 2015 08:10:33 +0000 (09:10 +0100) |
Fixes #891
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 608d38896221648f0ac5bb59da8ccfb20cf30b78..dda4fcc5ee17a33c1a718bb9c78e80b994e360b0 100644 (file)
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
# <Node "example">
# Host "localhost"
# Port 5555
-# Protocol UDP
-# Batch false
+# Protocol TCP
+# Batch true
# BatchMaxSize 8192
# StoreRates true
# AlwaysAppendDS false
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index 35c90b8641586cf44c7b84f4bf15b8a452a121ea..1802d5aef8ec5a164794873e2f9b212b916570ad 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
=item B<Protocol> B<UDP>|B<TCP>
Specify the protocol to use when communicating with I<Riemann>. Defaults to
-B<UDP>.
+B<TCP>.
=item B<Batch> B<true>|B<false>
Notifications are not batched and sent as soon as possible.
-Defaults to false
+When enabled, it can occur that events get processed by the Riemann server
+close to or after their expiration time. Tune the B<TTLFactor> and
+B<BatchMaxSize> settings according to the amount of values collected, if this
+is an issue.
+
+Defaults to true
=item B<BatchMaxSize> I<size>
diff --git a/src/write_riemann.c b/src/write_riemann.c
index 0a8df6fe30ae498022fb5359ec6b9597c2d8d09f..a09c72361f910ac8615a219fd9187da36e77a819 100644 (file)
--- a/src/write_riemann.c
+++ b/src/write_riemann.c
host->check_thresholds = 0;
host->store_rates = 1;
host->always_append_ds = 0;
- host->use_tcp = 0;
- host->batch_mode = 0;
- host->batch_max = RIEMANN_BATCH_MAX; /* typical MSS */
- host->batch_init = cdtime();
+ host->use_tcp = 1;
+ host->batch_mode = 1;
+ host->batch_max = RIEMANN_BATCH_MAX; /* typical MSS */
+ host->batch_init = cdtime();
host->ttl_factor = RIEMANN_TTL_FACTOR;
status = cf_util_get_string (ci, &host->name);