diff options
author | 2024-08-26 17:49:22 +0200 | |
---|---|---|
committer | 2024-08-26 17:40:43 +0100 | |
commit | 37eefad55d7c6c6db0d4375f74ebed1a98862bb8 (patch) | |
tree | e963d7541a956d6ec051ad47764780daacec6fec | |
parent | Install prometheus-postfix-exporter (diff) |
Install prometheus-postfix-exporter
As a data-obsessed administrator I want to have more data such that I
can widen my sense of power.
This also installs rsyslog, because prometheus-postfix-exporter doesn't
work with journald's binary log format.
-rw-r--r-- | ansible/host_vars/lovelace/prometheus.yml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ansible/host_vars/lovelace/prometheus.yml b/ansible/host_vars/lovelace/prometheus.yml index 68709f0..3ed97ba 100644 --- a/ansible/host_vars/lovelace/prometheus.yml +++ b/ansible/host_vars/lovelace/prometheus.yml @@ -141,4 +141,25 @@ prometheus_rules: | summary: Too many deadlocked tables description: "PostgreSQL has dead-locks, value: {{ $value }}" + - name: postfix + rules: + - alert: postfix/down + expr: postfix_up != 1 + for: 5m + labels: + severity: warning + annotations: + summary: Postfix is down (instance {{ $labels.instance }}) + - alert: postfix/smtp-temporary-errors + expr: rate(postfix_smtpd_messages_rejected_total{code=~"^4.*"}[15m]) > 0 + for: 0m + labels: + severity: warning + annotations: + summary: Postfix is rejecting messages due to errors (instance {{ $labels.instance }}) + description: Postfix has seen code {{ $labels.code }} errors recently + and temporarily rejected emails. + https://en.wikipedia.org/wiki/List_of_SMTP_server_return_codes and + `sudo journalctl -xeu postfix@-` may provide more information on + the current issue. {% endraw %} |