Skip to content

SNMP plugin GET for multiple values at once #3784

@savpek

Description

@savpek

I am trying to minimize SNMP traffic between Telegraf agent and nodes from network. Environment where SNMP is really constrained about it network speed and cabability.

First i thought that moving gets to bulks should solve problem. However it seems current OID structure isn't good fit for it (?). I found that SNMP actually supports multiple gets ant single requests, tested with on command line and it seems to work as expected.

My real question is that is there way to configure Telegraf SNMP plugin to request multiple results at single requests?

Basically multiple requests looks like (command line request)
image

Instead of (telegraf request)
image

My example configuration:

[[inputs.snmp]]
  agents = [ "172.21.103.129" ]

  version = 2
  community = "public"
  name = "snmp_foo"

  [[inputs.snmp.field]]
    is_tag = true
    name = "node"
    oid = ".1.3.6.1.4.1.30306.1.1.1.4.1.1.28.0"

  [[inputs.snmp.field]]
    is_tag = true
    name = "network"
    oid = ".1.3.6.1.4.1.30306.1.1.1.4.1.1.1.0"

  [[inputs.snmp.field]]
    name = "voltage_v_est"
    oid = ".1.3.6.1.4.1.30306.1.1.1.4.2.1.2.0"

  [[inputs.snmp.field]]
    name = "temperature"
    oid = ".1.3.6.1.4.1.30306.1.1.1.4.2.1.1.0"

  [[inputs.snmp.field]]
    name = "ru_tx_packet"
    oid = ".1.3.6.1.4.1.30306.1.1.1.4.2.1.7.0"

  [[inputs.snmp.field]]
    name = "ru_rx_packet"
    oid = ".1.3.6.1.4.1.30306.1.1.1.4.2.1.8.0"

Use case: [Why is this important (helps with prioritizing requests)]
Get network usage as small as possible on constrained environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/snmpfeature requestRequests for new plugin and for new features to existing pluginsperformanceproblems with decreased performance or enhancements that improve performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions