[mrtg] Re: Base logic for external arbitrary data to mrtg

Dowling, Steve Steve.Dowling at det.nsw.edu.au
Fri Dec 9 01:32:45 MET 2005


Scott,  

Yup, that link describes the vanilla mrtg logfile spec.  If you're using

an external script, read 
<http://people.ee.ethz.ch/~oetiker/webtools/mrtg/mrtg-reference.html> 
under the section "External Monitoring Scripts."   You will need to run 
your email script on your mrtg box, as you've written that down in your 
[Target].  

If you're getting 15 - 50 emails sent/received, that's plenty to log.  
>From my memory, MaxBytes is a required parameter, I'd set it to the 
maximum number of expected emails in/out per interval.  Maybe 100?  
>From memory (again) it's also used as the reference for calculating 
the relative percentages.  


SD


-----Original Message-----
From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch]
On Behalf Of Scott Haneda
Sent: Thursday, 8 December 2005 7:09 PM
To: MRTG
Subject: [mrtg] Re: Base logic for external arbitrary data to mrtg


on 12/7/05 11:55 PM, Scott Haneda at lists at newgeo.com wrote:

> Ok, I have a small daemon that does some stuff to my mail logs and
gets me
> the data I think I need.
> 
> Right now, if I call the program, it returns to me something like
this:
> 
> 1134028166 15 50
> Where 15 is sent emails and 50 is received
> 
> I am stuck on these docs:
> <http://people.ee.ethz.ch/~oetiker/webtools/mrtg/mrtg-logfile.html>
> 
> Are those just an explanation of the log file that mrtg makes from my
data,
> and I have currently sufficient data to run mrtg stats on my mail
logs?
> 
> Or is there an additional set of lines I need to add that  I am
missing?
> 
> I think I can just do this based on the above data?
> Target[mail.localhost]: `/usr/local/bin/mail_server_count`
> # What do I put in for maxbytes, not really applicable here?
> MaxBytes[smtp.localhost]: 1250000
> Title[mail.localhost]: Local Mail Traffic
> PageTop[mail.netsrv]: <H1>Local Mail Traffic</H1>

Also, of course, as would be this case, the little script that gathers
this
data is not the same machine as MRTG is on.  Whats the best way to get
bash
shell output onto the mrtg machine.  I can not really just scp it on
over on
schedule, as if the clocks on both machines are in perfect sysnc, cron
is
going to do things in perfect sync.  Seems odd to rely on staggered sron
schedules.

Rrdtool is to new to me, so I wont be able to use that, I am just
getting my
feet wet with vanilla MRTG.

Right now, I am thinking to wrap the shell script in php and just call
it
via curl as so:
Target[mail.localhost]: `curl http://www.site.com/mail.php`
-- 
-------------------------------------------------------------
Scott Haneda                                Tel: 415.898.2602
<http://www.newgeo.com>                     Novato, CA U.S.A.


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the mrtg mailing list