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

SNMP plugin doesn't write proper instance value #1043

Closed
slemire opened this issue Apr 16, 2016 · 13 comments · Fixed by #1389
Closed

SNMP plugin doesn't write proper instance value #1043

slemire opened this issue Apr 16, 2016 · 13 comments · Fixed by #1389
Labels
bug unexpected problem or unintended behavior

Comments

@slemire
Copy link

slemire commented Apr 16, 2016

I'm having issues polling the virtual server stats off an F5 load-balancer. It seems like the snmp plugin doesn't write the proper value in the instance field. In the example below, it's not writing two levels of OIDs below what I've defined in the configuration. That throws off the mapping table when I try to use it. In the example I'm not using the mapping table but you can see the data written in InfluxDB is missing two OID levels above .47.

[[inputs.snmp.table]]
        name = "ltmVirtualServStatEntry"
        oid = ".1.3.6.1.4.1.3375.2.2.10.2.3.1"

Database measurements:

> select * from ltmVirtualServStatClientBytesIn where time > now() - 1m
name: ltmVirtualServStatClientBytesIn
-------------------------------------
time                    dc      host            instance                                                        ltmVirtualServStatClientBytesIn
1460818130000000000     Home    172.23.10.30    47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.49      0
1460818130000000000     Home    172.23.10.30    47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.51      0
1460818130000000000     Home    172.23.10.30    47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.50      0
1460818140000000000     Home    172.23.10.30    47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.51      0

Here's the snmpwalk of the OID:

slemire@dev:~/telegraf$ snmpwalk -v 2c -c <secret> 172.23.10.30 .1.3.6.1.4.1.3375.2.2.10.2.3.1
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.1.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.49 = STRING: "/Common/test_vs1"
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.1.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.50 = STRING: "/Common/test_vs2"
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.1.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.51 = STRING: "/Common/test_vs3"
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.2.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.49 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.2.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.50 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.2.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.51 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.3.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.49 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.3.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.50 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.3.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.51 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.4.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.49 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.4.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.50 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.4.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.51 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.5.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.49 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.5.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.50 = Counter64: 0
SNMPv2-SMI::enterprises.3375.2.2.10.2.3.1.5.16.47.67.111.109.109.111.110.47.116.101.115.116.95.118.115.51 = Counter64: 0
[...]
@slemire
Copy link
Author

slemire commented Apr 16, 2016

Added pcap file
snmptable1.pcap.zip

@sparrc sparrc added the bug unexpected problem or unintended behavior label Apr 16, 2016
@sparrc
Copy link
Contributor

sparrc commented Apr 16, 2016

Maybe I'm not quite reading this right, what are the 2 OID levels that are missing?

@slemire
Copy link
Author

slemire commented Apr 16, 2016

.1.16 is missing

@sparrc
Copy link
Contributor

sparrc commented Apr 16, 2016

got it, I see what you mean, @titilambert do you happen to know why those two elements of the instance wouldn't be included?

@titilambert
Copy link
Contributor

titilambert commented Apr 17, 2016

hum, I did never hit this bug :(
@slemire The best thing to do, if you can do it, is to make a snmp dump using snmpsim: http://snmpsim.sourceforge.net/
Can you do that ?
With the dump I will be able to reproduced it

@titilambert
Copy link
Contributor

titilambert commented Apr 17, 2016

This could be fix with #1044
@slemire could you try to compile Telegraf with this patch ? and test it ?

@slemire
Copy link
Author

slemire commented Apr 17, 2016

Sure thing, I captured the following:

snmprec.py --agent-udpv4-endpoint=172.23.10.30 --protocol-version=2c --start-oid=.1.3.6.1.4.1.3375.2.2.10.2.3.1 --stop-oid=.1.3.6.1.4.1.3375.2.2.10.2.3.1.44 --output-file=test.snmprec

test.snmprec.txt

@titilambert
Copy link
Contributor

@slemire thanks ! Could you give me your telegraf configuration ?

@slemire
Copy link
Author

slemire commented Apr 18, 2016

Here's the config:

telegraf.txt

@slemire
Copy link
Author

slemire commented Apr 20, 2016

Problem is still there using the latest nightly:
Telegraf - Version 0.13.0~n1461140359

@slemire
Copy link
Author

slemire commented May 2, 2016

I think maxRepetition := uint8(32) might have something to do with it.

My OID tree is longer than that.

@sparrc
Copy link
Contributor

sparrc commented May 2, 2016

I see, I think that has come up before, we may want to make that a configurable option. What do you think @titilambert?

@slemire
Copy link
Author

slemire commented May 3, 2016

Um, I think I got confused. The maxRepetition is just the standard SNMP RFC knob to manage the size of SNMP bulk GETs. I've tried smaller and larger settings without success.

@phemmer phemmer mentioned this issue Jun 22, 2016
3 tasks
sparrc added a commit that referenced this issue Jul 28, 2016
closes #1371
closes #808
closes #1361
closes #1151
closes #997
closes #1163
closes #856
closes #1043
closes #961
closes #1389
sparrc added a commit that referenced this issue Jul 28, 2016
closes #1371
closes #808
closes #1361
closes #1151
closes #997
closes #1163
closes #856
closes #1043
closes #961
closes #1389
sparrc added a commit that referenced this issue Jul 28, 2016
closes #1371
closes #808
closes #1361
closes #1151
closes #997
closes #1163
closes #856
closes #1043
closes #961
closes #1389
sparrc added a commit that referenced this issue Jul 28, 2016
closes #1371
closes #808
closes #1361
closes #1151
closes #997
closes #1163
closes #856
closes #1043
closes #961
closes #1389
sparrc added a commit that referenced this issue Aug 3, 2016
closes #1371
closes #808
closes #1361
closes #1151
closes #997
closes #1163
closes #856
closes #1043
closes #961
closes #1389
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants