[mrtg] Scripts default to "gauge" type?

Liebert, David (NZ) David.Liebert at Compaq.com
Tue Mar 26 23:23:56 MET 2002


When I use a script in MRTG (i.e., using the back quote syntax) this seems to force it to use the "gauge" type.
 
This is a real pain because in many cases the "natural" form of the data is cumulative so I want and expect MRTG to use its "normal" method of calculating a five minute differential.  This means that I have to write a more complicated script which reads the values, waits five minutes, reads the values again, subtracts, etc.  Of course this all needs to be scheduled and written to a file which is then read by MRTG using the back-quote syntax.
 
I really don't understand why this is necessary because I am NOT using the "gauge" keyword.  Why is it not documented that values returned by a script are always treated as "gauge" even if the "gauge" keyword is not used?
 
There is a keyword for "gauge" and "absolute", so why is there not a keyword I can use to force the "normal" behaviour?
 
Maybe my MRTG version is buggy.  It is 2.9.6?
 
As an example, I use a script to get network interface byte counters (which are cumulative 32 bit values).  These counters are identical to similar interface counter values used by SNMP.  (I'm not using SNMP because of firewall issues which I won't go into here.)  What I would like to do is have my script just return the raw interface counter values, but instead I have to complicate the script by working out a five minute differential.  The five minute differential then graphs perfectly, even though I am NOT using the "gauge" keyword.  If don't calculate a five minute differential myself I get a useless graph which rises more-or-less constantly.

======================================= 
David Liebert MCSE+I, ASE, OCP, CCNA 
Network & Systems Management Specialist 
Compaq Computer NZ Ltd. 
Christchurch, New Zealand 
======================================= 

 

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