[mrtg] Re: Adding oid values together

Duane Cox dcox at illicom.net
Wed Oct 1 14:35:53 MEST 2003


It's in the doc.

Multi Target Syntax

You can also combine several target definitions in a mathematical
expression. Any syntactically correct expression that the Perl interpreter
can evaluate to will work. An expression could be used, for example, to
aggregate both B channels in an ISDN connection or to calculate the
percentage hard disk utilization of a server from the absolute used space
and total capacity.
Examples:

 Target[ezwf]: 2:public at wellfleetA + 1:public at wellfleetA Target[ezwf]:
1.3.6.1.4.1.999.1&1.3.6.1.4.1.999.2:public at mydevice /
     1.3.6.1.4.1.999.3&1.3.6.1.4.1.999.4:public at mydevice * 100Note that
whitespace must surround each target definition in the expression. Target
definitions themselves must not contain whitespace, except in interface
descriptions and interface names, where each whitespace character is escaped
by a backslash.

MRTG automatically rounds the result of the expression to an integer unless
RRDTool logging is in use and the gauge option is in effect for the target.
Internally MRTG uses Perl's Math::BigFloat package to calculate the result
of the expression with 40 digits of precision. Even in extreme cases, where,
for example, you take the difference of two 64-bit integers, the result of
the expression should be accurate.


----- Original Message ----- 
From: "Godfrey @ Lists" <mrtg at compudoc.za.org>
To: <mrtg at list.ee.ethz.ch>
Sent: Wednesday, October 01, 2003 7:25 AM
Subject: [mrtg] Adding oid values together


> Hi
>
> I would appreciate some help to get the following to work
>
> I would like to sum the following .1.3.6.1.4.1.2021.255.40002 and
> .1.3.6.1.4.1.2021.255.40003
> and sum .1.3.6.1.4.1.2021.255.50002 and .1.3.6.1.4.1.2021.255.50003  at
the
> following address public at 209.203.2.68
>
> something like
>
>   iod40002+oid40003&.oid50002+oid50003:public at 209.203.2.68
>
> or sum of  iod40002 and oid40003& or sum of  iod40002 and oid40003 @
> public at 209.203.2.68
>
> I can't seem to get the line syntax right
>
> I would appreciate any assistance
>
> --
> 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
>
>

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