DCI with Multiple OID

Started by maggio, April 29, 2010, 03:50:35 PM

Previous topic - Next topic

maggio

Hi,

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 would like  to calculate the belows;

((ifInOctets) * 8 / ifSpeed) * 100
((ifOutOctets) * 8 / ifSpeed) * 100

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

Thanks a lot.
Maggio

Victor Kirhenshtein

You should create two DCIs, and transform one of it using value from another. For example, define DCI for interface speed (.1.3.6.1.2.1.2.2.1.5.1); leave it as is. Then, define DCI for inOctets (.1.3.6.1.2.1.2.2.1.10.1), and set transformation script to


sub main()
{
   ifSpeed = GetDCIValue($node, FindDCIByName($node, ".1.3.6.1.2.1.2.2.1.5.1"));
   return ($1 * 8 / ifSpeed) * 100;
}


See also this topic: https://www.netxms.org/forum/index.php/topic,289.0.html

Best regards,
Victor

maggio