infrastructure/playbooks/roles/telegraf/templates/telegraf.conf.j2
Tobias Reisinger 4104057771
Fix pre-commit hooks and move directories
roles/ and inventory/ are now in playbooks/
also fixed issues reported by ansible-lint
2024-10-14 18:31:36 +02:00

47 lines
1.2 KiB
Django/Jinja

[agent]
interval = "60s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = "node002.serguzim.me"
omit_hostname = false
[[outputs.influxdb_v2]]
urls = ["{{ svc.influxdb.url }}"]
token = "{{ svc.influxdb.token }}"
organization = "{{ svc.influxdb.organization }}"
bucket = "{{ svc.influxdb.bucket }}"
[[inputs.prometheus]]
urls = [
{%- for url in svc.prometheus_unprotected.urls -%}
"{{ url }}",
{%- endfor -%}
]
[[inputs.prometheus]]
urls = [
{%- for url in svc.prometheus_protected.urls -%}
"{{ url }}",
{%- endfor -%}
]
bearer_token_string = "{{ svc.prometheus_protected.bearer_token }}"
[[inputs.postgresql]]
address = "postgres://{{ svc.postgresql.user }}:{{ svc.postgresql.pass }}@{{ svc.postgresql.host }}:{{ svc.postgresql.port }}/{{ svc.postgresql.database }}?sslmode=verify-full"
ignored_databases = ["postgres", "template0", "template1"]
prepared_statements = true
[[inputs.docker_log]]
endpoint = "{{ svc.docker_log.endpoint }}"
docker_label_include = [
"com.influxdata.telegraf.enable"
]
source_tag = {{ svc.docker_log.source_tag|lower }}