Verified Commit af092068 authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

Watch mail server with blackbox tcp module

parent 44b7813f
......@@ -22,3 +22,22 @@ modules:
dns:
query_name: picasoft.net
query_type: SOA
# Probe a Postfix server and check STARTTLS mechanism
smtp_check:
prober: tcp
timeout: 5s
tcp:
preferred_ip_protocol: "ip4"
query_response:
# Check that HELO command works
- expect: "^220 ([^ ]+) ESMTP (.+)$"
- send: "HELO ProberCheck"
- expect: "^250(.+)"
# Upgrade to TLS and check that HELO still works
- send: "STARTTLS"
- expect: "^220(.+)"
- starttls: true
- send: "HELO ProberCheck"
- expect: "^250(.+)"
- send: "QUIT"
......@@ -184,6 +184,19 @@ scrape_configs:
target_label: instance
- target_label: __address__
replacement: blackbox.picasoft.net
# Srape metrics about Picasoft mail server
- job_name: blackbox-mail
scheme: "https"
basic_auth:
username: "%{BLACKBOX_METRICS_USER}"
password: "%{BLACKBOX_METRICS_PASSWORD}"
metrics_path: /probe
params:
module: [smtp_check]
target: [mail.picasoft.net:587]
static_configs:
- targets:
- blackbox.picasoft.net
# Scrape metrics about Blackbox itself
- job_name: blackbox
scheme: "https"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment