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:
parent
3ab49a7daf
commit
34057b68f7
2 changed files with 15 additions and 1 deletions
|
@ -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 %}
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue