[mrtg] Re: Doing math with Multiple SNMP OID Targets

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Fri Mar 16 04:00:06 MET 2001


Purvis, William wrote:
> 
> subtract, multiply, divide) with 2 OIDs and a constant within MRTG?  I have
> tried putting the following in the Target parameter, with no luck.
> 
> Title[FRC_PAR_01.SYS]: Sys Volume Used Space
> Target[FRC_PAR_01.SYS]:4096000-1.3.6.1.4.1.23.2.28.2.14.1.4.1+1.3.6.143.2.28
> .2.14.1.5.1&4096000-1.3.6.1.4.1.23.2.28.2.14.1.4.1+1.3.6.143.2.28.2.14.1.5.1
> :public at 10.128.1.40

Adding whitespace seems to help, sometimes.  Try to do
4096000 - 1.3.6.1.4.1.23.2.28.2.14.1.4.1&1.3.6.143.2.28.2.14.1.5.1\
   :public at 10.128.1.40
(one long line wrapped in this email only)

If this calculation is too complex for MRTG (I can imagine that
"4096000 - " is) you can always revert to writing an external
script to gather the data.  This external script should then be
called from within MRTG.

Another approach is to monitor all OIDs with MRTG and RRDtool as
backend.  You can write your own script to display the statistics
using RRDtool.  Just use MRTG+RRDtool to monitor 
1.3.6.1.4.1.23.2.28.2.14.1.4.1&1.3.6.143.2.28.2.14.1.5.1
and do your calculation using the CDEF language of RRDtool.

Please let me know if this works for you (but don't expect
an answer from me in the next 6 hours; need some sleep).

cheers,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

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