[mrtg] Re: Dumb Question about user-written scripts.

Tim Schuh tschuh at verio.net
Wed Jul 7 05:13:47 MEST 1999


Ted Bruyere wrote:
> One: I have seen from my journey through the contrib dir, that the
> apparent output that is required from a script is either text to stdout in
> the form
> 
> low_number
> high_number
> name
> 
> or 
> 
> low_number
> avg_number
> high_number
> name

If you look in the mrtg.cfg-dist or config.html documents you should
find the answer.  The way that MRTG is expecting data from external
programs is as follows:

  InputBytes
  OutputBytes
  Uptime
  Hostname

> Well I can run the script fine by hand, but when I give the target
> 
> Target[bombshelter.ca.cpuload]: '/usr/local/bin/perl /usr/local/bin/cpuload'

Should work.

> Target[bombshelter.ca.cpuload]: '/usr/local/bin/cpuload'

Same but shorter.

> nevertheless, the mrtg runs, it does so without any error messages and yet
> I never see the log file update. This might make sense if there was some
> bizarre redirection going on, but the output from my script is never
> reflected in the graphs (yes, I've deleted them and rebuilt). 

Be patient, it takes a few polls before anything interesting happens.

I hope that helps.


-- 

Tim Schuh
Network Systems
Verio Central

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