Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'tooBig' error caused by fixed OID limit is going unhandled #72

Closed
rossmobi opened this issue Aug 4, 2016 · 0 comments
Closed

'tooBig' error caused by fixed OID limit is going unhandled #72

rossmobi opened this issue Aug 4, 2016 · 0 comments

Comments

@rossmobi
Copy link

rossmobi commented Aug 4, 2016

Bug report

Recently I have setup an InfluxDB server and I am using Telegraf to poll Cisco switches for SNMP traffic. On recent builds of Telegraf, I have seen quite a lot of the following error:

2016/05/17 16:36:32 SNMP Error for host 'XXXXXXX:161': Unable to decode packet: nil

I had also noticed that the series of some switches were simply not receiving metrics, where some switches had received some, sporadically. Most were fine.

I was sure the two were related and after searching in vain, I took a packet capture. I could then see that the switch was returning a 'tooBig' error. My SNMP terminology isn't great, but essentially Telegraf asked for 60 OIDs and the switch returned the error.

The shortest explanation of this error I could find was:

The size of the Response-PDU would be too large to transport.

The value which dictates the maximum number of OIDs in a request appears to be here:

const (
    // maxOids is the maximum number of oids allowed in a Get()
    maxOids = 60

    // Base OID for MIB-2 defined SNMP variables
    baseOid = ".1.3.6.1.2.1"

    // Java SNMP uses 50, snmp-net uses 10
    defaultMaxRepetitions = 50
)

https://github.com/soniah/gosnmp/blob/master/gosnmp.go

Proposal:

I would like to see this constant replaced with a variable in the GoSNMP struct which starts a few lines down from the snippet above.

Use case: [Why is this important (helps with prioritizing requests)]

This is useful because it means legacy or low power/capacity devices which support SNMP can be catered for. It's the client's responsibility to react to and deal with the 'tooBig' error and this way we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant