TOP LEVEL CATEGORIES
EXPLORE
Description:
uses logfile parsing to determine number of emails processed by postfix in the last 5 minutes.
Performance issue on large logfiles is fixed in v1.1
Performance more improved by using awk in version 2.
HINT!!! If the version2 does not work, and you get 0 as result, First make sure nagios/nrpe has read permissions on the mail.log, secondly there might be a mismatch in the LOCALE variabels between the shell and the postfix environment. In that case do the following: 1) open a shell 2) give the command: awk -v now=`date +%s` ‘BEGIN{print strftime(“%b %d %T”, now)}’ 3) the result is something like this: mrt 29 11:46:01 4) open your maillog and take a look at the date format. (Probably it is: Mar 29 10:34:56) As you see, one says mrt, the other Mar. This will not work. 5) execute the following in the shell: export LC_TIME=en_US 6) give the awk command again. If this changes the output of the awk to the same output as used in the maillog, add this EXPORT-line somewhere in the script and you are done. 7) kairu0 found that it was not the locale that was wrong, but that the log files uses spaces instead of 0. Ie. “Aug 6” instead of “Aug 06”. In that case replace the strftime(“%b %d %T” with strftime(“%b %e %T” on two locations in the script. 8) if that did not work, try to figure out what locale command you should give, or contact me.
Current Version
2
Last Release Date
2013-03-20
Compatible With
Owner
Frank IJskes
License
GPL
check_postifx_processed (old version)
Improved version 1.1: check_postfix_processed
You must be logged in to submit a review.
Your review has been submitted and is pending approval.
To:
From:
Your recommendation has been sent.