[mrtg] Email counter from script

Corstian corstian at consonare.nl
Mon Apr 11 09:19:20 MEST 2005

Hi all,

I am working on a mrtg graph, which shows the number of GOOD mails vs the
number of SPAM mails.

Therefore, I created entries in my .procmailrc which counts all incoming
mail, and I created a script which has the following output:

#TOTAL number of SPAM mails
#TOTAL number of GOOD mails

So far, so good. The counters are working fine, and the script creates the
expected output.

I started with the following mrtg config, which runs without any error.

Target[corstian.GOOD.SPAM]:     `/home/corstian/bin/mrtg/mail_count
corstian show SPAM GOOD`
Options[corstian.GOOD.SPAM]:    growright
Title[corstian.GOOD.SPAM]:      Corstians Mail
MaxBytes[corstian.GOOD.SPAM]:   10000000000
LegendI[corstian.GOOD.SPAM]:    SPAM
LegendO[corstian.GOOD.SPAM]:    GOOD
Legend1[corstian.GOOD.SPAM]:    SPAM mails received
Legend2[corstian.GOOD.SPAM]:    GOOD mails received
YLegend[corstian.GOOD.SPAM]:    Mails
ShortLegend[corstian.GOOD.SPAM]: Mails
PageTop[corstian.GOOD.SPAM]:    <H1>Corstians Mail </H1>

The top of the logfile looks as follows:
root at pinkpanther # head -n 5 corstian.good.spam.log
1113202509 4 29
1113202509 0 0 0 0
1113202211 0 0 0 0
1113202200 0 0 0 0
1113201900 0 0 0 0

After I received some emails, the counter increased, and even the counter
in the logfile increased, but I just get zero's on my graphs...`

What do I want to see ??
Every time one of the counters increases, I want to see the difference
with the old value in my graph.

The weekly graph shouldn't be the mean value of the daily graph, but the
total value!! etc.

I hope somebody can help me!



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