influxdata / influxdata/telegraf

SNMP plugin GET for multiple values at once

Open
#3,784 23 comments 4 reactions 0 assignees View on GitHub
area/snmp feature request performance
Dominant language
Go
Stars
17.8k
Forks
5.8k
Avg merge
1d 20h
Merged PRs (30d)
161

Description

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](https://user-images.githubusercontent.com/481896/36094067-82326b32-0ff5-11e8-9eb6-d59315d2efa0.png)

Instead of (telegraf request)
![image](https://user-images.githubusercontent.com/481896/36094077-8a632ddc-0ff5-11e8-9a9a-be6a0b0acdac.png)

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.

Contributor guide

Open the contributing guide

Research direction

The entry point is the Telegraf SNMP plugin; start by tracing how the listed field OIDs are requested and compare that with the command-line multi-value request shown. Done means the plugin can request the listed OIDs in a single SNMP request while preserving the existing field and tag results and reducing network traffic.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.