[mrtg] Re: Mailstats

Paul C. Williamson pwilliamson at mandtbank.com
Thu Dec 27 16:49:47 MET 2001


SO if you want the delta, you need to remove the gauge option and 
play around with perminute or perhour and adjust the interval of 
collection accordingly.  I'm not exaclty sure how that would work, 
bit I think if you collected the stats once and hour, you want to 
have the "perhour" option enabled.  That should give you close 
to what you are looking for.  If you don't use the perhour or 
perminute options, I don't know what to tell you.  

Thinnk about what Alex said.  If you have 49 incoming messages 
in 300 seconds, the rate is 49/300.  That is not worth graphing.  
It isn't even 1 per second.  If you added thge perminute option, 
the number would be multiplied by 60.  So then you'd get per 
minute instead of the default per second.  I think a better way 
might be to query the data every hour and add the perhour option.  
That way, the polled data would be multiplied by 3600 to give you 
a per hour stat versus a per second value.

It is not exaclty the best way to do it, but it should work either way.
So in the previous example, if you got 49 in the last 300 second period 
with the perminute option turned on, you'd have 2940/300 or 9.8 messages 
per minute.  That is very close, since you actually got 49 messages in the 5 minute span.  ~50 messages in 5 minutes is about 10 per minute. 

That should work...

Paul

>>> "David Gitman" <david at gitman.net> 12/27/01 10:39AM >>>
We'll if I add gauge it works but I'm not getting the graph's I need
then. My mailstats script prints out the actual number but I need to
graph the delta between the polls. Can I do that?

Thanks,

David Gitman
david at gitman.net 
www.gitman.net 

-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch] 
On Behalf Of Paul C. Williamson
Sent: Thursday, December 27, 2001 8:37 AM
To: david at gitman.net 
Cc: mrtg at list.ee.ethz.ch 
Subject: [mrtg] Re: Mailstats


David,

A few items...

1 - Add gauge to the list of options.  
2 - Like Alex suggested, play around with the perhour or perminute 
options.
3 - Run the script about every 5 minutes.  Do something like 900 and 
300 the first time.  After the first run, but before the second, change 
the numbers to 1200 and 600.  Do that for at least 3 iterations, 
increasing the data by 300 each time.  You really only need to 
do it twice to verify data is getting to the second line.  Do it every 
5 minutes.  Probably easiest to put it in cron.

Paul

>>> "David Gitman" <david at gitman.net> 12/27/01 12:29AM >>>

Here's the config file.

Target[syn.mail]: `/usr/bin/mrtg-mailstats-test`
MaxBytes[syn.mail]: 1500000
Title[syn.mail]: Sendmail Statistics
PageTop[syn.mail]: <H1>Sendmail Statistics</H1>
YLegend[syn.mail]: No. of messages
ShortLegend[syn.mail]: messages
LegendI[syn.mail]: &nbsp;Incoming:
LegendO[syn.mail]: &nbsp;Outgoing:
Options[syn.mail]: nopercent, integer

I ran it with the shell script instead and the log only shows data on
the first line.

1009430698 900 3000
1009430698 0 0 0 0
1009430697 0 0 0 0
1009430400 0 0 0 0
1009430100 0 0 0 0

Any ideas?

David Gitman
david at gitman.net 
www.gitman.net 

-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch] 
On Behalf Of Alex van den Bogaerdt
Sent: Wednesday, December 26, 2001 10:21 PM
To: David Gitman
Cc: MRTG users
Subject: [mrtg] Re: Mailstats


David Gitman wrote:
> 
> All this "mailstats" talk got me wondering. I decided to get it
running
> and now I'm seeing some funkiness. In the MRTG log file
(host.mail.log),
> only the first line has data (1009394402 878 2005). I look at the file
> again after MRTG runs a few times and the first line increments
> (1009394701 894 2054) but all the lines underneath report "0 0 0 0"
> (1009394701 0 0 0 0). Any ideas why it's not updating?

The numbers go from 878 to 894, and from 2005 to 2054.  This happens
in 299 seconds.  This means you have an increase of 16 and 49 in 299
seconds which is 16/299 and 49/299 per second.  This is too little
for a normal counter however you could try to use the perhour option.

You are using gauge (learned this from your other mail) so it should
just work.

Check the script for unusual characters such as control characters.
Try another MRTG version.
Try running a test script, one that just reads something like
    #!/bin/bash
    echo 900
    echo 3000
and see if this shows up.
Check your configuration for undesired options, perhaps on the [^]
target (and similar ones).
Try building a new config file, just the mailstats in it.

enough to do for now I guess :)

cheers,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. |

+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
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 



--
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 



--
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 



--
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