1
0
Fork 0
mirror of https://gitlab.com/s3lph/ansible-collection-prometheus synced 2024-11-21 17:21:01 +01:00

Add smtp+starttls blackbox check

This commit is contained in:
s3lph 2021-02-20 21:45:11 +01:00
parent 3ab49a7daf
commit 34057b68f7
2 changed files with 15 additions and 1 deletions

View file

@ -2,7 +2,7 @@
[targets]
{% for host in hostvars.keys() %}
{% if hostvars[host].monitor_dnsbl | default(false) %}
{% if hostvars[host].monitor_dnsbl | default('false') | bool %}
server={{ host }}
{% endif %}
{% endfor %}

View file

@ -117,6 +117,20 @@ modules:
- expect: "^250 .*$"
- send: "QUIT"
smtp_submission:
prober: tcp
timeout: 2s
tcp:
{% if blackbox_prefer_ipv4 -%}
preferred_ip_protocol: ip4
{% endif -%}
query_response:
- starttls: true
- expect: "^220 .*SMTP .*$"
- send: "HELO {{ blackbox_smtp_name }}"
- expect: "^250 .*$"
- send: "QUIT"
smtps:
prober: tcp
timeout: 2s