Postfix Monitoring

applications
Tags: #<Tag:0x00007fe2251a42a8>

#1

Hi Guys,

So for some reason I’m unable to monitor my postfix queue
image

I have tried the below Resolution but no success.

Open the postfixdetailed file and change /var/log/maillog to /var/log/mail.log
I also changed the $pflogsumm= variable so it includes the sudo command.

$pflogsumm=’/usr/bin/env /usr/bin/sudo /usr/sbin/pflogsumm’;

And added this code to a sudoers file;

snmp ALL=(ALL) NOPASSWD: /usr/sbin/pflogsumm /var/log/mail.log

Maybe you need to change the first word “snmp” to the username your snmp deamon runs on.

For postfix-queues i’ve edited the file to include the sudo command;

COUNT=sudo /usr/sbin/qshape $i | grep TOTAL | awk '{print $2}'

And added this to a sudoers file

snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape incoming
snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape active
snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape deferred
snmp ALL=(ALL) NOPASSWD: /usr/sbin/qshape hold

Please note that you need to restart the snmp daemon so the sudoers permissions are set.


#2

run ./poller.php -h HOSTNAME -d and look to see why no services data is being returned.


#3

soo found this after running poller

Can’t open ‘/var/cache/postfixdetailed’ at /etc/snmp/postfixdetailed line 546.


#4

This is n resolution

Make sure the cache file in /etc/snmp/postfixdetailed is some place that snmpd can write too.

but I’m not sure how to implement it.


#5

This resolves that error

chmod 777 /var/cache/postfixdetailed


#6

not sure how I can resolve this CHMOD does not work setting up sudo rights does not work

“Can’t cd to active: Permission denied
at /usr/sbin/qshape line 375.
0
Can’t cd to active: Permission denied
at /usr/sbin/qshape line 375.
0
Can’t cd to active: Permission denied
at /usr/sbin/qshape line 375.
0
Can’t cd to active: Permission denied
at /usr/sbin/qshape line 375.
0”