[ZBX-13131] Multiline text values are truncated to the first line in the discovery SNMP checks Created: 2017 Dec 04  Updated: 2024 Apr 10  Resolved: 2018 Jan 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 3.4.3, 3.4.4
Fix Version/s: 3.0.15rc1, 3.4.7rc1, 4.0.0alpha3, 4.0 (plan)

Type: Problem report Priority: Minor
Reporter: Igor Rakcheyev Assignee: Viktors Tjarve
Resolution: Fixed Votes: 0
Labels: networkdiscovery, snmp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Causes
caused by ZBXNEXT-1443 Ability to transform item values befo... Closed
Team: Team A
Sprint: Sprint 25, Sprint 26
Story Points: 0.5

 Description   

If a discovery rule contains the SNMP check which retrieves multiline text value only the first line stores to DB. If the OID will be polled by the item no truncation applied. In the 3.2 the SNMP checks return whole value too.

It seems that the issue is in the zbx_snmp_set_result(), which in the 3.2 expects 4 arguments including the "value type", but in the 3.4 there are only 2 args and no "value type" passed. Inside the function the type set to 'ITEM_VALUE_TYPE_TEXT', while in the discover_service() after the get_value_agent() call goes the GET_STR_RESUTL() call which returns the first line for the text value.



 Comments   
Comment by Aleksejs Petrovs [ 2017 Dec 27 ]

Hello Igor, sorry for the delay!

In order to simulate - please provide the details like from what type of device you are trying to get this multiline value?

Regards,
Aleksejs!

Comment by Igor Rakcheyev [ 2017 Dec 28 ]

Hello Aleksejs,

The Huawei switches like CE12804 and CE6810 have sysDescr as multiline text.


Igor

Comment by Aleksejs Petrovs [ 2017 Dec 28 ]

Ok, could you also provide an example of the value you should receive from this snmp query?
Also which type of discovery you are using - Network Discovery, Low-Level Discovery?

Comment by Igor Rakcheyev [ 2017 Dec 29 ]

1) The output of the snmpget in unix terminal looks like

SNMPv2-MIB::sysDescr.0 = STRING: Huawei Versatile Routing Platform Software
VRP (R) software, Version 8.100 (CE6810EI V100R005C10SPC200)
Copyright (C) 2012-2015 Huawei Technologies Co., Ltd.
HUAWEI CE6810-48S4Q-EI

2) The Network Discovery

Comment by Andrey Melnikov [ 2018 Jan 11 ]

Same for long Hex-Strings:

Printer-MIB::prtMarkerSuppliesDescription.1.1 = Hex-STRING: 42 6C 61 63 6B 20 43 61 72 74 72 69 64 67 65 20 
48 50 20 43 45 32 35 35 41 00 

net-snmp itself format long Hex-STRING into multiple lines, zabbix truncate it after find first CR.

Comment by Viktors Tjarve [ 2018 Jan 12 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-13131

Comment by Viktors Tjarve [ 2018 Jan 25 ]

Released in:

  • 3.4.7rc1 r77180
  • 4.0.0alpha3 r77181
Comment by Evgeny Dedenev [ 2020 Jan 15 ]

The issue still exist in 4.4.3.

Printer-MIB::prtMarkerSuppliesDescription.1.1 = Hex-STRING: D0 A7 D0 B5 D1 80 D0 BD D1 8B D0 B9 20 D0 BA D0
B0 D1 80 D1 82 D1 80 D0 B8 D0 B4 D0 B6 20 36 35
31 41 20 48 50 20 43 45 33 34 30 41 00

Discovery rule stores only first line.

Comment by James Cook [ 2021 Nov 30 ]

The issue still exists in 5.4.6 as well....

SNMPv2-MIB::sysORDescr.1 = STRING: Agent capabilities for CISCO-AAA-SERVER-MIB
 LAST-UPDATED 200001200000Z
ciscoAAAServerCapabilityV10R00 AGENT-CAPABILITIES
 SUPPORTS CISCO-AAA-SERVER-MIB
File name: ios
SNMPv2-MIB::sysORDescr.2 = STRING: Agent capabilities for CISCO-ALPS-MIB
 LAST-UPDATED 9710270000Z
ciscoAlpsCapabilityV01R01 AGENT-CAPABILITIES
SUPPORTS CISCO-ALPS-MIB
File name: ios
.......

Only discovers the first line i.e. 'Agent capabilities for CISCO-AAA-SERVER-MIB' and 'Agent capabilities for CISCO-ALPS-MIB'

 

Should this be reopened or a new incident created?

Generated at Wed Apr 24 19:06:27 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.