File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ monitoring_ping_hosts: # [URL];[HUMAN_READABLE_NAME]
2626 - https://www.apple.com/;apple.com
2727
2828# Prometheus configuration.
29+ prometheus_monitor_prometheus : false
2930prometheus_node_exporter_targets :
3031 - ' nodeexp:9100'
3132prometheus_extra_scrape_configs : ' '
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ services:
6464 pihole-exporter:
6565 container_name: pihole-exporter
6666 image: ekofr/pihole-exporter:latest
67- hostname: '{{ pihole_hostname }} -exporter'
67+ hostname: 'pihole -exporter'
6868 ports:
6969 - "9617:9617"
7070 environment:
Original file line number Diff line number Diff line change @@ -10,10 +10,12 @@ rule_files:
1010 - 'alert.rules'
1111
1212scrape_configs:
13+ {% if prometheus_monitor_prometheus %}
1314 - job_name: 'prometheus'
1415 scrape_interval: 5s
1516 static_configs:
1617 - targets: ['localhost:9090']
18+ {% endif %}
1719
1820 - job_name: 'speedtest'
1921 metrics_path: /metrics
@@ -72,11 +74,12 @@ scrape_configs:
7274 - job_name: 'node'
7375 static_configs:
7476 - targets: {{ prometheus_node_exporter_targets | to_yaml }}
75- {% if pihole_enable %}
76- - job_name: 'pihole-exporter'
77+
78+ {% if pihole_enable %}
79+ - job_name: '{{ pihole_hostname }}'
7780 static_configs:
78- - targets: ['pihole :9617']
79- {% endif %}
81+ - targets: ['{{ pihole_hostname }} :9617']
82+ {% endif %}
8083
8184{% filter indent (width =2,first =True ) %}
8285{{ prometheus_extra_scrape_configs }}
You can’t perform that action at this time.
0 commit comments