diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-06-22 18:04:40 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-06-22 18:04:40 +0200 |
| commit | 1a7d06d83d41b343a48c181cb47c4c9974a5626a (patch) | |
| tree | 6df05c0a11d41a419d261bcd8a052de19172c2f6 /roles/prometheus/templates | |
| parent | ded892e34378c3675717384decebbf87e3f70039 (diff) | |
Refactor installing grafana dashboards using URL only
Refactor prometheus extra scraping jobs
Diffstat (limited to 'roles/prometheus/templates')
| -rw-r--r-- | roles/prometheus/templates/prometheus.yml.j2 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/prometheus/templates/prometheus.yml.j2 b/roles/prometheus/templates/prometheus.yml.j2 index c43864ea..f7f2ae24 100644 --- a/roles/prometheus/templates/prometheus.yml.j2 +++ b/roles/prometheus/templates/prometheus.yml.j2 @@ -15,3 +15,11 @@ scrape_configs: - targets: {{ prometheus_node_exporter_targets | to_yaml }} scrape_interval: {{ prometheus_scrape_interval }} metrics_path: /metrics +{% for job in prometheus_extra_scrape_configs %} + + - job_name: '{{ job.name }}' + static_configs: + - targets: {{ job.targets | to_yaml }} + scrape_interval: {{ job.scrape_interval | default(prometheus_scrape_interval) }} + metrics_path: {{ job.metrics_path | default('/metrics') }} +{% endfor %} |
