Go to file
Bart Vercoulen 0a26a0348b
Merge pull request #6 from silkeh/collect-from-journal
Implement collection from the systemd journal
2018-02-02 11:40:17 +01:00
.gitignore Check in an initial copy of our Postfix metrics exporter. 2017-02-17 15:29:37 +01:00
build_static.sh Add a build script for the Postfix exporter. 2017-05-02 14:44:21 +02:00
LICENSE Check in an initial copy of our Postfix metrics exporter. 2017-02-17 15:29:37 +01:00
postfix_exporter.go Implement collection from the systemd journal 2018-01-28 15:09:32 +01:00
README.md Also start scraping Postfix's log file for more relevant stats. 2017-05-02 15:07:19 +02:00
systemd.go Implement collection from the systemd journal 2018-01-28 15:09:32 +01:00

Prometheus Postfix exporter

This repository provides code for a Prometheus metrics exporter for the Postfix mail server. This exporter provides histogram metrics for the size and age of messages stored in the mail queue. It extracts these metrics from Postfix by connecting to a UNIX socket under /var/spool.

In addition to that, it counts events by parsing Postfix's log file, using regular expression matching. It truncates the log file when processed, so that the next iteration doesn't interpret the same lines twice. It makes sense to configure your syslogger to multiplex log entries to a second file:

mail.* -/var/log/postfix_exporter_input.log

Please refer to this utility's main() function for a list of supported command line flags.