NetXMS Support Forum

English Support => General Support => Topic started by: terry on May 13, 2008, 05:18:41 AM

Title: Calculated DCI with Multiple OIDs
Post by: terry on May 13, 2008, 05:18:41 AM
Hello,

I have a question how can I calculate DCI with Multiple OIDs.

ifInOctets  -->  .1.3.6.1.2.1.2.2.1.10
ifSpeed  -->  .1.3.6.1.2.1.2.2.1.5

I wnat to calculate the belows;

((ifInOctets) * 8 / ifSpeed) * 100

Could you le me know how can I make the script code?

Best Regards,
-Terry
Title: Re: Calculated DCI with Multiple OIDs
Post by: Victor Kirhenshtein on May 13, 2008, 02:42:20 PM
Hi!

First, you should create DCI for ifSpeed. Let's assume that it's description will be "Interface speed" (without quotes). After that, create DCI for ifInOctets, and create transformation script for it:


(($1 * 8) / GetDCIValue($node, FindDCIByDescription($node, "Interface speed"))) * 100


If you will use different DCI description for ifSpeed parameter, change call to FindDCIByDescription accordingly.

You can also take a look at the following topic:

https://www.netxms.org/forum/index.php/topic,292.msg1495.html#msg1495 (https://www.netxms.org/forum/index.php/topic,292.msg1495.html#msg1495)

Best regards,
Victor
Title: Re: Calculated DCI with Multiple OIDs
Post by: terry on May 14, 2008, 04:34:24 AM
Thanks so much.

It was good for me.

Best Regards,
- Terry