[ZBX-9163] failure to send SNMPv3 requests that are "Too long" is not handled properly by SNMP bulk Created: 2014 Dec 23  Updated: 2017 May 30  Resolved: 2015 Jan 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 2.2.8, 2.4.3
Fix Version/s: 2.2.9rc1, 2.4.4rc1, 2.5.0

Type: Incident report Priority: Major
Reporter: Aleksandrs Saveljevs Assignee: Unassigned
Resolution: Fixed Votes: 4
Labels: bulk, limits, snmpv3
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Suppose we are monitoring an SNMPv3 device. We start with one variable per request and gradually increase the number of variables, trying to find the limit.

At some point the size of the request gets larger than "msgMaxSize" reported by the monitored device and we cannot send the request. We then get the following error in the log, which is wrongly treated by Zabbix as a network error:

5414:20141218:125955.481 getting SNMP values failed: Cannot connect to "192.168.x.x:161": Too long.

Zabbix should instead treat this case properly for the purposes of finding the optimal number of variables to query.



 Comments   
Comment by Aleksandrs Saveljevs [ 2014 Dec 23 ]

The problem was originally described in Russian at http://habrahabr.ru/post/240169/ .

Comment by Artem [ 2014 Dec 23 ]

This problem also affected for SNMPv2 device. In my case, problem which describe in Russian at http://habrahabr.ru/post/240169/ is true.
Zabbix 2.2.6, without proxy.

Comment by Aleksandrs Saveljevs [ 2014 Dec 23 ]

dart_ua, to my knowledge, "msgMaxSize" was introduced in SNMPv3 (see http://tools.ietf.org/html/rfc3412#page-21).

Could you please describe how it is possible for the NMS to know the maximum packet size that it should send in SNMPv2 (unless you are referring to the transport maximum, as mentioned in the article)? Would it be possible for you to post the relevant parts of the Zabbix log?

Comment by santal [ 2014 Dec 23 ]

If you have any questions or need additional info do not hesitate to contact me.

Comment by Aleksandrs Saveljevs [ 2014 Dec 30 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9163 , mostly by applying the patch suggested by santal.

In the Habrahabr comments santal mentions that a better way to solve the problem would be to check "msgMaxSize" and generate requests based on that. However, Zabbix measures requests in the number of OIDs, while "msgMaxSize" is in bytes and only Net-SNMP can check that after request is constructed.

So the proposed patch is good enough. One idea that we might wish to consider though, is whether we wish to increase the "level" variable if we get the "Too long" error.

Comment by Aleksandrs Saveljevs [ 2014 Dec 30 ]

santal, I think that your patch and deep investigation deserves an acknowledgement in Zabbix change log, so if you could let us know your real name to be included in the change log, that would be great.

Comment by santal [ 2014 Dec 31 ]

asaveljevs Thanks a lot! This is quite unexpected. You can use my nickname. This is really would be great

Comment by Andris Zeila [ 2015 Jan 07 ]

Successfully tested

Comment by Aleksandrs Saveljevs [ 2015 Jan 07 ]

Fixed in pre-2.2.9 r51426, pre-2.4.4 r51427, and pre-2.5.0 (trunk) r51428.

Generated at Thu Apr 25 12:03:02 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.