From 94aeb4e8ba3cc4471673006e915a66ad7168a133 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sat, 17 Aug 2019 15:16:33 +0200 Subject: [PATCH] [prometheus] desactivate captive portal and comment code --- .../templates/prometheus/prometheus.yml.j2 | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/roles/prometheus/templates/prometheus/prometheus.yml.j2 b/roles/prometheus/templates/prometheus/prometheus.yml.j2 index 94c13482..39f3c5ff 100644 --- a/roles/prometheus/templates/prometheus/prometheus.yml.j2 +++ b/roles/prometheus/templates/prometheus/prometheus.yml.j2 @@ -11,6 +11,7 @@ global: monitor: 'example' # Alertmanager configuration +# Use prometheus alertmanager installed on the same machine alerting: alertmanagers: - static_configs: @@ -18,18 +19,19 @@ alerting: # Load rules once and periodically evaluate them according to the global 'evaluation_interval'. rule_files: - - "alert.rules.yml" - - "django.rules.yml" + - "alert.rules.yml" # Monitoring alerts, this is the file you may be searching! + - "django.rules.yml" # Custom rules specific for Django project monitoring # A scrape configuration containing exactly one endpoint to scrape: # Here it's Prometheus itself. scrape_configs: + # The .json in file_sd_configs is dynamically reloaded + - job_name: dummy - # This reload dynamically the list of targets - # You don't need to restart Prometheus when updating targets.json file_sd_configs: - files: - '/etc/prometheus/targets.json' + - job_name: ups_snmp file_sd_configs: - files: @@ -44,6 +46,7 @@ scrape_configs: target_label: instance - target_label: __address__ replacement: 127.0.0.1:9116 + - job_name: unifi_snmp file_sd_configs: - files: @@ -58,7 +61,10 @@ scrape_configs: target_label: instance - target_label: __address__ replacement: 127.0.0.1:9116 + - job_name: django scheme: https static_configs: - - targets: ["portail-captif.crans.org:443"] + - targets: [] +# Activate this line when the captive portal need monitoring +# - targets: ["portail-captif.crans.org:443"]