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

performing get: marshal: Unable to parse OID: strconv.ParseInt: parsing "iso": invalid syntax #1833

Closed
dragonxtek opened this issue Sep 30, 2016 · 7 comments

Comments

@dragonxtek
Copy link

dragonxtek commented Sep 30, 2016

I got the following error when I run telegraf with snmp filter

telegraf -config telegraf_snmp2.conf
2016/09/30 16:43:30 Starting Telegraf (version 1.0.0-beta3-136-gca8e512)
2016/09/30 16:43:30 Loaded outputs: influxdb
2016/09/30 16:43:30 Loaded inputs: snmp
2016/09/30 16:43:30 Tags enabled: host=dragonxtek
2016/09/30 16:43:30 Agent Config: Interval:10s, Debug:false, Quiet:false, Hostname:"dragonxtek", Flush Interval:10s
2016/09/30 16:43:40 ERROR in input [snmp]: agent 127.0.0.1:161: performing get: marshal: Unable to parse OID: strconv.ParseInt: parsing "iso": invalid syntax
2016/09/30 16:43:42 Hang on, flushing any cached metrics before shutdown
2016/09/30 16:43:42 Output [influxdb] buffer fullness: 0 / 10000 metrics. Total gathered metrics: 0. Total dropped metrics: 0.

I used the same configuration on README.md
I running it over:
Ubuntu 16.04
Telegraf v1.0.0-beta3-136-gca8e512

The new database was created but without information
How can I fix it?

@phemmer
Copy link
Contributor

phemmer commented Oct 1, 2016

Can you show your configuration please?
The error means that you have telegraf configured to read an integer, but your snmp agent is returning a string.

@dragonxtek
Copy link
Author

dragonxtek commented Oct 3, 2016

The configuration file is this (available on https://github.com/influxdata/telegraf/tree/master/plugins/inputs/snmp)

[[inputs.snmp]]
  agents = [ "127.0.0.1:161" ]
  version = 2
  community = "public"
  name = "system"
  [[inputs.snmp.field]]
    name = "hostname"
    oid = ".1.0.0.1.1"
    is_tag = true
  [[inputs.snmp.field]]
    name = "uptime"
    oid = ".1.0.0.1.2"
  [[inputs.snmp.field]]
    name = "loadavg"
    oid = ".1.0.0.1.3"
    conversion = "float(2)"
  [[inputs.snmp.table]]
    name = "remote_servers"
    inherit_tags = [ "hostname" ]
    [[inputs.snmp.table.field]]
      name = "server"
      oid = ".1.0.0.0.1.1"
      is_tag = true
    [[inputs.snmp.table.field]]
      name = "connections"
      oid = ".1.0.0.0.1.2"
    [[inputs.snmp.table.field]]
      name = "latency"
      oid = ".1.0.0.0.1.3"
      conversion = "float"

I commented conversion lines to avoid the error, but the error persists.
I tried wih only uptime [inputs.snmp.field], but the error persists.
How can I solve it?

@phemmer
Copy link
Contributor

phemmer commented Oct 4, 2016

Found the issue here and fixed it. The issue is an incorrect handling of OIDs that can't be found in the MIB. Very easy fix. PR is up at #1846

@dragonxtek
Copy link
Author

I update telegraf to this branch. Now, I don't receive errors, but also I don't receive any data to my influxdb :(
selection_124
How I can add these fields to MIB? I need to download something?

@phemmer
Copy link
Contributor

phemmer commented Oct 4, 2016

From your earlier comment, is sounds like you're using the sample config. This config is meant to demonstrate the usage of the plugin, and not actually be used. You have to generate a config specific to the device you're trying to probe.

@dragonxtek
Copy link
Author

Thanks, now it's working with snmp fields supported by my system and without errors

@shadialsalamat
Copy link

how did you solve this problem can you tell me

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

3 participants