Run Prometheus / PromQL queries, send emails based on query results (alert conditions). Also works with VictoriaMetrics if you use vmalert.

Ignore TLS errors

A TLS error from Alertmanager might look like this.

machine-001 alertmanager[5857]: ts=2023-02-16T08:13:15.195Z caller=notify.go:732 level=warn component=dispatcher receiver=mail-receiver integration=email[0] msg="Notify attempt failed, will retry later" attempts=1 err="send STARTTLS command: x509: cannot validate certificate for because it doesn't contain any IP SANs"

The Alertmanager configuration file is documented here. It has a tls_config section.

In order to ignore TLS errors with Alertmanager, you need to add a tls_config section. Here’s what it might end up looking after you add the relevant config keys.

  - name: 'mail-receiver'
    - to:
      send_resolved: true
        insecure_skip_verify: true

After adding the tls_config section, Alertmanager should be able to send email without complaining about TLS certificates.