Integer overflow after a transformation?

Started by tomaskir, August 13, 2014, 03:04:20 PM

Previous topic - Next topic

tomaskir

I have a DCI which collects a snmp value. The node presents this value via snmp in kilobytes as an Integer.

I want to see this value in NetXMS in bytes. So I apply a transformation:
return ($1 * 1024);

The problem is that the value then gets reported by NetXMS as -145752064

I have a feeling the Integer is overflowing after the transformation.

Is there any way to get around this?

Thanks!

Dani@M3T

Try to set the data type of the DCI to "Integer 64 bit" and use this transformation script:
return (int64($1) * 1024);

tomaskir

Quote from: Dani@M3T on August 13, 2014, 03:30:26 PM
Try to set the data type of the DCI to "Integer 64 bit" and use this transformation script:

return (int64($1) * 1024);

That did the trick, thanks!