Go to file
Bart Vercoulen fbe83f5c3e
Merge pull request #8 from kumina/init_histograms
Initialize histograms to zero
2018-02-08 15:01:47 +01:00
.gitignore Initialize histograms to zero 2018-02-07 14:24:08 +01:00
build_static.sh build_static.sh updated to ubuntu docker container to support systemd journal usage. 2018-02-02 11:51:33 +01:00
LICENSE Check in an initial copy of our Postfix metrics exporter. 2017-02-17 15:29:37 +01:00
postfix_exporter.go Comments added. 2018-02-07 15:12:35 +01:00
README.md build_static.sh updated to ubuntu docker container to support systemd journal usage. 2018-02-02 11:51:33 +01: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

There is also an option to collect the metrics via the systemd journal instead of a log file.

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