Postfix
Postfix
SNMP Extend
-
Copy the shell script, postfix-queues, to the desired host
wget https://github.com/librenms/librenms-agent/raw/master/snmp/postfix-queues -O /etc/snmp/postfix-queues
-
Copy the Perl script, postfixdetailed, to the desired host
wget https://github.com/librenms/librenms-agent/raw/master/snmp/postfixdetailed -O /etc/snmp/postfixdetailed
-
Make both scripts executable
chmod +x /etc/snmp/postfixdetailed /etc/snmp/postfix-queues
-
Edit your snmpd.conf file and add:
extend mailq /etc/snmp/postfix-queues extend postfixdetailed /etc/snmp/postfixdetailed
-
Restart snmpd.
sudo systemctl restart snmpd
-
Install pflogsumm for your OS.
-
Make sure the cache file in
/etc/snmp/postfixdetailed
is some place that snmpd can write too. This file is used for tracking changes between various values between each time it is called by snmpd. Also make sure the path for pflogsumm is correct. -
Run
/etc/snmp/postfixdetailed
to create the initial cache file so you don't end up with some crazy initial starting value.
Note
that each time /etc/snmp/postfixdetailed
is ran, the cache file is updated, so if this happens in between LibreNMS doing it then the values will be thrown off for that polling period.
The application should be auto-discovered as described at the top of the page. If it is not, please follow the steps set out under SNMP Extend
heading top of page.
Note
If using RHEL for your postfix server, qshape
must be installed manually as it is not officially supported. CentOs 6 rpms seem to work without issues.