[mrtg] graphing clamd (antivirus) activity..
Jason
jason at monsterjam.org
Sun Dec 12 20:13:56 MET 2004
I see lots of people doing it and I tried using qmail-mrtg, but the clad log scanning doesnt work for me for whatever reason.
So I decided to do my own script, which kinda works, but not completely..
Heres the relevant stuff..
/usr/local/bin/mrtg /usr/local/etc/mrtg/newbie.cfg
and in /usr/local/etc/mrtg/newbie.cfg
is
Title[clamd]: clamd - FQDN
MaxBytes[clamd]: 10000
AbsMax[clamd]: 100000
Options[clamd]: gauge
Target[clamd]: `/usr/local/etc/mrtg/clam_av.sh`
PageTop[clamd]: <B>FQDN ClamAV</B><br>
ShortLegend[clamd]: Msg
YLegend[clamd]: viri/hour
Legend1[clamd]: a
LegendI[clamd]: found
LegendO[clamd]: errors:
WithPeak[clamd]: ymwd
XSize[clamd]: 400
YSize[clamd]: 100
and /usr/local/etc/mrtg/clam_av.sh
has
#!/bin/sh
#grep FOUND /var/log/clamav/clamd.log | cut -d \ -f 2 | sort | uniq -c
VIRCOUNT=`grep -c FOUND /var/log/clamav/clamd.log`
echo $VIRCOUNT
echo 0
echo `uptime`
echo `hostname`
monsterjam# grep -c FOUND /var/log/clamav/clamd.log
10
but it graph just gives a straight line as in
http://monsterjam.org/mrtg/clamd.html
how do I get it to only look at that "10" for on hour then look for newer data?
regards,
JAson
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list