exim graphs
Post by: tom on February 25th, 2009 | File Under Mailserver, MonitoringTags: exim, graph, log, statistic, syslog
Because I did not found a tool to create graphs (the way I want it)
from exim logs, I wrote a little bash script that suits my needs.
Example graph:

Download: exim_rrd-0.9.5.1 (updated 2009-03-07 [bugfix])
I’m not a programmer, so the script can be improved – no question : )
If you have any hints, please tell me.
Usage: run as cronjob, i.e.
# mail statistic
*/5 * * * * /usr/local/bin/exim_rrd > /dev/null 2> /dev/null
dependencies:
rrdtool [ http://oss.oetiker.ch/rrdtool/ ] ^ thanks to Tobias Oetiker
(e)grep
- – - – - – - – - – - – - – - – - – - – - – - – - – - – - – - – - – - – - – - – - – - – -
tested with:
rrdtool 1.2.23, rrdtool 1.2.27
openSUSE 10.3 (i586), exim 4.69 main log
openSUSE 11.0 (i586), exim 4.69 main log
March 16th, 2009 at 21:27
[...] Source code is here. [...]
March 21st, 2009 at 15:17
Very good, and quite simple/clean to read.
A job well done!
May 25th, 2009 at 11:08
hi there,
just tested this script with postfix on an old suse 10.2 (sic!); worked so far
except some minor changes:
line:55 >= this works only with the trailing |
## delete the last character (the last | isn’t wanted)
#SEARCH=`echo $e | sed ‘s/.$//’`
i also made some modificatiosn for the filters to fit for postfix/rbl_rejects:
# ALL accepted mails
# might be too: “delivered to mailbox”
ACCEPTED=`echo “$CONTENT” | grep ” status=sent ” | wc -l`
#
# ALL blocked mails
REJECTED=`echo “$CONTENT” | grep ” reject:” | wc -l`
nice script, though
mex