[mrtg] Re: Can mrtg just read from file instead of SNMP?

Clint Alexander Clint.Alexander at corp.ptd.net
Wed Oct 6 16:25:39 MEST 1999


<quote>
if you want to monitor something which does not provide data via snmp you
can use some external program to do the data gathering. 
The external command must return 4 lines of output: 
     Line 1 
          current state of the first variable, normally 'incoming bytes
count' 
     Line 2 
          current state of the second variable, normally 'outgoing bytes
count' 
     Line 3 
          string (in any human readable format), telling the uptime of the
target. 
     Line 4 
          string, telling the name of the target. 
     Depending on the type of data your script returns you might want to use
the 'gauge' or 'absolute' arguments for the Options keyword. 
     Example: 
      Target[ezwf]: `/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0`
     Note the use of the backticks (`), not apostrophes (') around the
command. 
</quote>

Maybe this is what they are talking about.
This is a quote out of the 'config.html' file
on the Target[]: section. I read this, and do
not quite understand what to do in this scenario.
I want to pretend that none of our routers can
respond via snmp query, but still build the graphs.

The config.html does not quite explain how to do this in its entirety.
Is anyone else familiar with this procedure?

Clint Alexander


> This is what I was told, when mrtg runs, it queries the 
> routers via snmp for
> information.
> There was a way that instead of mrtg querying the routers, it can read
> information (usage) from a file
> instead if given a switch on the command line. If possible, 
> you can have
> mrtg read from a file instead of
> querying routers for the information, then build the log file 
> for rateup. We
> want to build the file mrtg can
> read from, then build the log files for rateup.  So, in other 
> words, mrtg
> will work local on the machine,
> and not do network requests at all.
> 
> Does this make sense ?


> > You mean you want to make the log files on your own? 
> > 
> > Ken 
> > 
> 
> > > Yes, I'm aware that cfgmaker --vendor community at router > mrtg.cfg
> > > will give u a proper config file. You run ./mrtg mrtg.cfg  
> > afterward.
> > > However, I mean, when ./mrtg mrtg.cfg runs, does it not query 
> > > the routers
> > > again to pull down stats, and build the log files for rateup?
> > > This is what we want to make on our own.
> > > 
> > >  
> 
> > > > MRTG reads its cfg file fromt the disk.  CFGmaker will make 
> > > > that cfg file by
> > > > pulling data from the router you want to monitor.  You can 
> > > > write your own
> > > > cfg files as long as you do it in the proper format. 
> > > > 
> > > > I'm not sure what you mean by a command switch as MRTG only 
> > > takes one
> > > > parameter, the cfg file. 
> > > > 
> > > > HTH, 
> > > > 
> > > > Ken 
> > > > 
> 
> > > > > Curious...
> > > > > Can you configure mrtg to read configurations from a file, 
> > > > instead of
> > > > > querying the router via snmp?
> > > > > I keep hearing there is a command switch that mrtg uses, but 
> > > > > I can't seem to
> > > > > find it.
> > > > > Does anyone know of this ?
> > > > >  
> > > > > Thanks In Advance.

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list