ansible/templates/telegraf.conf.j2
Louis Vallat 83da79bf82
feat: added telegraf configuration deployment using template
Signed-off-by: Louis Vallat <contact@louis-vallat.dev>
2025-01-08 11:30:36 +01:00

36 lines
764 B
Django/Jinja

[agent]
hostname = "{{ansible_hostname}}"
flush_interval = "15s"
interval = "15s"
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs"]
[[inputs.diskio]]
[[inputs.mem]]
[[inputs.netstat]]
[[inputs.net]]
ignore_protocol_stats = true
[[inputs.system]]
[[inputs.swap]]
[[inputs.processes]]
[[inputs.kernel]]
{% if docker == true %}
[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"
container_names = []
timeout = "5s"
total = false
{% endif %}
[[outputs.influxdb_v2]]
urls = ["https://influxdb.louis-vallat.dev"]
organization = "louis-vallat.dev"
bucket = "telegraf"
token = "{{telegraf_token}}"