Weird result with SNMP Telegraf plugin

Hello everyone,

I’ve been using the TIG solution for monitoring for some months.
And I just noticed something weird with the Telegraf SNMP plugin. Especially playing with the OID for the CPU load of my routers.
In the InfluxDB base, I get results as:

> select * from cpu_load where agent_host='' order by time limit 20
name: cpu_load
time                agent_host host hostname   hrProcessorFrwID hrProcessorLoad network
----                ---------- ---- --------   ---------------- --------------- -------
1720130410000000000 TIG  RB_OP_0005 .0.0             1               backbone
1720130422000000000 TIG  RB_OP_0005 .0.0             0               backbone
1720130431000000000 TIG  RB_OP_0005 .0.0             1               backbone

but if I run the same snmp request (with a walk):

root@TIG:~# snmpwalk -v2c -c supervision HOST-RESOURCES-MIB::hrProcessorTable
HOST-RESOURCES-MIB::hrProcessorFrwID.1 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.9 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorLoad.1 = INTEGER: 1
HOST-RESOURCES-MIB::hrProcessorLoad.2 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.3 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.4 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.5 = INTEGER: 1
HOST-RESOURCES-MIB::hrProcessorLoad.6 = INTEGER: 1
HOST-RESOURCES-MIB::hrProcessorLoad.7 = INTEGER: 1
HOST-RESOURCES-MIB::hrProcessorLoad.8 = INTEGER: 0
HOST-RESOURCES-MIB::hrProcessorLoad.9 = INTEGER: 0

And my Telegraf SNMP conf looks like:

  agents = ["udp://", "udp://"]
  version = 2
  community = "supervision"
  tags = {network = "backbone"}
# More inputs
    name = "cpu_load"
    oid = "HOST-RESOURCES-MIB::hrProcessorTable"
    inherit_tags = ["hostname"]
# More inputs

So I basically don’t understand, where are all the value from my snmpwalk command? Is Telegraf doing an average of the value to build a single one? This is not very bad news since the value are still readable for the CPU load. But this is kinda weird…

Since your request (or the table) didn’t include any index, you need to tell telegraf to add it by setting index_as_tag.

This make sense, but since I did not configure the index, what is the data I’m getting?

Looks like I get all the good data in my base, but just without the index…

You’re getting 9 identical metrics, so InfluxDB stores/updates to (probably) the last one. There’s definitely no aggregation (like average) happening…

1 Like