summaryrefslogtreecommitdiffstats
path: root/roles/prometheus/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/prometheus/templates')
-rw-r--r--roles/prometheus/templates/prometheus.yml.j25
1 files changed, 3 insertions, 2 deletions
diff --git a/roles/prometheus/templates/prometheus.yml.j2 b/roles/prometheus/templates/prometheus.yml.j2
index e39a69c0..c43864ea 100644
--- a/roles/prometheus/templates/prometheus.yml.j2
+++ b/roles/prometheus/templates/prometheus.yml.j2
@@ -1,3 +1,4 @@
+---
global:
scrape_interval: {{ prometheus_scrape_interval }}
evaluation_interval: {{ prometheus_scrape_interval }}
@@ -7,10 +8,10 @@ rule_files:
scrape_configs:
- job_name: 'prometheus'
static_configs:
- - targets: ['localhost:{{ prometheus_port }}']
+ - targets: {{ prometheus_targets | to_yaml }}
- job_name: 'node'
static_configs:
- - targets: ['localhost:{{ prometheus_node_exporter_port }}']
+ - targets: {{ prometheus_node_exporter_targets | to_yaml }}
scrape_interval: {{ prometheus_scrape_interval }}
metrics_path: /metrics