Hello,
An SNMP item is sending a 64 bit bitmask, like "000101000000000000100000000000000000000000000 0000 000000000000000". For some reason, the least significant bit is to the left in this notation.
I know the flag which each bit represents, and have written a javascript preprocessing step that converts this into a string with more verbose information about the flags, but I notice that even though I only specify to right trim the zeroes, as soon as I do any operation on this incoming value, it automatically ignores the leading zeroes:
(so the resulting string contains incorrect information)

I'm fairly certain it's not a javascript issue. Inside javascript, the trimmed string is treated as a binary number, but zabbix seems to treat it as an integer. Is there any way to stop this behaviour, or maybe add a fixed number (2^64) to create a nonzero least significant bit?
An SNMP item is sending a 64 bit bitmask, like "000101000000000000100000000000000000000000000 0000 000000000000000". For some reason, the least significant bit is to the left in this notation.
I know the flag which each bit represents, and have written a javascript preprocessing step that converts this into a string with more verbose information about the flags, but I notice that even though I only specify to right trim the zeroes, as soon as I do any operation on this incoming value, it automatically ignores the leading zeroes:
(so the resulting string contains incorrect information)
I'm fairly certain it's not a javascript issue. Inside javascript, the trimmed string is treated as a binary number, but zabbix seems to treat it as an integer. Is there any way to stop this behaviour, or maybe add a fixed number (2^64) to create a nonzero least significant bit?
Comment