mirror of
https://gitlab.com/s3lph/ansible-collection-prometheus
synced 2024-11-25 11:11:01 +01:00
Add smtp+starttls blackbox check
This commit is contained in:
parent
3ab49a7daf
commit
34057b68f7
2 changed files with 15 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[targets]
|
[targets]
|
||||||
{% for host in hostvars.keys() %}
|
{% for host in hostvars.keys() %}
|
||||||
{% if hostvars[host].monitor_dnsbl | default(false) %}
|
{% if hostvars[host].monitor_dnsbl | default('false') | bool %}
|
||||||
server={{ host }}
|
server={{ host }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
|
@ -117,6 +117,20 @@ modules:
|
||||||
- expect: "^250 .*$"
|
- expect: "^250 .*$"
|
||||||
- send: "QUIT"
|
- 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:
|
smtps:
|
||||||
prober: tcp
|
prober: tcp
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
|
|
Loading…
Reference in a new issue