[ZBX-8793] Integer {#SNMPVALUE} in LLD trigger's name shows up as float Created: 2014 Sep 19  Updated: 2017 May 30  Resolved: 2014 Oct 13

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 2.4.0
Fix Version/s: 2.4.2rc1, 2.5.0

Type: Incident report Priority: Major
Reporter: Igor Urazov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: lld, regression, snmp, trigger
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by ZBX-8976 Wrong type conversion of SNMP item Closed
is duplicated by ZBX-8980 SNMP item with dynamic indexes fail: ... Closed

 Description   

After upgrade from 2.2 to 2.4. Integer

{#SNMPVALUE} shows up as float is trigger's name. For example, I have the LLD SNMP discovery with SNMP OID .1.3.6.1.4.1.674.10893.1.20.130.1.1.1 (this from Dell OpenManage).

snmpwalk -v2c -c delldata palma.sf .1.3.6.1.4.1.674.10893.1.20.130.1.1.1StorageManagement-MIB::controllerNumber.1 = INTEGER: 1

LLD trigger's name is set up as "Disk Controller {#SNMPVALUE}

State". With Zabbix 2.2 it translated to "Disk Controller 1 State", but after 2.4 upgrade it shows up as ""Disk Controller 1.000000 State".



 Comments   
Comment by Igor Urazov [ 2014 Sep 19 ]

Sorry, I provided unreadable console output. Here is the right one:
$ snmpwalk -v2c -c delldata -m - palma.sf .1.3.6.1.4.1.674.10893.1.20.130.1.1.1
SNMPv2-SMI::enterprises.674.10893.1.20.130.1.1.1.1 = INTEGER: 1

Comment by Aleksandrs Saveljevs [ 2014 Sep 22 ]

Which Zabbix 2.2.x version did you use before the upgrade? Was it 2.2.3 (the one which introduced SNMP bulk in ZBXNEXT-98) or later?

Comment by Igor Urazov [ 2014 Sep 22 ]

Upgraded from 2.2.6 to 2.4.0.

Comment by Aleksandrs Saveljevs [ 2014 Sep 22 ]

Seems to have been broken in ZBX-1274:

$ svn log -v -c 45498
------------------------------------------------------------------------
r45498 | igors | 2014-05-14 17:44:52 +0300 (Wed, 14 May 2014) | 1 line
Changed paths:
   M /trunk
   M /trunk/src/zabbix_server/poller/checks_calculated.c
   M /trunk/src/zabbix_server/poller/checks_snmp.c

.......PS. [ZBX-1274] fixed error messages and improved processing of ASN_INTEGER values
------------------------------------------------------------------------
Comment by Igors Homjakovs (Inactive) [ 2014 Sep 24 ]

Fixed in svn://svn.zabbix.com/branches/dev/ZBX-8793

Comment by Andris Zeila [ 2014 Oct 02 ]

(1) Trimming zeroes from all double -> string/text conversions could affect existing HostMetadataItem, HostNameItem configuration parameter results (if the defined items would return floating value - not likely, but still possible). Also SNMP discovery would be similarly affected.

So better would be to do the required conversions for ASN_INTEGER type in zbx_snmp_set_result() function. To reuse existing conversion function first convert the integer value to string, then call set_result_type() function to assign the converted string to the agent result variable.

igorsh RESOLVED in r49587.

wiper CLOSED

Comment by Andris Zeila [ 2014 Oct 07 ]

Successfully tested

Comment by Igors Homjakovs (Inactive) [ 2014 Oct 10 ]

Fixed in 2.4.2rc1(r49737) and 2.5.0(r49739)

Generated at Sat Apr 20 18:09:29 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.