Hi everybody,
I'm using Zabbix 1.8.13 and have an SMTP host which returns its status as an integer which is the decimal encoding of a status bit mask.
E.g.
1 = 0001 = memory fault
2 = 0010 = processor fault
4 = 0100 = disk fault
6 = 0110 = disk fault and processor fault
...
etc.
...
Since the host returns an integer (1 or 2 or 4 or 6 in example above) I don't know how to check whether the 2nd bit ('disk fault') is up and then trigger 'disk fault'.
If it would've returned a string of bit, I would've used a regexp as nilie suggested, but I have no idea how to do with an integer.
Any help greatly appreciated.
Thanks,
Sovr
I'm using Zabbix 1.8.13 and have an SMTP host which returns its status as an integer which is the decimal encoding of a status bit mask.
E.g.
1 = 0001 = memory fault
2 = 0010 = processor fault
4 = 0100 = disk fault
6 = 0110 = disk fault and processor fault
...
etc.
...
Since the host returns an integer (1 or 2 or 4 or 6 in example above) I don't know how to check whether the 2nd bit ('disk fault') is up and then trigger 'disk fault'.
If it would've returned a string of bit, I would've used a regexp as nilie suggested, but I have no idea how to do with an integer.
Any help greatly appreciated.
Thanks,
Sovr

Comment