From 94f56133bb0035fe85ee9e58d573eb4485e9fa42 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 2 Jun 2021 00:46:12 +0200 Subject: prometheus: initial serverside config --- .../prometheus/server/templates/prometheus.yml.j2 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'roles/monitoring/prometheus/server/templates') diff --git a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 index cadc3ef0..007afa90 100644 --- a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 +++ b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 @@ -8,4 +8,15 @@ rule_files: scrape_configs: - job_name: 'prometheus' static_configs: - - targets: ['localhost:9090'] + - targets: ['localhost:9090'] +{% for job in prometheus_server_jobs %} + + - job_name: '{{ job }}' + metrics_path: /proxy + params: + module: + - {{ job }} + file_sd_configs: + - files: + - "/etc/prometheus/jobs/{{ job }}/*.yml" +{% endfor %} -- cgit v1.2.3