Telegraf snmp.table mpls table

hey guys!

I’m trying to insert the snmpwalk result of a specific OID into telegraf/influx, but without success. This query has an answer via snmpwalk, but there is no result in snmptable (apparently it goes into a loop), I’ve tried different ways, it would be something apparently simple, but I don’t know where I’m going wrong.

Here is the snmpwalk output:

root@graylog:/etc/telegraf# snmpwalk -v2c -ctest251 -Oa -M [/root/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/ share/snmp/mibs/ietf:/opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp:/opt/observium/mibs/juniper:/opt/observium/mibs] .1.3.
iso. = STRING: "… "
iso. = STRING: "… "
iso. = STRING: "… "
iso. = STRING: "… "
iso. = STRING: "… "
iso. = STRING: “…”
iso. 48.48.49 = STRING: "… "

We have a long list of about 200 lines

And here is the telegraf config:

agents = [“”]
timeout = “90s”
version = 2
community = “test251”
agent_host_tag = “source”
retries = 3
name = “mplsLspInfoName”
oid = “.”
name = “name”
is_tag = true
oid = “.”
name = “route”

When I use snmptable it simply goes into a loop or timeout and when I run telegraf in debug mode I have the following output:

2024-07-08T21:59:55Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2024-07-08T22:00:00Z W! [inputs.snmp] Collection took longer than expected; not complete after interval of 5m0s
2024-07-08T22:00:03Z D! [inputs.snmp] Previous collection has not completed; scheduled collection skipped
2024-07-08T22:00:09Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2024-07-08T22:00:21Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2024-07-08T22:00:34Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2024-07-08T22:00:45Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2024-07-08T22:00:58Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics
2024-07-08T22:01:00Z E! [inputs.snmp] Error in plugin: agent gathering table mplsLspInfoName: performing bulk walk for field route: request timeout (after 3 retries)

Does anyone have any idea what it could be?

Could you first try with a simple field like sysUptime to see if you get any results from that?

hello @Hipska

Some normal ones I can collect, other mibs it seems to go into a loop, ifTable for example I can collect, I can also do snmptable. Example:

snmptable -Oqv -v 2c -c test251 -r 3 -t 120 IF-MIB::ifTable
SNMP table: IF-MIB::ifTable
ifIndex ifDescr ifType ifMtu ifSpeed ​​ifPhysAddress ifAdminStatus ifOperStatus ifLastChange ifInOctets ifInUcastPkts ifInNUcastPkts ifInDiscards ifInErrors ifInUnknownProtos ifOutOctets ifOutUcastPkts ifOutNUcastPkts ifOutDiscards ifOutErrors ifOutQLen ifSpecific
INTEGER: 504 STRING: irb INTEGER: other(1) INTEGER: 1514 Gauge32: 0 STRING: 9c:8a:cb:87:16:20 INTEGER: up(1) INTEGER: up(1) Timeticks: (6224) 0: 01:02.24 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Gauge32: 0 OID: SNMPv2-SMI::zeroDotZero

In the case of the MPLS table it apparently goes into a loop.

snmptable -Oqv -v2c -c test251 -r 3 -t 120 MPLS-MIB::mplsLspInfoEntry


It stayed like that for hours until the process itself killed itself.

[2980668.646756] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=init.scope,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1001.slice/session-25352.scope,task=snmptable,pid=3267648,uid=0
[2980668.646782] Out of memory: Killed process 3267648 (snmptable) total-vm:34857596kB, anon-rss:32976108kB, file-rss:4120kB, shmem-rss:0kB, UID:0 pgtables:68256kB oom_score_adj:0
[2980673.113148] oom_reaper: reaped process 3267648 (snmptable), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB