summaryrefslogtreecommitdiffstats
path: root/pillar/role/monitoring
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2023-02-25 16:47:21 +0100
committerGeorg Pfuetzenreuter2023-02-25 16:47:21 +0100
commitcc007e6470a54311fac2facd1c6e9b321a3a4f28 (patch)
tree4b5a33871977947b1ae94041dd6be49d1bc03991 /pillar/role/monitoring
parentc8c91269fda61fcf37ce9cb821c0bd83d32125ab (diff)
parentddb72f1cb3e3b6b4dbe11ff36510bf15e226b9aa (diff)
downloadsalt-cc007e6470a54311fac2facd1c6e9b321a3a4f28.tar.gz
salt-cc007e6470a54311fac2facd1c6e9b321a3a4f28.tar.bz2
salt-cc007e6470a54311fac2facd1c6e9b321a3a4f28.zip
Merge pull request 'Import moni Prometheus configuration' (#32) from prometheus-moni into production
Reviewed-on: https://git.com.de/LibertaCasa/salt/pulls/32
Diffstat (limited to 'pillar/role/monitoring')
-rw-r--r--pillar/role/monitoring/prometheus-alertmanager.sls11
-rw-r--r--pillar/role/monitoring/prometheus-exporter-blackbox.sls50
-rw-r--r--pillar/role/monitoring/prometheus.sls17
3 files changed, 78 insertions, 0 deletions
diff --git a/pillar/role/monitoring/prometheus-alertmanager.sls b/pillar/role/monitoring/prometheus-alertmanager.sls
new file mode 100644
index 0000000..33eb5a4
--- /dev/null
+++ b/pillar/role/monitoring/prometheus-alertmanager.sls
@@ -0,0 +1,11 @@
+prometheus:
+ wanted:
+ component:
+ - alertmanager
+ pkg:
+ component:
+ alertmanager:
+ config:
+ global:
+ resolve_timeout: 5m
+
diff --git a/pillar/role/monitoring/prometheus-exporter-blackbox.sls b/pillar/role/monitoring/prometheus-exporter-blackbox.sls
new file mode 100644
index 0000000..3e9ab08
--- /dev/null
+++ b/pillar/role/monitoring/prometheus-exporter-blackbox.sls
@@ -0,0 +1,50 @@
+prometheus:
+ wanted:
+ component:
+ - blackbox_exporter
+ pkg:
+ component:
+ blackbox_exporter:
+ config:
+ modules:
+ http_2xx:
+ prober: http
+ timeout: 15s
+ http_post_2xx:
+ prober: http
+ http:
+ method: POST
+ http_3xx:
+ prober: http
+ timeout: 5s
+ http:
+ method: HEAD
+ no_follow_redirects: true
+ valid_status_codes: [301, 302]
+ tcp_connect:
+ prober: tcp
+ ssh_banner:
+ prober: tcp
+ tcp:
+ query_response:
+ - expect: "^SSH-2.0-"
+ irc_banner:
+ prober: tcp
+ tcp:
+ query_response:
+ - send: "NICK prober"
+ - send: "USER prober prober prober :prober"
+ - expect: "PING :([^ ]+)"
+ send: "PONG ${1}"
+ - expect: "^:[^ ]+ 001"
+ icmp:
+ prober: icmp
+
+firewalld:
+ zones:
+ internal:
+ ports:
+ - comment: 'Prometheus Blackbox Exporter'
+ port: 9115
+ protocol: tcp
+
diff --git a/pillar/role/monitoring/prometheus.sls b/pillar/role/monitoring/prometheus.sls
new file mode 100644
index 0000000..c9c2b01
--- /dev/null
+++ b/pillar/role/monitoring/prometheus.sls
@@ -0,0 +1,17 @@
+prometheus:
+ wanted:
+ component:
+ - prometheus
+ pkg:
+ component:
+ prometheus:
+ config:
+ global:
+ scrape_interval: 15s
+ evaluation_interval: 1m
+
+firewalld:
+ zones:
+ internal:
+ services:
+ - prometheus