Dovecot
Bleemeo monitors the Dovecot IMAP/POP3 mail server through automatic service detection, IMAP health checks, and optional detailed metrics collection via a Prometheus exporter.
Auto-Detection
Section titled “Auto-Detection”Glouton automatically detects Dovecot instances running on the host. If the auto-detected parameters are incorrect, you can override them manually by adding the following to /etc/glouton/conf.d/99-dovecot.conf:
service: # For a Dovecot running outside a container - type: "dovecot" address: "127.0.0.1" port: 143 # IMAP listener; IMAPS is not supported here
# For an additional Dovecot running outside a container - type: "dovecot" instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE" address: "127.0.0.1" port: 144 # IMAP listener; IMAPS is not supported here
# For a Dovecot running in a Docker container - type: "dovecot" instance: "CONTAINER_NAME" address: "172.17.0.2" port: 143 # IMAP listener; IMAPS is not supported hereHealth Check
Section titled “Health Check”Glouton performs an IMAP health check when the service listens on port 143.
| Metric | Description |
|---|---|
service_status | Status of Dovecot |
Exporter Metrics
Section titled “Exporter Metrics”Detailed Dovecot metrics are collected using the third-party dovecot_exporter.
Prerequisites
Section titled “Prerequisites”- Dovecot IMAP/POP3 server installed and running
- Glouton agent installed on the same host
- Dovecot stats socket accessible (usually at
/var/run/dovecot/stats)
Service Configuration
Section titled “Service Configuration”Ensure the Dovecot stats socket is available. On most installations it is enabled by default at /var/run/dovecot/stats. Verify with:
ls -la /var/run/dovecot/statsIf the socket does not exist, enable the stats service in your Dovecot configuration (/etc/dovecot/conf.d/10-master.conf).
Installing the Exporter
Section titled “Installing the Exporter”Download the latest release from the dovecot_exporter releases page, or install with Go:
go install github.com/kumina/dovecot_exporter@latestStart the exporter:
dovecot_exporter --dovecot.socket-path=/var/run/dovecot/statsThe exporter listens on port 9166 by default. Verify it is working:
curl http://localhost:9166/metricsFor production use, create a systemd service unit to manage the exporter process.
Glouton Configuration
Section titled “Glouton Configuration”sudo tee /etc/glouton/conf.d/99-dovecot.conf > /dev/null << 'EOF'metric: prometheus: targets: - url: "http://localhost:9166/metrics" name: "dovecot" allow_metrics: - "dovecot_up" - "dovecot_auth_successes" - "dovecot_auth_failures" - "dovecot_mail_read_bytes" - "dovecot_imap_connections"EOFCreate or edit C:\ProgramData\glouton\conf.d\99-dovecot.conf:
metric: prometheus: targets: - url: "http://localhost:9166/metrics" name: "dovecot" allow_metrics: - "dovecot_up" - "dovecot_auth_successes" - "dovecot_auth_failures" - "dovecot_mail_read_bytes" - "dovecot_imap_connections"| Metric | Description |
|---|---|
dovecot_up | Whether the Dovecot stats socket is reachable (1 = up) |
dovecot_auth_successes | Total number of successful authentication attempts |
dovecot_auth_failures | Total number of failed authentication attempts |
dovecot_mail_read_bytes | Total number of bytes read from mailboxes |
dovecot_imap_connections | Current number of active IMAP connections |