[collectd] possible to put a computed value into Hostname in collectd.conf?

Michael Martinez mwtzzz at gmail.com
Wed Mar 1 22:18:10 CET 2017

We run collectd on all our Amazon instances. The FQDN that an instance
knows itself as, is its internal ip (eg.
ip-172-1-30-197.ec2.internal), and this is what gets included in the
name of the metric sent by collectd via the Graphite plugin.

We'd like to change this behavior so use the external dns name instead
of the internal hostname. The external hostname can be derived on the
instance itself by running:

/opt/aws/bin/ec2-metadata -p |awk '{split($2,a,"."); print a[1]}

Is there a way to configure collectd to use this hostname instead of
the internal one? Or am I pretty much limited to managing the
collectd.conf:Hostname line with something like Salt?

Michael Martinez

More information about the collectd mailing list