Refactor node-exporter to every node
This commit is contained in:
parent
0359a4ffa7
commit
f28e81fc9d
8 changed files with 36 additions and 17 deletions
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue