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

Purvis, William William.Purvis at compaq.com
Tue Mar 20 05:57:41 MET 2001


Hi Bear:
	I've tried your suggestion below, and it works and successfully adds
the return values of the OIDs together.  However, my original e-mail and
what I wanted was to do the following:

	Total Disk Space - oid value #1 - oid value #2.

	In the above formula, the total disk space is a constant.  When
using the negative signs in the formula above, it shifts the oid values from
being plotted on the "InBytes", to the "OutBytes", and does not actually
subtract the values.

	Here is the target lines I've tried:

Target[FRC_PAR_01.SYS2]:4096000  -
1.3.6.1.4.1.23.2.28.2.14.1.4.1&1.3.6.1.2.1.8.6.0:public at 10.128.1.40  -
1.3.6.1.4.1.23.2.28.2.14.1.5.1&1.3.6.1.2.1.8.6.0:public at 10.128.1.40

and

Target[FRC_PAR_01.SYS2]:1.3.6.1.4.1.23.2.28.2.14.1.4.1&1.3.6.1.2.1.8.6.0:pub
lic at 10.128.1.40  +
1.3.6.1.4.1.23.2.28.2.14.1.5.1&1.3.6.1.2.1.8.6.0:public at 10.128.1.40  -
4096000


Because of this, I will probably create a perl script along with using the
"SNMPUTIL.EXE" utility from the NT Resource kit to add these together.  I
will make the script fairly generic, and post the script when I've finished
it.

Regards,

William Reid Purvis
Compaq Professional Services,
ITP - Infrastructure & Technology Planning Group
e-mail: william.purvis at compaq.com
tel: +61 2 9022 2663
mobile: 0412 255 607





-----Original Message-----
From: bear [mailto:bear at tik.com.au]
Sent: Monday, 19 March 2001 5:37 PM
To: Purvis, William
Cc: mrtg at list.ee.ethz.ch
Subject: Re: [mrtg] Re: Doing math with Multiple SNMP OID Targets


Yes seems to be summin missing
> Target[FRC_PAR_01.SYS1]:1.3.6.1.4.1.23.2.28.2.14.1.4.1:public at 10.128.1.40
+
> 1.3.6.1.4.1.23.2.28.2.14.1.5.1:public at 10.128.1.40

should read
1.3.6.1.4.1.23.2.28.2.14.1.4.1&1.3.another_oid_with_a_null_or_0_value:public
@10.128.1.40  +
1.3.6.1.4.1.23.2.28.2.14.1.5.1&1.3.another_oid_with_a_null_or_0_value:public
@10.128.1.40

try that with an OID of 0 or zero , shouldnt be hard to find one :)
Bear

----- Original Message -----
From: "Purvis, William" <William.Purvis at compaq.com>
To: "bear" <bear at tik.com.au>
Cc: <mrtg at list.ee.ethz.ch>
Sent: Monday, March 19, 2001 1:06 PM
Subject: [mrtg] Re: Doing math with Multiple SNMP OID Targets


>
> Hi Bear & All:
> I've tried your suggestions below, and did not get anything graphed.
> I went into the log file and there were no values being collected.  MRTG
> however did not give me any errors.  I am running MRTG 2.9.10 on Windows
NT
> 4 SP6.
>
-----snip -------

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