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

is not defined in `*snmp.Snmp' #1837

Closed
dragonxtek opened this issue Oct 3, 2016 · 2 comments
Closed

is not defined in `*snmp.Snmp' #1837

dragonxtek opened this issue Oct 3, 2016 · 2 comments

Comments

@dragonxtek
Copy link

I'm trying to execute snmp plugin, but I can't. I tried with examples in https://github.com/influxdata/telegraf/tree/master/plugins/inputs/snmp_legacy
I used default configuration and I change the input configuration by the follow:
For the first input plugin:

Very Simple Example

[[inputs.snmp]]
[[inputs.snmp.host]]
address = "127.0.0.1:161"
# SNMP community
community = "public" # default public
# SNMP version (1, 2 or 3)
# Version 3 not supported yet
version = 2 # default 2
# Simple list of OIDs to get, in addition to "collect"
get_oids = [".1.3.6.1.2.1.2.2.1.4.1"]

I got this error correspondig to line: [[inputs.snmp.host]]

*field corresponding to host' is not defined insnmp.Snmp'

For the second example:

Simple example

[[inputs.snmp]]

Use 'oids.txt' file to translate oids to names

To generate 'oids.txt' you need to run:

snmptranslate -m all -Tz -On | sed -e 's/"//g' > /tmp/oids.txt

Or if you have an other MIB folder with custom MIBs

snmptranslate -M /mycustommibfolder -Tz -On -m all | sed -e 's/"//g' > oids.txt

snmptranslate_file = "/tmp/oids.txt"
[[inputs.snmp.host]]
address = "127.0.0.1:161"
# SNMP community
community = "public" # default public
# SNMP version (1, 2 or 3)
# Version 3 not supported yet
version = 2 # default 2
# Which get/bulk do you want to collect for this host
collect = ["ifnumber", "interface_speed"]
[[inputs.snmp.get]]
name = "ifnumber"
oid = ".1.3.6.1.2.1.2.1.0"
[[inputs.snmp.get]]
name = "interface_speed"
oid = "ifSpeed"
instance = "1"

I got this error corresponding to line: snmptranslate_file = "/tmp/oids.txt"

*field corresponding to snmptranslate_file' is not defined insnmp.Snmp'

I'm running Telegraf v1.0.0-beta3-136-gca8e512 over Ubuntu 16.04. I tested snmp, and it works without problems. I created oids.txt without problems.

To reproduce just run telegraf -config telegraf.conf

I need to define the snmp attributes to a specific file? Where is it? How I can run the examples?

@sparrc
Copy link
Contributor

sparrc commented Oct 3, 2016

please use the updated snmp plugin: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/snmp

where did you find a link to the old plugin? it was deprecated in 1.0

@sparrc sparrc closed this as completed Oct 3, 2016
@dragonxtek
Copy link
Author

I found it googling
I'm trying lot examples because none works for me.
I created the issue #1833 with the updated snmp plugin. Please help me
Thanks

On Mon, Oct 3, 2016 at 9:38 AM, Cameron Sparr notifications@github.com
wrote:

please use the updated snmp plugin: https://github.com/influxdata/
telegraf/tree/master/plugins/inputs/snmp

where did you find a link to the old plugin? it was deprecated in 1.0


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1837 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKEFUsC8kF0k83S7Ym2ibhjkc-fl3u9Mks5qwPdBgaJpZM4KMh61
.

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

2 participants