OK, last reply to self for today:

Mike Lewinski wrote:

> $ tail -n 10 /etc/mrtg.cfg
> Target[postfix]: 
> .1.3.6.1.4.1.2021.50.101.1&.1.3.6.1.4.1.2021.50.101.2:[EMAIL PROTECTED]:
> MaxBytes[postfix]: 99999
> Options[postfix]: gauge, growright
> Title[postfix]: Postfix Statistics
> PageTop[postfix]: <H1>Postfix Statistics</H1>
> WithPeak[postfix]: dwmy
> YLegend[postfix]: No. of messages
> ShortLegend[postfix]: messages
> LegendI[postfix]: &nbsp;Incoming:
> LegendO[postfix]: &nbsp;Outgoing:
> # Change community string above and 127.0.0.1 to your postfix
> # server's snmp config.

Of course, I meant the IP address in the Target above is your postfix 
server's IP, and in that server's snmpd.conf you specify your MRTG 
machine's IP on the rocommunity line.


> $ diff /usr/local/bin/mailstats2.pl /usr/local/bin/mailstats.pl
> 18c18
> <       print "$foo{$_}\n" ;
> ---
>  >       print "$_ $foo{$_}\n" ;
> 21d20
> <

The trailing \n is probably redundant, although it doesn't seem to hurt 
MRTG in this case. But that line could simply be:

print "$foo{$_}";


I have a frozen snapshot of the mailstats graph that is publicly visible 
here:

http://cam.lazyz.org/postfix.html

Not much data there yet, but it looks reasonable...

Mike


Reply via email to