summaryrefslogtreecommitdiff
path: root/inventory/host_vars/ele-mon.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-07-27 22:19:18 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-07-27 22:19:18 +0200
commita7f837c47621f01723feb96f5fd0d54a13376a01 (patch)
tree67b468c68392e4774922a17364f5365881f95ce4 /inventory/host_vars/ele-mon.yml
parentadd prometheus to ele-router (diff)
add nut aka UPS to prometheus monitoring
Diffstat (limited to 'inventory/host_vars/ele-mon.yml')
-rw-r--r--inventory/host_vars/ele-mon.yml49
1 files changed, 41 insertions, 8 deletions
diff --git a/inventory/host_vars/ele-mon.yml b/inventory/host_vars/ele-mon.yml
index 967093be..d5aea850 100644
--- a/inventory/host_vars/ele-mon.yml
+++ b/inventory/host_vars/ele-mon.yml
@@ -62,6 +62,7 @@ prometheus_server_web_external_url: /prometheus/
prometheus_exporters_extra:
- blackbox
+ - nut
prometheus_exporter_blackbox_modules_extra:
icmp:
@@ -78,11 +79,43 @@ prometheus_server_jobs_extra: |
- job_name: 'node-openwrt'
scheme: http
static_configs:
- - targets:
- - 192.168.42.170:9100
- - 192.168.42.171:9100
- - 192.168.42.172:9100
- - 192.168.42.173:9100
- - 192.168.42.174:9100
- - 192.168.42.175:9100
- - 192.168.42.254:9100
+ - targets:
+ - 192.168.42.170:9100
+ - 192.168.42.171:9100
+ - 192.168.42.172:9100
+ - 192.168.42.173:9100
+ - 192.168.42.174:9100
+ - 192.168.42.175:9100
+ # - 192.168.42.210:9100
+ # - 192.168.42.211:9100
+ # - 192.168.42.212:9100
+ - 192.168.42.213:9100
+ - 192.168.42.254:9100
+
+ - job_name: 'nut'
+ metrics_path: /proxy
+ params:
+ module:
+ - nut
+ scheme: https
+ tls_config:
+ ca_file: /etc/ssl/prometheus/ca-crt.pem
+ cert_file: /etc/ssl/prometheus/server/scrape-crt.pem
+ key_file: /etc/ssl/prometheus/server/scrape-key.pem
+ static_configs:
+ - targets:
+ # - nextlib0@192.168.42.210
+ # - nextlib1@192.168.42.211
+ # - nextlib2@192.168.42.212
+ - nextlib3@192.168.42.213
+ relabel_configs:
+ - source_labels: [__address__]
+ regex: .*@(.*)
+ target_label: __param_server
+ - source_labels: [__address__]
+ regex: (.*)@.*
+ target_label: __param_ups
+ - source_labels: [__param_ups]
+ target_label: instance
+ - target_label: __address__
+ replacement: 192.168.18.220:9999