[mrtg] External log parser
Matthew Daubenspeck
matt at oddprocess.org
Thu May 1 18:41:58 MEST 2003
I am trying to use a test shell script to parse through my email logs to
show spam filtered messages and "clean" messages. The external script
works well, as well as it's interaction with mrtg. However, I can't seem
to get it to properly report the correct numbers.
This is on a testing server, so the message numbers are low...
mrtg.cfg:
Target[spam]: `/usr/local/scripts/spam.sh`
Options[spam]: nopercent, integer, gauge
MaxBytes[spam]: 200
AbsMax[spam]: 200
Title[spam]: Email Message Breakdown
PageTop[spam]: <H1>Email Message Breakdown</H1>
YLegend[spam]: Messages
ShortLegend[spam]: Messages
LegendI[spam]: Clean
LegendO[spam]: Spam
This is where I get a bit foggy. The external script just parses the log
and counts how many times a certain string is printed. As the day goes
on, the numbers returned will obviously grow, but I do not want to
report the TOTAL number, only the difference from the last report.
Do I have to modify my script, or can mrtg calculate the difference?
Thanks for the help.
--
:wq!
Matthew Daubenspeck
http://www.oddprocess.org
--
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