telegraf: SNMP - Cannot find module
Relevant telegraf.conf:
# # Retrieves SNMP values from remote agents
[[inputs.snmp]]
# agents = [ "127.0.0.1:161" ]
agents = ["ipdadrres_switch:161"]
# ## Timeout for each SNMP query.
timeout = "5s"
# ## Number of retries to attempt within timeout.
retries = 3
# ## SNMP version, values can be 1, 2, or 3
version = 3
#
# ## SNMP community string.
community = "public"
#
# ## The GETBULK max-repetitions parameter
max_repetitions = 10
#
# ## SNMPv3 auth parameters
sec_name = "snmpuser"
auth_protocol = "SHA" # Values: "MD5", "SHA", ""
auth_password = "somethingsecret"
sec_level = "authNoPriv" # Values: "noAuthNoPriv", "authNoPriv", "authPriv"
## #context_name = ""
priv_protocol = "AES" # Values: "DES", "AES", ""
priv_password = "somethingsecret"
[inputs.snmp.field]]
name = "hostname"
oid = "RFC1213-MIB::sysName.0"
is_tag = true
[[inputs.snmp.field]]
name = "uptime"
oid = "DISMAN-EXPRESSION-MIB::sysUpTimeInstance"
# IF-MIB::ifTable contains counters on input and output traffic as well as errors and discards.
[[inputs.snmp.table]]
name = "interface"
inherit_tags = [ "hostname" ]
oid = "IF-MIB::ifTable"
# Interface tag - used to identify interface in metrics database
[[inputs.snmp.table.field]]
name = "ifDescr"
oid = "IF-MIB::ifDescr"
is_tag = true
# IF-MIB::ifXTable contains newer High Capacity (HC) counters that do not overflow as fast for a few of the ifTable counters
[[inputs.snmp.table]]
name = "interface"
inherit_tags = [ "hostname" ]
oid = "IF-MIB::ifXTable"
# Interface tag - used to identify interface in metrics database
[[inputs.snmp.table.field]]
name = "ifDescr"
oid = "IF-MIB::ifDescr"
is_tag = true
# EtherLike-MIB::dot3StatsTable contains detailed ethernet-level information about what kind of errors have been logged on an interface (such as FCS error, frame too long, etc)
[[inputs.snmp.table]]
name = "interface"
inherit_tags = [ "hostname" ]
oid = "EtherLike-MIB::dot3StatsTable"
# Interface tag - used to identify interface in metrics database
[[inputs.snmp.table.field]]
name = "ifDescr"
oid = "IF-MIB::ifDescr"
is_tag = true
System info:
Telegraf : 1.8.1 OS: Centos 7 Activated plugins - vsphere, snmp, system
Steps to reproduce:
- …
- …
Expected behavior:
To be able to get SNMP metrics and pushed to Influx output
Actual behavior:
When running the telegraf test for config, fetches other metrics for System but no SNMP metrics
$telegraf --config /etc/telegraf/telegraf.conf --test
Also when checking the status
$systemctl status telegraf.service -l
: Cannot find module (IPV6-UDP-MIB):At line 0 in (none)
: Cannot find module (IPV6-FORWARD-MIB):At line 0 in (none)
: Cannot find module (NET-SNMP-PASS-MIB):At line 0 in (none)
: Cannot find module (NET-SNMP-EXTEND-MIB):At line 0 in (none)
: Cannot find module (UCD-DLMOD-MIB):At line 0 in (none)
: Cannot find module (SNMP-NOTIFICATION-MIB):At line 0 in (none)
: Cannot find module (IF-MIB):At line 0 in (none)
: IF-MIB::ifTable:Unknown Object Identifier
Additional info:
I also tried doing a snmpwalk, which works perfectly fine for the ip address. [Include gist of relevant config, logs, etc.]
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (5 by maintainers)
I had to install this:
After setting the router’s IP, all errors went away and everything started working. Don’t forget to entire the router IP in the Dashboard
The 1.14.5-alpine now works fine the 1.14.5 does not work and still suffers from this problem
You can reload Telegraf by sending it a SIGHUP, it will reread the configuration and restart the plugins without exiting.
Hi @danielnelson, sure, see below, please:
upload all MIBs from local host to container:
$ sudo docker cp /usr/share/snmp/mibs/. 86c3a0c60a7c:/usr/share/snmp/mibs/
check that MIBs are really uploaded:
Any ideas?
Thanks and BR, Anton