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 - Translating Numeric OIDs #2007

Closed
Foggy2 opened this issue Nov 8, 2016 · 1 comment
Closed

SNMP - Translating Numeric OIDs #2007

Foggy2 opened this issue Nov 8, 2016 · 1 comment
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@Foggy2
Copy link

Foggy2 commented Nov 8, 2016

Bug report

Relevant telegraf.conf:

[[inputs.snmp]]
   agents = ["x.x.x.x"]
   version = 2
   community = "public"
   interval = "15s"
   name = "test"
   [[inputs.snmp.field]]
     name = "hostname"
     oid = ".1.3.6.1.2.1.1.5.0"
     is_tag = true
   [[inputs.snmp.table]]
     name = "cisco_ap"
     inherit_tags = ["hostname"]
   [[inputs.snmp.table.field]]
	 name = "cLApName"
	 oid = ".1.3.6.1.4.1.9.9.513.1.1.1.1.5"
	 is_tag = true
   [[inputs.snmp.table.field]]
	 name = "cLApLocation"
	 oid = ".1.3.6.1.4.1.9.9.513.1.1.1.1.49"
	 is_tag = true
   [[inputs.snmp.table.field]]
	 name = "cLApAssociatedClientCount"
	 oid = ".1.3.6.1.4.1.9.9.513.1.1.1.1.54"
	 
	 [[inputs.snmp.table]]
     name = "cisco_apInterface"
     inherit_tags = ["hostname"]
   [[inputs.snmp.table.field]]
	 name = "cLApDot11RadioMACAddress"
	 oid = ".1.3.6.1.4.1.9.9.513.1.2.3.1.1"
	 is_tag = true
	 conversion = "hwaddr"
   [[inputs.snmp.table.field]]
	 name = "cLApDot11IfType"
	 oid = ".1.3.6.1.4.1.9.9.513.1.2.1.1.2"
	 is_tag = true
   [[inputs.snmp.table.field]]
	 name = "cLApDot11IfAdminStatus"
	 oid = ".1.3.6.1.4.1.9.9.513.1.2.1.1.14"
   [[inputs.snmp.table.field]]
	 name = "clExtApDot11RadioStatsRxByteCount"
	 oid = ".1.3.6.1.4.1.9.9.9998.1.1.3.2.1.4"
# Interfaces (IF-mib)
[[inputs.snmp]]
  agents = ["x.x.x.x"]
  version = 2
  community = "public"
  interval = "15s"
  name = "interfaceStats"
  [[inputs.snmp.field]]
    name = "hostname"
    oid = ".1.3.6.1.2.1.1.5.0"
    is_tag = true
  [[inputs.snmp.table]]
    name = "interfaceStats"
    inherit_tags = ["hostname"]
  [inputs.snmp.tagdrop]
    ifAlias = [""]
  [[inputs.snmp.table.field]]
	name = "ifAlias"
	oid = ".1.3.6.1.2.1.31.1.1.1.18"
	is_tag = true
  [[inputs.snmp.table.field]]
	name = "ifName"
	oid = ".1.3.6.1.2.1.31.1.1.1.1"
	is_tag = true
  [[inputs.snmp.table.field]]
	name = "ifType"
	oid = ".1.3.6.1.2.1.2.2.1.3"
  [[inputs.snmp.table.field]]
	name = "ifAdminStatus"
	oid = ".1.3.6.1.2.1.2.2.1.7"
  [[inputs.snmp.table.field]]
	name = "ifOperStatus"
	oid = ".1.3.6.1.2.1.2.2.1.8"
  [[inputs.snmp.table.field]]
	name = "ifHighSpeed"
	oid = ".1.3.6.1.2.1.31.1.1.1.15"
  [[inputs.snmp.table.field]]
	name = "ifLastChange"
	oid = ".1.3.6.1.2.1.2.2.1.9"
  [[inputs.snmp.table.field]]
	name = "ifHCInOctets"
	oid = ".1.3.6.1.2.1.31.1.1.1.6"
  [[inputs.snmp.table.field]]
	name = "ifHCOutOctets"
	oid = ".1.3.6.1.2.1.31.1.1.1.10"
  [[inputs.snmp.table.field]]
	name = "ifHCInUcastPkts"
	oid = ".1.3.6.1.2.1.31.1.1.1.7"
  [[inputs.snmp.table.field]]
	name = "ifHCOutUcastPkts"
	oid = ".1.3.6.1.2.1.31.1.1.1.11"
  [[inputs.snmp.table.field]]
    name = "ifInErrors"
	oid = ".1.3.6.1.2.1.2.2.1.14"
  [[inputs.snmp.table.field]]
	name = "ifOutErrors"
	oid = ".1.3.6.1.2.1.2.2.1.20"
  [[inputs.snmp.table.field]]
    name = "ifInDiscards"
	oid = ".1.3.6.1.2.1.2.2.1.13"
  [[inputs.snmp.table.field]]
	name = "ifOutDiscards"
	oid = ".1.3.6.1.2.1.2.2.1.19"
  [[inputs.snmp.table.field]]
    name = "ifInUnknownProtos"
	oid = ".1.3.6.1.2.1.2.2.1.15"
  [[inputs.snmp.table.field]]
	name = "ifHCInMulticastPkts"
	oid = ".1.3.6.1.2.1.31.1.1.1.8"
  [[inputs.snmp.table.field]]
	name = "ifHCOutMulticastkts"
	oid = ".1.3.6.1.2.1.31.1.1.1.12"
  [[inputs.snmp.table.field]]
	name = "ifHCInBroadcastPkts"
	oid = ".1.3.6.1.2.1.31.1.1.1.9"
  [[inputs.snmp.table.field]]
	name = "ifHCOutBroadcastPkts"
	oid = ".1.3.6.1.2.1.31.1.1.1.13"

System info:

Telegraf 1.1.0~rc1 on both Windows 7 x64 and Centos 7 x64 - Both systems had identical behavior

Steps to reproduce:

  1. ... Query SNMP with version 1.1.0~rc1
  2. ...

Expected behavior:

The numeric OIDs are already in the correct format and do not require translating.

Actual behavior:

The below is output to the console indicating that SNMP is attempting to translate the numeric OIDs.
2016/11/07 20:27:56 I! Using config file: C:\Program Files\Telegraf\telegraf.conf 2016/11/07 20:27:56 I! Starting Telegraf (version 1.1.0~rc1) 2016/11/07 20:27:56 I! Loaded outputs: influxdb 2016/11/07 20:27:56 I! Loaded inputs: inputs.snmp 2016/11/07 20:27:56 I! Tags enabled: host=MBN00155D482B06 2016/11/07 20:27:56 I! Agent Config: Interval:10s, Quiet:false, Hostname:"MBN00155D482B06", Flush Interval:10s 2016/11/07 20:28:00 E! ERROR in input [inputs.snmp]: translating .1.3.6.1.4.1.9.9.513.1.1.1.1.5: exec: "snmptranslate": executable file not found in %PATH%

Additional info:

Have tried a known working config from version 1.0.1 and the same behavior is exhibited.
Edit: included the known working config as that queries common interface data from the standard if-MIB.

@phemmer
Copy link
Contributor

phemmer commented Nov 8, 2016

Yeah, this is a bug. I think this may be a regression, as I could have sworn I made the snmptranslate command not get called if all the required info was provided.
Will take a look and get this fixed.

@sparrc sparrc added the bug unexpected problem or unintended behavior label Nov 8, 2016
@sparrc sparrc added this to the 1.1.2 milestone Dec 12, 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