By default collectd's Network module won't attempt to re-resolve
hostnames if it fails for some reason (e.g. network not being available
when it's first started).
However there's a fairly recently added option called ResolveInterval
which will force it to re-resolve after N seconds if it fails. The
example in the collectd repo uses 4 hours (14400 seconds) so I used
that, but we could probably bump it down a bit if we wanted.
Patch follows.
commit 34138a9e598a4fad54380ef692d70c71d7e08e41
Author: Ricky Elrod <codeblock(a)fedoraproject.org>
Date: Mon May 25 03:33:34 2015 +0000
[collectd/base] re-resolve dns lookup after a few hours if it fails
see:
https://github.com/collectd/collectd/pull/732
Signed-off-by: Ricky Elrod <codeblock(a)fedoraproject.org>
diff --git a/roles/collectd/base/files/network-client.conf
b/roles/collectd/base/files/network-client.conf
index a6bd125..53f74b7 100644
--- a/roles/collectd/base/files/network-client.conf
+++ b/roles/collectd/base/files/network-client.conf
@@ -2,4 +2,5 @@ LoadPlugin network
<Plugin "network">
Server "log01"
+ ResolveInterval 14400
</Plugin>