Skip to content

Commit

Permalink
feat: monitoring postfix on PMG
Browse files Browse the repository at this point in the history
With an alert if the number of mails is too high
  • Loading branch information
alexgarel committed Aug 22, 2024
1 parent 5144998 commit 295a8e1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions configs/prometheus/alerts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ groups:
description: Remaining disk space on {{ $labels.instance }} is {{ $value }}% for more than 15 minutes.


- alert: Postfix mail messages queue is high
expr: postfix_showq_message_age_seconds_count > 20
for: 1h
labels:
severity: warning
instance: "{{ $labels.instance }}"
annotations:
summary: stalled messages in queue {{ $labels.queue }} of {{ $labels.app }} ({{ $labels.instance }})
description: Number of messages for queue {{ $labels.queue }} of {{ $labels.app }} ({{ $labels.instance }}) is {{ $value }} for more than 1h.


# TODO: Revisit, too noisy
# - name: docker-alerts
# rules:
Expand Down
10 changes: 10 additions & 0 deletions configs/prometheus/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ scrape_configs:
service: postgres
env: net

- job_name: pmg-postfix
static_configs:
- targets:
# PMG
- "10.1.0.102:9154"
labels:
app: Proxmox mail gateway
service: postfix
env: prod

- job_name: docker-elasticsearch
static_configs:
- targets: ["10.1.0.200:9114"]
Expand Down

0 comments on commit 295a8e1

Please sign in to comment.