Open lisuml opened 1 year ago
More investigation made and it seems the issue is only present with telegraf 1.25.0 (most recent one at the moment).
The issue is caused by the fact, the official debian packages provided by influxdata automatically try to start the telegraf
systemd service on installation time and the working configuration for the outputs is expected to be part of the config file at that time, but the outputs configuration is not there.
This looks like a bug of telegraf itself or/and telegraf official debian packages. I'm going to file an github issue on the official telegraf repository.
For me, the workaround was simply to pick lower version of the telegraf to install from ansible playbook:
manala_telegraf_install_packages_default:
- telegraf=1.24.4-1
@lisuml we ran on the same issue on v1.25.0 and fixed our tests like that https://github.com/manala/ansible-roles/pull/642
Would you provide all your values passed to the role ?
btw, use manala_telegraf_install_packages
instead of manala_telegraf_install_packages_default
:)
@nervo: thanks for the followup!
Would you provide all your values passed to the role ?
These are my ansible variables:
manala_apt_preferences:
- influxdb@influxdata
manala_telegraf_install_packages:
- telegraf=1.24.4-1
manala_telegraf_config_template: config/telegraf/base/telegraf.conf.j2
manala_telegraf_config:
global_tags:
environment: "{{ env }}"
manala_telegraf_configs:
- file: os.conf
config: |
[[inputs.cpu]]
totalcpu = true
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
[[inputs.diskio]]
[[inputs.kernel]]
[[inputs.mem]]
[[inputs.net]]
[[inputs.netstat]]
[[inputs.processes]]
[[inputs.system]]
- file: output.conf
config: |
[[outputs.influxdb]]
urls = [ "udp://metrix.euc1.XXX.lan:8089" ]
udp_payload = "1024B"
use manala_telegraf_install_packages instead of manala_telegraf_install_packages_default
Roger that.
FYI: I created an issue in telegraf github repo: https://github.com/influxdata/telegraf/issues/12514
Ok, so let's wait for the next telegraf version :)
(btw, you should also use explicit telegraf apt preference)
manala_apt_preferences:
- telegraf@influxdata
(btw, you should also use explicit telegraf apt preference)
My bad. Thanks for pointing this out!
manala.roles version: 3.2.0
During an initial provisioning of the node with
manala.telegraf
role attached, the service is not being started properly:As you can see, the configs are defined properly, but it seems they are not ready on service start. The error I see in systemd:
During the 2nd provisioning attempt, the error is gone and the service starts normally.