Monitoring Postfix with collectd

Follow this guide to fetch Postfix performance metrics with collectd for monitoring, graphing and alerting purposes.

Postfix Latency Monitoring

Postfix Message Status Monitoring

We use the tail collectd plugin to fetch these metrics from the Postfix logfile. This plugin is included by default in our collectd distribution so no additional installation is required.

Download monitor-postfix.conf from our GitHub repo.

Then place it in your collectd config directory; for example /opt/wormly/collectd/etc/collectd.d/. You may need to edit this file to specify the location of your maillog if it is not the standard /var/log/maillog.

Test your collectd configuration:

collectd-wormly -T

No errors and {"ok":true} shown on the console? Reload the daemon to commence data collection:

service collectd-wormly restart

Monitoring Multiple Postfix Instances

If you have more than one instance of Postfix that you wish to monitor, simply duplicate the monitor-postfix.conf config file and change the Instance configuration key accordingly:

  <File "/var/log/maillog">
    Instance "postfix"

Your second Postfix instance might look like this:

  <File "/var/log/second-maillog">
    Instance "postfixSecondInstance"

Through the Wormly interface you will see separate metrics and graphs labeled Postfix and Postfix SecondInstance respectively.

Downtime Hurts. Start monitoring and stop worrying.

Our monitoring service continually tests your servers & web sites to keep you online and performing fast. Fully-featured plans start from just $44 / month.

But don't listen to our spiel - Decide for yourself with a free trial »