[mrtg] Re: MRTG to graph spam stats

Steve Shipway s.shipway at auckland.ac.nz
Mon Sep 25 00:05:49 MEST 2006


> Are there any good spam stats scripts for MRTG? Im running sendmail
with
> Spamassassin and the /var/log/maillog has all the rating of each
email.
> Is there a good way to parse the log file so MRTG can graph it?

We do this using a PHP script (amavis-stats) by a guy called Mark
Lawrence.  I've hacked it somewhat to do the same with spamassassin logs
as it does with virus logs, so we get a whole pile of rrd files.  I then
have some (dummy) .cfg files that allow the routers2 frontend to read
these generated .rrd files and produce graphs - in addition to the more
complex summary graphs produced by the amavis-stats programs.

So, I get a stacked 3-value graph showing passed, virus and spam
messages/min, with a further breakdown over our 4 mail hosts.

I'm not completely sure I'd advise doing it this way since the script is
a bit ugly (I suspect our version is a bit old - 2003 - and I've hacked
it without knowing PHP, but it works) however you'd probably be better
off writing something in perl to send the logs (via syslogd?) to your
mrtg server, then parse them and push the data into your rrd files which
are then displayed by your favourite frontend via a dummy .cfg file.

Steve

--
Steve Shipway
ITSS, University of Auckland 
(09) 3737 599 x 86487
s.shipway at auckland.ac.nz

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the mrtg mailing list