diff --git a/roles/dnsbl_exporter/templates/etc/prometheus/dnsbl-exporter/targets.ini.j2 b/roles/dnsbl_exporter/templates/etc/prometheus/dnsbl-exporter/targets.ini.j2 index aa50194..e011618 100644 --- a/roles/dnsbl_exporter/templates/etc/prometheus/dnsbl-exporter/targets.ini.j2 +++ b/roles/dnsbl_exporter/templates/etc/prometheus/dnsbl-exporter/targets.ini.j2 @@ -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 %} \ No newline at end of file diff --git a/roles/prometheus/templates/blackbox.yml b/roles/prometheus/templates/blackbox.yml index 6a2d77f..dbfc0da 100644 --- a/roles/prometheus/templates/blackbox.yml +++ b/roles/prometheus/templates/blackbox.yml @@ -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