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

Scott Haneda lists at newgeo.com
Thu Dec 8 09:08:59 MET 2005


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



More information about the mrtg mailing list