Refactor node-exporter to every node

This commit is contained in:
Tobias Reisinger 2025-05-01 15:33:32 +02:00
parent 0359a4ffa7
commit f28e81fc9d
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
8 changed files with 36 additions and 17 deletions

View file

@ -9,10 +9,11 @@ prometheus.scrape "alloy" {
forward_to = [prometheus.remote_write.mimir.receiver]
}
// prometheus.exporter.node_exporter "node_exporter" {}
prometheus.scrape "node_exporter" {
targets = [
{"__address__" = "node_exporter:9100", "job" = "node_exporter"},
{% for host_data in opentofu.hosts.values() %}
{"__address__" = "{{ host_data.fqdn_vpn }}:9100", "job" = "node_exporter"},
{% endfor %}
]
forward_to = [prometheus.remote_write.mimir.receiver]
}