[ZBX-12712] Error on preprocessing hex to decimal Created: 2017 Sep 12 Updated: 2024 Apr 10 Resolved: 2017 Dec 26 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Documentation (D) |
Affects Version/s: | 3.4.1 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Hilton Kevin de Carvalho | Assignee: | Martins Valkovskis |
Resolution: | Fixed | Votes: | 0 |
Labels: | hexadecimal, preprocessing | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian 8, mysql, zabbix 3.4.1 |
Team: | |
Sprint: | Sprint 21, Sprint 22, Sprint 23, Sprint 24 |
Description |
I'm getting a value from SNMP OID bgpPeerLastError who comes in hex, I aplied the preprocessing hex to decimal, but he returns the error: The value is: |
Comments |
Comment by Aleksejs Petrovs [ 2017 Sep 13 ] |
What kind of Data type you've configured for this item? Regards, |
Comment by Hilton Kevin de Carvalho [ 2017 Sep 13 ] |
I tried numeric, unsigned and float, and character. I managed to make it work but with a workaround. What I realized is that zabbix does not recognize the value "06 00" as hexadecimal when separated, I had to make a first step with regular expression to remove the space and then use the conversion from hexadecimal to decimal. But I do not know if it should be so or if there is some failure in zabbix to recognize hexadecimal. |
Comment by Aleksejs Petrovs [ 2017 Sep 13 ] |
I've performed the Lab with Zabbix Trapper and pre-processing Hex to Dec. Indeed, the issue appears if there is a space between numbers. In this case Zabbix Server will treats them as a string. The workaround could be, as reporter described, to perform pre-processing in two steps:
Regards, |
Comment by Alexander Vladishev [ 2017 Sep 14 ] |
Supported hexadecimal and octal formats must be documented. martins-v Can you review the doc changes? Should the same info be copied to the octal to dec option? |
Comment by Hilton Kevin de Carvalho [ 2017 Sep 14 ] |
Aleksejs Petrovs, this is what I did, but my question is the system would support hex with space or not? Without using two steps. |
Comment by Aleksejs Petrovs [ 2017 Sep 15 ] |
Hi Hilton, Regards, |
Comment by Marc [ 2018 Apr 26 ] |
Please mention this in the upgrade notes as spaces in hex strings used to be supported before. |
Comment by Dimitri Bellini [ 2018 Jun 22 ] |
Hi Guy, After a lot of time i came on this problem... I will like to suggest for easy migration from Zabbix 3.0 to 3.4/4.0 to provide an easy migration path of the old Zabbix implementation of "hex to decimal" without the use of the RegExp Capturing Group, because could be very complex and could not solve the problem. I would suggest to create a new "step" called "Blank Removal" or "Substitute character" to simplify this kind of scenario and the user experience. I think is very import feature!! Thanks very much |