varilink/libraries_ansible-roles

Deleting /etc/telegraf/telegraf.conf.sample in monitor_client role causes APT upgrade issue

Opened this issue · 0 comments

When telegraf is installed by the monitor_client role, two files are created in the /etc/telegraf/ directory:

  • telegraf.conf
  • telegraf.conf.sample

Immediately after the install, these files are identical. We take the presence of telegraf.conf.sample as an indicator of whether we have configured the service or not. To configure the service, we customise telegraf.conf to our needs and remove telegraf.conf.sample.

Unfortunately this causes a slight issue when an APT upgrade includes the telegraf package. We run up against a report that the telegraf.conf.sample file in the package is not a match for what is now present on the host.