stacks/monitoring/blackbox/blackbox.yml

# stacks/monitoring/blackbox/blackbox.yml
# Modules referenced by prometheus job blackbox_http / blackbox_tcp.
# Hosts are internal (*.home.arpa) so self-signed CA is accepted.

modules:
  http_2xx:
    prober: http
    timeout: 8s
    http:
      valid_http_versions: [HTTP/1.1, HTTP/2.0]
      valid_status_codes: []
      method: GET
      follow_redirects: true
      fail_if_ssl: false
      fail_if_not_ssl: false
      preferred_ip_protocol: ip4
      tls_config:
        ca_file: /etc/blackbox/internal-ca.pem

  http_2xx_auth:
    prober: http
    timeout: 8s
    http:
      method: GET
      valid_status_codes: [200, 204, 401]
      tls_config:
        ca_file: /etc/blackbox/internal-ca.pem

  http_post:
    prober: http
    timeout: 10s
    http:
      method: POST
      headers:
        Content-Type: application/json
      body: '{"healthcheck":true}'
      valid_status_codes: [200, 202]

  tcp_connect:
    prober: tcp
    timeout: 5s

  ssh_banner:
    prober: tcp
    timeout: 5s
    tcp:
      query_response:
        - expect: "^SSH-2.0-"

  icmp:
    prober: icmp
    timeout: 5s
    icmp:
      preferred_ip_protocol: ip4

  dns_udp:
    prober: dns
    timeout: 5s
    dns:
      transport_protocol: udp
      preferred_ip_protocol: ip4
      query_name: "gitea.home.arpa"
      query_type: A