Update telegraf config

This commit is contained in:
Tobias Reisinger 2024-10-29 14:52:26 +01:00
parent 6fadc45e24
commit 589677c50a
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 8 additions and 2 deletions

View file

@ -7,7 +7,7 @@
flush_interval = "10s" flush_interval = "10s"
flush_jitter = "0s" flush_jitter = "0s"
precision = "" precision = ""
hostname = "node002.serguzim.me" hostname = "{{ inventory_hostname }}"
omit_hostname = false omit_hostname = false
[[outputs.influxdb_v2]] [[outputs.influxdb_v2]]
@ -16,6 +16,13 @@
organization = "{{ svc.influxdb.organization }}" organization = "{{ svc.influxdb.organization }}"
bucket = "{{ svc.influxdb.bucket }}" bucket = "{{ svc.influxdb.bucket }}"
[[inputs.prometheus]]
urls = [
{%- for host_data in opentofu.hosts.values() -%}
"https://{{ host_data.fqdn_vpn }}:2019/metrics",
{%- endfor -%}
]
[[inputs.prometheus]] [[inputs.prometheus]]
urls = [ urls = [
{%- for url in svc.prometheus_unprotected.urls -%} {%- for url in svc.prometheus_unprotected.urls -%}

View file

@ -7,7 +7,6 @@ telegraf_svc:
bucket: metrics bucket: metrics
prometheus_unprotected: prometheus_unprotected:
urls: urls:
- http://node002.vpn.serguzim.net:2019/metrics
- https://matrix.serguzim.me/_synapse/metrics - https://matrix.serguzim.me/_synapse/metrics
- https://push.serguzim.me/metrics - https://push.serguzim.me/metrics
- https://tick.serguzim.me/metrics - https://tick.serguzim.me/metrics