From d7c3044edf15ca2ee8a8bcc2fcdce8e26e4133d9 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Mon, 15 Sep 2025 22:17:49 +0200 Subject: Add prometheus role (with node exporter) --- roles/prometheus/templates/prometheus.yml.j2 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 roles/prometheus/templates/prometheus.yml.j2 (limited to 'roles/prometheus/templates') diff --git a/roles/prometheus/templates/prometheus.yml.j2 b/roles/prometheus/templates/prometheus.yml.j2 new file mode 100644 index 00000000..e39a69c0 --- /dev/null +++ b/roles/prometheus/templates/prometheus.yml.j2 @@ -0,0 +1,16 @@ +global: + scrape_interval: {{ prometheus_scrape_interval }} + evaluation_interval: {{ prometheus_scrape_interval }} + +rule_files: + +scrape_configs: + - job_name: 'prometheus' + static_configs: + - targets: ['localhost:{{ prometheus_port }}'] + + - job_name: 'node' + static_configs: + - targets: ['localhost:{{ prometheus_node_exporter_port }}'] + scrape_interval: {{ prometheus_scrape_interval }} + metrics_path: /metrics -- cgit v1.2.3