[mrtg] Re: Doing math with Multiple SNMP OID Targets
Purvis, William
William.Purvis at compaq.com
Sun Mar 18 22:47:09 MET 2001
Hi Tim:
Thanks for your e-mail below. What I am trying to do is calculate
the used disk space on a NetWare volume. Netware has two SNMP values which
make up the freespace on a volume (the non used disk space & the purgable
space). If these two values are added together, then one gets the total
freespace on the volume. If you then subtract these both from the total
volume size (4096000 KB in the example below), the you get the total used
space (which is what I wanted to graph). I have tried several variations,
of the statement below, but alas, I don't think MRTG can work with additions
and subtractions from multiple oid return values like I want. I will
probably have to use some sort of SNMP GET utility to script getting the
values myself and then do the math in my own script, before I pass the
desired values to MRTG.
Does anyone have such a utility? If so, I would greatly appreciate
it. If not, I will write one and see if I can make it available.
Thanks for your help,
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: Timothy Finkenstadt [mailto:timothy at aloha.webkahuna.com]
Sent: Saturday, 17 March 2001 4:52 AM
To: Purvis, William
Cc: mrtg at list.ee.ethz.ch
Subject: Re: [mrtg] Re: Doing math with Multiple SNMP OID Targets
> 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
Are you trying to subtract the sum of the OIDs from 4096000? there fore:
4096000 - (oid1 + oid2)
if so, you should be able to do the following target:
Target[FC_PAR_01.SYS]:4096000 - \
1.3.6.1.4.1.23.2.28.2.14.1.4.1&1.3.6.1.4.1.23.2.28.2.14.1.4.1\
:public at 10.128.1.10 - \
1.3.6.143.2.28.2.14.1.5.1&1.3.6.143.2.28.2.14.1.5.1:public at 10.128.1.10
I think this may give what you are trying to accomplish. If not, you can
change the OIDs as you require.
best regards,
tim
--
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