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 tables are not collected #10445

Closed
Takuto88 opened this issue Jan 14, 2022 · 22 comments · Fixed by #10802
Closed

SNMP tables are not collected #10445

Takuto88 opened this issue Jan 14, 2022 · 22 comments · Fixed by #10802
Assignees
Labels
area/snmp bug unexpected problem or unintended behavior

Comments

@Takuto88
Copy link

Takuto88 commented Jan 14, 2022

Relevent telegraf.conf

[[outputs.influxdb]]
  urls = ["https://REDACTED"]
  username = "redacted"
  password = "redacted"
  database = "redacted"
  skip_database_creation = true
  namepass = ["yate*"]
  taginclude = ["host","hostname_short","yate_group","linksetID","linkID","sccpID","routerID"]

# https://github.com/influxdata/telegraf/blob/release-1.14/plugins/inputs/snmp/README.md
[[inputs.snmp]]
  agents = [ "127.0.0.1:1161" ]
  version = 2
  community = "sms"

  path = [ "/usr/share/snmp/mibs", "/usr/local/share/yate/data" ]
  name = "yate"

  [[inputs.snmp.table]]
    oid = "YATE-MIB::linksetTable"
    #oid = ".1.3.6.1.4.1.34501.1.6.2.2"
    name = "yate_linkset_entry_table"

Logs from Telegraf

2022-01-14T09:34:57Z I! [agent] Hang on, flushing any cached metrics before shutdown
2022-01-14T09:34:59Z I! Loaded inputs: cpu (2x) disk (2x) diskio (2x) exec kernel (2x) mem (2x) net (2x) netstat (2x) openntpd (2x) processes (2x) procstat (2x) snmp swap (2x) system (2x)
2022-01-14T09:34:59Z I! Loaded aggregators: 
2022-01-14T09:34:59Z I! Loaded processors: 
2022-01-14T09:34:59Z I! Loaded outputs: influxdb (4x) prometheus_client
2022-01-14T09:34:59Z I! Tags enabled: dc=hq distribution=Debian distribution_release=buster distribution_version=10 env=dev host=redacted-host.example.com hostname_short=signaling-endpoint01 memtotal_mb=1995 processor_cores=1 processor_count=2 system_type=kvm system_vendor=QEMU
2022-01-14T09:34:59Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"redacted-host.example.com", Flush Interval:10s
2022-01-14T09:34:59Z W! [inputs.snmp] module miblist.txt could not be loaded
2022-01-14T09:35:01Z W! [inputs.snmp] module DPI20-MIB could not be loaded
2022-01-14T09:35:02Z W! [inputs.snmp] module HPR-MIB could not be loaded
2022-01-14T09:35:05Z W! [inputs.snmp] module SNMPv2-PDU could not be loaded
2022-01-14T09:35:06Z W! [inputs.snmp] module TCPIPX-MIB could not be loaded
2022-01-14T09:35:06Z W! [inputs.snmp] module snmp_mib.conf could not be loaded
2022-01-14T09:35:06Z I! [outputs.prometheus_client] Listening on http://127.0.0.1:9273/metrics
2022-01-14T09:39:30Z I! [agent] Hang on, flushing any cached metrics before shutdown
2022-01-14T09:39:30Z I! [agent] Stopping running outputs
2022-01-14T09:39:30Z I! Loaded inputs: cpu (2x) disk (2x) diskio (2x) exec kernel (2x) mem (2x) net (2x) netstat (2x) openntpd (2x) processes (2x) procstat (2x) snmp swap (2x) system (2x)
2022-01-14T09:39:30Z I! Loaded aggregators: 
2022-01-14T09:39:30Z I! Loaded processors: 
2022-01-14T09:39:30Z I! Loaded outputs: influxdb (4x) prometheus_client
2022-01-14T09:39:30Z I! Tags enabled: dc=hq distribution=Debian distribution_release=buster distribution_version=10 env=dev host=redacted-host.example.com hostname_short=signaling-endpoint01 memtotal_mb=1995 processor_cores=1 processor_count=2 system_type=kvm system_vendor=QEMU
2022-01-14T09:39:30Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"redacted-host.example.com", Flush Interval:10s
2022-01-14T09:39:30Z W! [inputs.snmp] module miblist.txt could not be loaded
2022-01-14T09:39:32Z W! [inputs.snmp] module DPI20-MIB could not be loaded
2022-01-14T09:39:33Z W! [inputs.snmp] module HPR-MIB could not be loaded
2022-01-14T09:39:36Z W! [inputs.snmp] module SNMPv2-PDU could not be loaded
2022-01-14T09:39:37Z W! [inputs.snmp] module TCPIPX-MIB could not be loaded
2022-01-14T09:39:37Z W! [inputs.snmp] module snmp_mib.conf could not be loaded
2022-01-14T09:39:37Z I! [outputs.prometheus_client] Listening on http://127.0.0.1:9273/metrics
2022-01-14T09:43:36Z I! [agent] Hang on, flushing any cached metrics before shutdown
2022-01-14T09:43:36Z I! [agent] Stopping running outputs
2022-01-14T09:43:36Z I! Loaded inputs: cpu (2x) disk (2x) diskio (2x) exec kernel (2x) mem (2x) net (2x) netstat (2x) openntpd (2x) processes (2x) procstat (2x) snmp swap (2x) system (2x)
2022-01-14T09:43:36Z I! Loaded aggregators: 
2022-01-14T09:43:36Z I! Loaded processors: 
2022-01-14T09:43:36Z I! Loaded outputs: influxdb (4x) prometheus_client
2022-01-14T09:43:36Z I! Tags enabled: dc=hq distribution=Debian distribution_release=buster distribution_version=10 env=dev host=redacted-host.example.com hostname_short=signaling-endpoint01 memtotal_mb=1995 processor_cores=1 processor_count=2 system_type=kvm system_vendor=QEMU
2022-01-14T09:43:36Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"redacted-host.example.com", Flush Interval:10s
2022-01-14T09:43:36Z D! [agent] Initializing plugins
2022-01-14T09:43:36Z W! [inputs.snmp] module miblist.txt could not be loaded
2022-01-14T09:43:38Z W! [inputs.snmp] module DPI20-MIB could not be loaded
2022-01-14T09:43:39Z W! [inputs.snmp] module HPR-MIB could not be loaded
2022-01-14T09:43:42Z W! [inputs.snmp] module SNMPv2-PDU could not be loaded
2022-01-14T09:43:43Z W! [inputs.snmp] module TCPIPX-MIB could not be loaded
2022-01-14T09:43:43Z W! [inputs.snmp] module snmp_mib.conf could not be loaded
2022-01-14T09:43:43Z D! [agent] Connecting outputs
2022-01-14T09:43:43Z D! [agent] Attempting connection to [outputs.prometheus_client]
2022-01-14T09:43:43Z I! [outputs.prometheus_client] Listening on http://127.0.0.1:9273/metrics
2022-01-14T09:43:43Z D! [agent] Successfully connected to outputs.prometheus_client
2022-01-14T09:43:43Z D! [agent] Attempting connection to [outputs.influxdb]
2022-01-14T09:43:43Z D! [agent] Successfully connected to outputs.influxdb
2022-01-14T09:43:43Z D! [agent] Attempting connection to [outputs.influxdb]
2022-01-14T09:43:43Z D! [agent] Successfully connected to outputs.influxdb
2022-01-14T09:43:43Z D! [agent] Attempting connection to [outputs.influxdb]
2022-01-14T09:43:43Z D! [agent] Successfully connected to outputs.influxdb
2022-01-14T09:43:43Z D! [agent] Attempting connection to [outputs.influxdb]
2022-01-14T09:43:43Z D! [agent] Successfully connected to outputs.influxdb
2022-01-14T09:43:43Z D! [agent] Starting service inputs
2022-01-14T09:43:56Z D! [outputs.influxdb] Wrote batch of 1 metrics in 35.293971ms
2022-01-14T09:43:56Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:43:56Z D! [outputs.prometheus_client] Wrote batch of 1 metrics in 103.069µs
2022-01-14T09:43:56Z D! [outputs.prometheus_client] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:43:57Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:43:58Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:43:58Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 0: {"device":"sysfs","mountpoint":"/sys","fstype":"sysfs","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 1: {"device":"proc","mountpoint":"/proc","fstype":"proc","opts":["rw","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/proc"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 2: {"device":"udev","mountpoint":"/dev","fstype":"devtmpfs","opts":["rw","nosuid","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => dropped by filesystem-type filter
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 3: {"device":"devpts","mountpoint":"/dev/pts","fstype":"devpts","opts":["rw","nosuid","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/dev/pts"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 4: {"device":"tmpfs","mountpoint":"/run","fstype":"tmpfs","opts":["rw","nosuid","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => dropped by filesystem-type filter
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 5: {"device":"/dev/vda1","mountpoint":"/","fstype":"ext4","opts":["rw","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 6: {"device":"securityfs","mountpoint":"/sys/kernel/security","fstype":"securityfs","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/kernel/security"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 7: {"device":"tmpfs","mountpoint":"/dev/shm","fstype":"tmpfs","opts":["rw","nosuid","nodev"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => dropped by filesystem-type filter
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 8: {"device":"tmpfs","mountpoint":"/run/lock","fstype":"tmpfs","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => dropped by filesystem-type filter
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 9: {"device":"tmpfs","mountpoint":"/sys/fs/cgroup","fstype":"tmpfs","opts":["ro","nosuid","nodev","noexec"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => dropped by filesystem-type filter
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 10: {"device":"cgroup2","mountpoint":"/sys/fs/cgroup/unified","fstype":"cgroup2","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/unified"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 11: {"device":"cgroup","mountpoint":"/sys/fs/cgroup/systemd","fstype":"cgroup","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/systemd"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 12: {"device":"pstore","mountpoint":"/sys/fs/pstore","fstype":"pstore","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/pstore"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 13: {"device":"bpf","mountpoint":"/sys/fs/bpf","fstype":"bpf","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/bpf"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 14: {"device":"cgroup","mountpoint":"/sys/fs/cgroup/memory","fstype":"cgroup","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/memory"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 15: {"device":"cgroup","mountpoint":"/sys/fs/cgroup/cpu,cpuacct","fstype":"cgroup","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/cpu,cpuacct"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 16: {"device":"cgroup","mountpoint":"/sys/fs/cgroup/blkio","fstype":"cgroup","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/blkio"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 17: {"device":"cgroup","mountpoint":"/sys/fs/cgroup/freezer","fstype":"cgroup","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/freezer"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 18: {"device":"cgroup","mountpoint":"/sys/fs/cgroup/devices","fstype":"cgroup","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/devices"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 19: {"device":"cgroup","mountpoint":"/sys/fs/cgroup/net_cls,net_prio","fstype":"cgroup","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/net_cls,net_prio"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 20: {"device":"cgroup","mountpoint":"/sys/fs/cgroup/rdma","fstype":"cgroup","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/rdma"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 21: {"device":"cgroup","mountpoint":"/sys/fs/cgroup/cpuset","fstype":"cgroup","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/cpuset"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 22: {"device":"cgroup","mountpoint":"/sys/fs/cgroup/perf_event","fstype":"cgroup","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/perf_event"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 23: {"device":"cgroup","mountpoint":"/sys/fs/cgroup/pids","fstype":"cgroup","opts":["rw","nosuid","nodev","noexec","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/fs/cgroup/pids"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 24: {"device":"systemd-1","mountpoint":"/proc/sys/fs/binfmt_misc","fstype":"autofs","opts":["rw","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => dropped by filesystem-type filter
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 25: {"device":"debugfs","mountpoint":"/sys/kernel/debug","fstype":"debugfs","opts":["rw","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/sys/kernel/debug"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 26: {"device":"hugetlbfs","mountpoint":"/dev/hugepages","fstype":"hugetlbfs","opts":["rw","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/dev/hugepages"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 27: {"device":"mqueue","mountpoint":"/dev/mqueue","fstype":"mqueue","opts":["rw","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/dev/mqueue"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] partition 28: {"device":"binfmt_misc","mountpoint":"/proc/sys/fs/binfmt_misc","fstype":"binfmt_misc","opts":["rw","relatime"]}
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] -> using mountpoint "/proc/sys/fs/binfmt_misc"...
2022-01-14T09:44:00Z D! [inputs.disk] [SystemPS] => kept...
2022-01-14T09:44:08Z D! [outputs.influxdb] Wrote batch of 1 metrics in 26.548335ms
2022-01-14T09:44:08Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:44:10Z D! [outputs.prometheus_client] Wrote batch of 26 metrics in 2.595845ms
2022-01-14T09:44:10Z D! [outputs.prometheus_client] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:44:10Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:44:12Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:44:12Z D! [outputs.influxdb] Wrote batch of 24 metrics in 12.39337ms
2022-01-14T09:44:12Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:44:21Z D! [outputs.influxdb] Wrote batch of 2 metrics in 12.684048ms
2022-01-14T09:44:21Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:44:21Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:44:23Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:44:24Z D! [outputs.prometheus_client] Wrote batch of 1 metrics in 102.537µs
2022-01-14T09:44:24Z D! [outputs.prometheus_client] Buffer fullness: 0 / 10000 metrics
2022-01-14T09:44:25Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics

System info

Telegraf 1.21.2 - Debian 10 (Buster)

Docker

No response

Steps to reproduce

  1. Setup telegraf to collect a SNMP Table
  2. Setup telegraf to output the metrics to influxdb

Expected behavior

The collected metrics should be pushed to influxdb

Actual behavior

The metrics are collected via SNMP (we've seen this by watching tcpdump) but telegraf never pushes them to influxdb.

Additional info

Downgrading to 1.20.4 resolved the issue for us. We suspect that the snmptranslate to gosnmp migration breaks something.

We're using custom MIBS for a Software called YATE. These are configued in telegraf here:

  path = [ "/usr/share/snmp/mibs", "/usr/local/share/yate/data" ]

The contents of the MIBS folder /usr/local/share/yate/data are as follows:

NULL-TEAM-MIB.txt
YATE-MIB.txt
snmp_mib.conf

Note: The file snmp_mib.conf seems to fail to load according to the logfile: 2022-01-14T09:39:37Z W! [inputs.snmp] module snmp_mib.conf could not be loaded.

Using YATE-MIB::linksetTable as oid or the numeric path .1.3.6.1.4.1.34501.1.6.2.2 makes no difference

The SNMP Table in question looks like this:

snmpwalk -v 2c -c sms localhost:1161 YATE-MIB::linksetTable
YATE-MIB::linksetIndex.1 = Gauge32: 1
YATE-MIB::linksetIndex.2 = Gauge32: 2
YATE-MIB::linksetID.1 = STRING: linkset_sep01dev_stp01dev
YATE-MIB::linksetID.2 = STRING: linkset_sep01dev_stp02dev
YATE-MIB::linksetType.1 = STRING: ss7-mtp3
YATE-MIB::linksetType.2 = STRING: ss7-mtp3
YATE-MIB::linksetStatus.1 = STRING: operational
YATE-MIB::linksetStatus.2 = STRING: operational
YATE-MIB::linksetDownAlarms.1 = Counter32: 3
YATE-MIB::linksetDownAlarms.2 = Counter32: 6
YATE-MIB::linksetRxMSU.1 = Counter32: 11333
YATE-MIB::linksetRxMSU.2 = Counter32: 11465
YATE-MIB::linksetTxMSU.1 = Counter32: 11304
YATE-MIB::linksetTxMSU.2 = Counter32: 11314
YATE-MIB::linksetRxOctets.1 = Counter64: 126451
YATE-MIB::linksetRxOctets.2 = Counter64: 127694
YATE-MIB::linksetTxOctets.1 = Counter64: 129772
YATE-MIB::linksetTxOctets.2 = Counter64: 128724

Other things we observed: If we configure individual values from tables, things seem to work fine. But tables as a whole can lo longer be collected.

@Takuto88 Takuto88 added the bug unexpected problem or unintended behavior label Jan 14, 2022
@nward
Copy link

nward commented Jan 14, 2022

@Takuto88 2 suggestions:

  1. Try rename your MIB files to be exactly the same as the module name - i.e. rename YATE-MIB.txt to YATE-MIB etc. - since moving to gosmi for parsing MIBs in 1.21.0, this appears to be required
  2. Roll back to 1.20.4 until the MIB parsing is working properly

@Takuto88
Copy link
Author

Thanks for the suggestions

Try rename your MIB files to be exactly the same as the module name - i.e. rename YATE-MIB.txt to YATE-MIB etc. - since moving to gosmi for parsing MIBs in 1.21.0, this appears to be required

I've tried that but unfortunately, that does not seem to do anything ☹️

Roll back to 1.20.4 until the MIB parsing is working properly

That's what we'll do for now. Just wanted to report this so that the devs know that something might have broken here.

@igit
Copy link

igit commented Jan 15, 2022

+1
All my configurations with "[[inputs.snmp.table]]" does not work. I've to rollback to 1.20.4

@Hipska
Copy link
Contributor

Hipska commented Jan 18, 2022

I the YATE-MIB dependent on any of the MIBs that could not be loaded?

2022-01-14T09:43:36Z W! [inputs.snmp] module miblist.txt could not be loaded
2022-01-14T09:43:38Z W! [inputs.snmp] module DPI20-MIB could not be loaded
2022-01-14T09:43:39Z W! [inputs.snmp] module HPR-MIB could not be loaded
2022-01-14T09:43:42Z W! [inputs.snmp] module SNMPv2-PDU could not be loaded
2022-01-14T09:43:43Z W! [inputs.snmp] module TCPIPX-MIB could not be loaded
2022-01-14T09:43:43Z W! [inputs.snmp] module snmp_mib.conf could not be loaded

@nward
Copy link

nward commented Jan 18, 2022

YATE-MIB relies only on NULL-TEAM-MIB and the usual SNMPv2-SMI and such so should be fine re. dependencies.

I don't actually see any errors in the logs as we have seen in other cases (i.e. #10444 where there is a translation error). I wonder if there is something else going on here..

@Takuto88 are you in a position to get a tcpdump of the SNMP traffic from telegraf running 1.21.2 to your YATE server - with full packet size? (i.e. set the -s0 option). I guess looking at your config that is just on localhost port 1161. It would be interesting to see if there is any SNMP traffic being sent.

Was the log provided generated from the exact config you included (modulo credentials, of course)?

@Takuto88
Copy link
Author

@Takuto88 are you in a position to get a tcpdump of the SNMP traffic from telegraf running 1.21.2 to your YATE server - with full packet size? (i.e. set the -s0 option). I guess looking at your config that is just on localhost port 1161. It would be interesting to see if there is any SNMP traffic being sent.

Yes I am in a position to provide the trace. Please find it attached here: trace.pcap.zip

The port 1161 is correct. When looking at the trace in Wireshark, one must remember to change the SNMP UDP Port via Preferences -> Protocols -> SNMP. Otherwise Wireshark will not decode the SNMP data.

As far as I can tell, the Tables are collected via SNMP (e.g. get-bulk request for 1.3.6.1.4.1.34501.1.6.2.2.1.2). But there is nothing in the debug log and no data is pushed to Influxdb which is really odd.

Was the log provided generated from the exact config you included (modulo credentials, of course)?

Yes that's a copy-paste of the relevant part. We do collect more stuff that I've omitted to keep the example concise. I can provide the full configuration (minus secrets like passwords 😉 ) if you feel that it may be relevant. The same config works with 1.20.4 just fine (except for the new path= directive which is not compatible nor needed for the older Telegraf versions).

@MyaLongmire MyaLongmire self-assigned this Jan 20, 2022
@igit
Copy link

igit commented Jan 24, 2022

+1 All my configurations with "[[inputs.snmp.table]]" does not work. I've to rollback to 1.20.4

I've found my problem (and maybe the same for others ?).
The SNMPv2-SMI.txt file I used was too old and incomplete (downloaded from Cisco I don't remember when)... this makes telegraf do not collecte silently Tables.
After updating from a "fresh" version (ex: https://raw.githubusercontent.com/trevoro/snmp-mibs/master/mibs/SNMPv2-SMI.mib), all work fine now.

I suppose the gosmi lib needs a "good" SNMPv2-SMI file to do the job...
The mib files attached
IANAifType-MIB.txt
IF-MIB.txt
RFC1213-MIB.txt
SNMPv2-CONF.txt
SNMPv2-MIB.txt
SNMPv2-SMI.txt
SNMPv2-TC.txt
helps me to make working this configuration :

[[inputs.snmp]]
agents = ["udp://swhome:161"]
path = ["/etc/telegraf/my-mibs/"]

[[inputs.snmp.field]]
oid = "RFC1213-MIB::sysUpTime.0"
name = "uptime"

[[inputs.snmp.table]]
oid = "IF-MIB::ifTable"
name = "snmp"

[[inputs.snmp.table.field]]
oid = "IF-MIB::ifIndex"
is_tag = true

[[inputs.snmp.table.field]]
oid = "IF-MIB::ifDescr"
is_tag = true

@igit
Copy link

igit commented Jan 24, 2022

@Takuto88, maybe you have the same problem I had with a bad version of SNMPv2-SMI.txt.
I've tried to load telegraf with only these files (path = ["/etc/telegraf/my-mibs/"]) :
YATE-MIB.txt
NULL-TEAM-MIB.txt
SNMPv2-SMI.txt
SNMPv2-TC.txt
all seems ok.

Of course I don't have a device that responds to these YATE oids... but I'm pretty sure (I hope) it'll work for you too.

@Hipska Hipska added the waiting for response waiting for response from contributor label Jan 31, 2022
@Takuto88
Copy link
Author

Takuto88 commented Feb 2, 2022

@igit Thank you for your investigation. Unfortunately, I don't see a different behaviour than before when loading just these files. Telegraf still scrapes these tables but does not push their contents to influx for whatever reason.

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Feb 2, 2022
@Hipska
Copy link
Contributor

Hipska commented Feb 2, 2022

Could you also give the results of running telegraf with --test command argument?

@Takuto88
Copy link
Author

Takuto88 commented Feb 2, 2022

@Hipska Sure thing. Here you go:
testoutput.log

@Hipska
Copy link
Contributor

Hipska commented Feb 2, 2022

Okay, indeed nothing in there. (might have been an issue related to your filtering on InfluxDB) But I also seem some output that was not configured, so could you please provide the exact inputs.snmp config that is used?

Other things we observed: If we configure individual values from tables, things seem to work fine. But tables as a whole can lo longer be collected.

So you confirm the table gets collected when specifying one or more fields individually? @MyaLongmire could you have a look on this? Seems like table init has some issues in this case..

@Hipska Hipska added the waiting for response waiting for response from contributor label Feb 14, 2022
@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Feb 28, 2022
@influxdata influxdata deleted a comment from telegraf-tiger bot Feb 28, 2022
@sspaink sspaink reopened this Feb 28, 2022
@Hipska Hipska added the waiting for response waiting for response from contributor label Feb 28, 2022
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Mar 1, 2022

Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Page. Thank you!

@telegraf-tiger telegraf-tiger bot closed this as completed Mar 1, 2022
@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Mar 1, 2022
@Hipska Hipska added the waiting for response waiting for response from contributor label Mar 1, 2022
@Hipska Hipska reopened this Mar 1, 2022
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Mar 2, 2022

Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Page. Thank you!

@telegraf-tiger telegraf-tiger bot closed this as completed Mar 2, 2022
@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Mar 2, 2022
@sspaink
Copy link
Contributor

sspaink commented Mar 2, 2022

Sorry about the noise from the tiger bot, this is a bug I'll look into why it wants to close this issue.

@reimda
Copy link
Contributor

reimda commented Mar 19, 2022

Hi @Takuto88 and @igit, we recently merged a change that adds back MIB translation by netsnmp (snmptranslate and snmptable). See #10802

Whether the specific problem you're hitting is caused by and old/incomplete SNMPv2-SMI file or whatever, if you had a working configuration with 1.20.4 it should work again with recent nightly builds.

Could you test with a nightly build to see if this change fixes your problem and lets you upgrade? We'd like to release it with 1.23.0 which is planned for Wednesday, March 23. If you could report what you find it would help us flush out bugs and gain confidence in the change.

@Hipska
Copy link
Contributor

Hipska commented Mar 19, 2022

The problem here seems to be with non working table init. Not directly related to MIB loading.

@reimda
Copy link
Contributor

reimda commented Mar 19, 2022

@Hipska Table init and mib loading were both changed when we switched to gosmi. 10802 switched both back to the 1.20.4 code.

Since downgrading to 1.20.4 worked in January for Takuto88, it seems likely to me that a build with 10802 will also work. It's definitely worth retesting. If they test and find the nightly build doesn't work for them, that's a data point that's very valuable for debugging.

@Hipska
Copy link
Contributor

Hipska commented Mar 21, 2022

@Takuto88 Could you please come back and let us know if this is resolved by using the latest builds of Telegraf?

@Hipska Hipska added the waiting for response waiting for response from contributor label Mar 21, 2022
@igit
Copy link

igit commented Mar 22, 2022

Hi @Takuto88 and @igit, we recently merged a change that adds back MIB translation by netsnmp (snmptranslate and snmptable). See #10802

Whether the specific problem you're hitting is caused by and old/incomplete SNMPv2-SMI file or whatever, if you had a working configuration with 1.20.4 it should work again with recent nightly builds.

Could you test with a nightly build to see if this change fixes your problem and lets you upgrade? We'd like to release it with 1.23.0 which is planned for Wednesday, March 23. If you could report what you find it would help us flush out bugs and gain confidence in the change.

@reimda , for me the issue was a problem of an old MIB file not recognized by gosmi parser. When I updated my files and test the parsing, all was ok. I tested the file used by @Takuto88, for me the gosmi parsing was ok. Not sure the problem was here...

But, I looked at the PR #10802, I think it's a good idea to have the two parsers (gosmi and Net-SNMP) in the code, and let's choose the user (with conf translator = "gosmi"). I'll check it in next version !

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Mar 22, 2022
@Hipska Hipska linked a pull request Mar 23, 2022 that will close this issue
@Hipska Hipska closed this as completed Mar 23, 2022
@Takuto88
Copy link
Author

Takuto88 commented Apr 4, 2022

Just a quick update from me as the issue reporter: We could upgrade from Telegraf v1.20.4 to v1.22.0 without any changes to our config and it just works 🎉 . Thanks to everyone involved for fixing this 💐 .

P.S.: I am sorry for the delayed response. It took us a while to get back to this and verify the fix.

@MyaLongmire
Copy link
Contributor

MyaLongmire commented Apr 4, 2022

@Takuto88, thanks for coming back with an update! Happy to hear your issue is fixed 🕺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/snmp bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants