Postfix

check_postfix_processed

4.8 (5)
88,585
0
0

Thank you for your review!

Your review has been submitted and is pending approval.

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.


Project Details

Current Version

2

Last Release Date

2013-03-20

Owner

Frank IJskes

License

GPL

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI

Recommend

To:


From: