add option to include node exporter

This commit is contained in:
Arne Teuke
2025-06-13 16:05:16 +02:00
parent 2781df9d27
commit 7a1749a738
3 changed files with 14 additions and 2 deletions

View File

@@ -64,7 +64,15 @@ prometheus.scrape "scrape_system" {
forward_to = [prometheus.remote_write.prometheus.receiver]
scrape_interval = "15s"
}
<% if @ay_manage_ne == true -%>
prometheus.scrape "node_exporter" {
targets = [
{ __address__ = "localhost:9100" },)
]
forward_to = [prometheus.remote_write.prometheus.receiver]
scrape_interval = "15s"
}
<% end %>
prometheus.remote_write "prometheus" {
endpoint {
url = "<%= @ay_prom_url %>"