From 1a0c5a3a04d433ffba6a716ce3ff269c939e0f6b Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Fri, 21 Apr 2023 18:08:16 +0200 Subject: [PATCH] nginx - update default var --- defaults/main.yml | 2 -- templates/systemd/prometheus-nginx-exporter.service.j2 | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index ef173c3..7e1bf8d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -50,8 +50,6 @@ prometheus_mongodb_exporter_database: "admin" prometheus_mongodb_exporter_host: "localhost" prometheus_mongodb_exporter_port: 27017 -prometheus_nginx_scrape_uri: "http://localhost/stub_status" - prometheus_opcache_exporter_fcgi_uri: "unix:///var/run/www.sock" prometheus_phpfpm_sockets_directory: "/run/php/" diff --git a/templates/systemd/prometheus-nginx-exporter.service.j2 b/templates/systemd/prometheus-nginx-exporter.service.j2 index afbfc44..c0a0d7d 100644 --- a/templates/systemd/prometheus-nginx-exporter.service.j2 +++ b/templates/systemd/prometheus-nginx-exporter.service.j2 @@ -5,7 +5,7 @@ After=network.target [Service] Type=simple ExecStart=/usr/local/bin/prometheus-nginx-exporter \ --nginx.scrape-uri {{ prometheus_nginx_scrape_uri }} \ +-nginx.scrape-uri {{ prometheus_nginx_scrape_uri | default("http://localhost/stub_status") }} \ -web.listen-address=0.0.0.0:9113 [Install]