Add new roles for monitoring
This commit is contained in:
60
ansible/roles/blackbox-exporter/templates/blackbox.config.j2
Normal file
60
ansible/roles/blackbox-exporter/templates/blackbox.config.j2
Normal file
@ -0,0 +1,60 @@
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
modules:
|
||||
http_2xx:
|
||||
prober: http
|
||||
{% if inventory_hostname == 'check.home.arpa' %}
|
||||
http:
|
||||
preferred_ip_protocol: "ip4"
|
||||
ip_protocol_fallback: true
|
||||
{% endif %}
|
||||
http_post_2xx:
|
||||
prober: http
|
||||
{% if inventory_hostname == 'check.home.arpa' %}
|
||||
http:
|
||||
method: POST
|
||||
preferred_ip_protocol: "ip4"
|
||||
ip_protocol_fallback: true
|
||||
{% endif %}
|
||||
tcp_connect:
|
||||
prober: tcp
|
||||
smtp_check:
|
||||
prober: tcp
|
||||
timeout: 5s
|
||||
tcp:
|
||||
{% if inventory_hostname == 'check.home.arpa' %}
|
||||
preferred_ip_protocol: "ip4"
|
||||
ip_protocol_fallback: true
|
||||
{% endif %}
|
||||
query_response:
|
||||
- expect: "^220(.*)ESMTP(.*)$"
|
||||
- send: "EHLO prober\r"
|
||||
- expect: "^250-STARTTLS"
|
||||
- send: "STARTTLS\r"
|
||||
- expect: "^220"
|
||||
- starttls: true
|
||||
- send: "EHLO prober\r"
|
||||
- expect: "^250-AUTH"
|
||||
- send: "QUIT\r"
|
||||
imap_check:
|
||||
prober: tcp
|
||||
timeout: 5s
|
||||
tcp:
|
||||
{% if inventory_hostname == 'check.home.arpa' %}
|
||||
preferred_ip_protocol: "ip4"
|
||||
ip_protocol_fallback: true
|
||||
{% endif %}
|
||||
query_response:
|
||||
- expect: "OK.*STARTTLS"
|
||||
- send: ". STARTTLS"
|
||||
- expect: "OK"
|
||||
- starttls: true
|
||||
- send: ". capability"
|
||||
- expect: "CAPABILITY IMAP4rev1"
|
||||
icmp:
|
||||
prober: icmp
|
||||
{% if inventory_hostname == 'check.home.arpa' %}
|
||||
icmp:
|
||||
preferred_ip_protocol: "ip4"
|
||||
ip_protocol_fallback: true
|
||||
{% endif %}
|
Reference in New Issue
Block a user