Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Postfix

Published and supported by SupportBee Inc. New Relic


Description

Thank you for choosing SupportBee's Postfix plugin. This plugin

  • Monitors the sizes of Deferred, Bounce, Active, Incoming, Hold and Corrupt queues of Postfix
  • Automatically alerts you if the Deferred or Bounce queues grow large (> 100 mails)

Requirements

  • Python 2.6 or Python 2.7 and the pip package manager (pip is required for installation)
  • The plugin uses the postconf command and a few other commands to monitor the sizes of Postfix's queues. So, the plugin has to be installed as root and also on the same server as the Postfix instance.

Installation

As root, run the following commands

Install Python 2 and the pip package manager

apt-get update
apt-get install python python-pip

You may also have to install the python-dev package

apt-get install python-dev

Install the plugin itself

cd ~
git clone git@github.com:SupportBee/newrelic-plugin-agent.git
cd newrelic-plugin-agent
git checkout postfix_support
pip install -e `pwd`

Create the config file

mkdir -p /etc/newrelic/
wget https://gist.githubusercontent.com/nisanth074/254682efea9131179e5cedd490b84b46/raw/b1b97fbf5541f7b166e27db288c86b3b1e4133cb/newrelic-plugin-agent.cfg

and add your New Relic license key to the config file

sed -i -e 's/YOUR_NEWRELIC_LICENSE_KEY/youactualnewreliclicensekey/g' newrelic-plugin-agent.cfg

Create the log directory

mkdir -p /var/log/newrelic-plugin-agent

And start the plugin

newrelic-plugin-agent -c /etc/newrelic/newrelic-plugin-agent.cfg

You can also start the plugin using init

cd /etc/init.d/
wget https://raw.githubusercontent.com/SupportBee/newrelic-plugin-agent/f6f83c57297405be912ce968778665053ad9b4cc/etc/init.d/newrelic-plugin-agent.deb -O newrelic-plugin-agent
/etc/init.d/newrelic-plugin-agent start
update-rc.d newrelic-plugin-agent defaults

The benefit with using init is that init will automatically start the plugin if you reboot your server anytime

Once you start the plugin (either directly or using init), wait for a few minutes, visit the New Relic Plugins product and go to the Postfix tab. You should see your server in the list of Postfix instances in that tab. If you don't see a Postfix tab or don't see your server in the list of Postfix instances, check the plugin's log file /var/log/newrelic/newrelic-plugin-agent for errors.

Setup Alerts

If you've migrated to the new New Relic Alerts product, automatic alerts won't work. Fortunately, its fairly easy (and also more flexible) to just setup these alerts yourself. Visit the New Relic Alerts product, go to the "Alert policies" section and setup an Alert policy for Postfix. You can use the follow metrics in the Alert policy conditions

  • Component/Postfix/DeferredQueueSize[messages]
  • Component/Postfix/BounceQueueSize[messages]
  • Component/Postfix/ActiveQueueSize[messages]
  • Component/Postfix/IncomingQueueSize[messages]
  • Component/Postfix/HoldQueueSize[messages]
  • Component/Postfix/CorruptQueueSize[messages]

Source

The source code is available on Github

License

This plugin is a fork of MeetMe's New Relic plugins and they've a license https://github.com/SupportBee/newrelic-plugin-agent/blob/postfix_support/LICENSE

Support

Postfix and this plugin are a critical part of our infrastructure. If you've any feature requests or face issues when installing the plugin or setting up alerts, just tweet to us Twitter or send us an email.

The Postfix plugin extends the power of New Relic's monitoring capabilities.


Get This Plugin

Already have a New Relic account? Log in and begin using this plugin.

If you don't have a New Relic account, follow these three simple steps:

How To Install A Plugin

Installing a plugin is simple and fast.

Installing
a Plugin
  1. Step One

    Sign in to your New Relic account

  2. Step Two

    Select and install plugin

  3. Step Three

    Start seeing data

That’s it. You’re done. Simple.

Sign Up for New Relic

Back to top icon