summaryrefslogtreecommitdiffstats
path: root/pillar/role/monitoring/prometheus-exporter-blackbox.sls
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2023-02-15 20:23:49 +0100
committerGeorg Pfuetzenreuter2023-02-21 19:05:03 +0100
commit979021f5c40c812d7a9edf22bf8945f691badeed (patch)
tree05a8e3cc51b4a98d5179e7b1897710206b2b32cd /pillar/role/monitoring/prometheus-exporter-blackbox.sls
parenta705925aa695cd4f6b4fe529b31f2df6bceaa4c6 (diff)
downloadsalt-979021f5c40c812d7a9edf22bf8945f691badeed.tar.gz
salt-979021f5c40c812d7a9edf22bf8945f691badeed.tar.bz2
salt-979021f5c40c812d7a9edf22bf8945f691badeed.zip
Import Prometheus server configuration
* add new roles: - monitoring.prometheus - monitoring.prometheus-alertmanager - monitoring.prometheus-exporter-blackbox * add common Prometheus and Prometheus Alertmanager pillar data * add moni.lysergic.dev specific Prometheus pillar data Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'pillar/role/monitoring/prometheus-exporter-blackbox.sls')
-rw-r--r--pillar/role/monitoring/prometheus-exporter-blackbox.sls41
1 files changed, 41 insertions, 0 deletions
diff --git a/pillar/role/monitoring/prometheus-exporter-blackbox.sls b/pillar/role/monitoring/prometheus-exporter-blackbox.sls
new file mode 100644
index 0000000..59b9945
--- /dev/null
+++ b/pillar/role/monitoring/prometheus-exporter-blackbox.sls
@@ -0,0 +1,41 @@
+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