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

mapping table on snmp plugin use only first number to match #961

Closed
Truji opened this issue Apr 4, 2016 · 7 comments
Closed

mapping table on snmp plugin use only first number to match #961

Truji opened this issue Apr 4, 2016 · 7 comments
Labels
bug unexpected problem or unintended behavior

Comments

@Truji
Copy link

Truji commented Apr 4, 2016

I'm using the mapping_table but looks like that is matching only with the first number of ifIndex value.
All instances are the same if the ifIndex value starts with the same number.

Example:

ifIndex,host=testing.lan,instance=dsc ifIndex=542i 1459782103301846509
ifIndex,host=testing.lan,instance=dsc ifIndex=5i 1459782103304193032
ifIndex,host=testing.lan,instance=dsc ifIndex=521i 1459782103313242647

Only ifIndex=5 is true: IF-MIB::ifDescr.5 = STRING: dsc

ifIndex,host=testing.lan,instance=lo0 ifIndex=607i 1459782408362813308
ifIndex,host=testing.lan,instance=lo0 ifIndex=6i 1459782408380025023
ifIndex,host=testing.lan,instance=lo0 ifIndex=604i 1459782408381047861

Only ifIndex=6 is true: IF-MIB::ifDescr.6 = STRING: lo0

@titilambert
Copy link
Contributor

Hello !
Could you give me your configuration ?
Thanks !

@Truji
Copy link
Author

Truji commented Apr 4, 2016

Yes, sorry.

[[outputs.influxdb]]

[[inputs.snmp]] 
  snmptranslate_file = "/etc/telegraf/oids.txt"
  [[inputs.snmp.host]]
    address = "testing.lan:161"
    community = "public" # default public
    version = 2 # default 2
    timeout = 2.0 # default 2.0
    retries = 2 # default 2
    [[inputs.snmp.host.table]]
      name = "iftable1"
      include_instances = []
  [[inputs.snmp.table]]
    name = "iftable1"
    mapping_table =".1.3.6.1.2.1.2.2.1.2"
    sub_tables=[".1.3.6.1.2.1.2.2.1.1"]

@titilambert
Copy link
Contributor

Thanks !
Could you run a snmpwalk on .1.3.6.1.2.1.2.2.1.1 and .1.3.6.1.2.1.2.2.1.2 ?

@Truji
Copy link
Author

Truji commented Apr 4, 2016

Attached, we have a few interfaces.

1.3.6.1.2.1.2.2.1.1.txt
1.3.6.1.2.1.2.2.1.2.txt

@Truji
Copy link
Author

Truji commented Apr 4, 2016

Hi, I looked again this and I can't see a pattern about. The problem is tagging the output, because if I use the include_instance the plugin filter correctly.

And is not happening every time, as you can see here:

root@evee:# telegraf -config /etc/telegraf/telegraf.conf -test | grep 563i
ifIndex,host=testing.lan,instance=dsc ifIndex=563i 1459802458842428140
root@evee:
# telegraf -config /etc/telegraf/telegraf.conf -test | grep 563i
ifIndex,host=testing.lan,instance=pe-0/1/10 ifIndex=563i 1459802460241818426

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

This seems related to #1043

@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
@sparrc
Copy link
Contributor

sparrc commented Aug 23, 2016

this is now available in 1.0 RC 1 with the new SNMP plugin, please see here to download the latest version: https://github.com/influxdata/telegraf#linux-deb-and-rpm-packages, and the changelog for details on the new SNMP plugin.

@sparrc sparrc closed this as completed Aug 23, 2016
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

No branches or pull requests

3 participants