summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 269ee45)
raw | patch | inline | side by side (parent: 269ee45)
author | Florian Forster <octo@collectd.org> | |
Mon, 28 Nov 2016 10:02:53 +0000 (11:02 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Tue, 29 Nov 2016 07:53:21 +0000 (08:53 +0100) |
src/collectd.conf.pod | patch | blob | history | |
src/write_tsdb.c | patch | blob | history |
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index fce59032db5780165f89f11fac76df6f0d25d7e3..b043a89f64afd3fe790455b7bab79b88a14d9a41 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
Synopsis:
<Plugin write_tsdb>
- DNS_Cache_TTL 60
- DNS_Random_Cache_TTL 60
+ ResolveInterval 60
+ ResolveJitter 60
<Node "example">
Host "tsd-1.my.domain"
Port "4242"
=over 4
-=item B<DNS_Cache_TTL> I<ttl>
+=item B<ResolveInterval> I<seconds>
-=item B<DNS_Random_Cache_TTL> I<ttl>
+=item B<ResolveJitter> I<seconds>
-When Collectd connects to a TSDB node, it will request the DNS. This can become
-a problem is the TSDN node is unavailable or badly configured because Collected
-will request DNS in order to reconnect for every metric, which can flood your DNS.
-So you can cache the last value for C<ttl> seconds (default: 600s e.g; 10 min).
+When I<collectd> connects to a TSDB node, it will request the DNS. This can
+become a problem if the TSDN node is unavailable or badly configured because
+collectd will request DNS in order to reconnect for every metric, which can
+flood your DNS. So you can cache the last value for I<ResolveInterval> seconds
+(default: B<600>, i.e. 10 minutes).
-You can also define a random ttl. This prevents all your Collectd servers to
-request the DNS at the same time when the connection fails. Default value is
-15 * the write_tsdb interval (or the global interval if write_tsdb interval is not
-defined).
+You can also define a jitter, a random interval to wait in addition to
+I<ResolveInterval>. This prevents all your collectd servers to resolve the
+hostname at the same time when the connection fails. Default value is 15 * the
+interval of the I<write_tsdb plugin> (defaults to 10 seconds).
-Note : if the DNS resolution has already been successful, if the socket closes,
-the plugin will try to reconnect as soon as possible with the cached information.
-DNS is queried only when the socket is closed for a long time (DNS_Cache_TTL +
-DNS_Random_Cache_TTL)
+B<Note:> If the DNS resolution has already been successful when the socket
+closes, the plugin will try to reconnect immediately with the cached
+information. DNS is queried only when the socket is closed for a longer than
+I<ResolveInterval> + I<ResolveJitter> seconds.
=back
diff --git a/src/write_tsdb.c b/src/write_tsdb.c
index 49a3b4142f417c21b1e4f01d2003f6585fef4d8f..6d8fe60c9e1a0576d0182c0040bb1ab339c9498b 100644 (file)
--- a/src/write_tsdb.c
+++ b/src/write_tsdb.c
if (strcasecmp("Node", child->key) == 0)
wt_config_tsd(child);
- else if (strcasecmp("DNS_Cache_TTL", child->key) == 0)
+ else if (strcasecmp("ResolveInterval", child->key) == 0)
cf_util_get_cdtime(child, &dnsttl);
- else if (strcasecmp("DNS_Random_Cache_TTL", child->key) == 0) {
+ else if (strcasecmp("ResolveJitter", child->key) == 0) {
config_random_ttl = 1;
cf_util_get_cdtime(child, &dnsrandomttl);
} else {