Skip to content
© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

SNMP API

ThingsBoard Edge acts as an SNMP manager — it polls SNMP-enabled devices on the local network on a configurable schedule. Devices do not initiate connections to Edge; Edge reaches out to them.

Default port: 161 UDP (Edge polls devices on this port)

SNMP devices require a device profile configured with:

  • Transport type: SNMP
  • SNMP version: v1, v2c, or v3
  • Host: IP address or hostname of the SNMP device
  • Port: SNMP port on the device (default 161)

To configure a SNMP device profile: go to Profiles → Device profiles → Add device profile, select SNMP as the transport type.

SNMP version Credential fields
v1 / v2c Community string (e.g., public)
v3 Username, security name, context name, engine ID, authentication protocol (MD5, SHA-1, SHA-224/256/384/512), auth passphrase, privacy protocol (DES, AES-128/192/256), privacy passphrase

Set credentials on the Device credentials tab of the device or in the device profile.

Map SNMP OIDs to ThingsBoard attribute and telemetry keys in the SNMP section of the device profile:

Field Description
OID Full OID string (e.g., 1.3.6.1.2.1.1.3.0)
Key ThingsBoard attribute or telemetry key name
Data type Integer, string, long, boolean, double
Scope TELEMETRY or CLIENT_SCOPE (attribute)

Edge reads the mapped OIDs at each polling interval and publishes the values as telemetry or attributes. Values are stored locally and synced to the ThingsBoard server over gRPC.

The polling interval is configured per device profile in the SNMP transport configuration section. The minimum polling interval is one second.

Send SNMP GET and SET commands to devices via the ThingsBoard RPC API:

RPC method SNMP operation Description
get SNMP GET Read the value of one or more OIDs
set SNMP SET Write a value to an OID

RPC commands reference an OID mapping key configured in the device profile. For a GET command:

{
"method": "GET",
"params": {
"key": "systemInfo"
}
}

Response is routed to the next rule node as:

{"systemInfo": "SNMP device"}

For a SET command, include the value to write:

{
"method": "SET",
"params": {
"key": "lastUpdateTime",
"value": "12901200312"
}
}

The value is sent as OCTET STRING for all data types except LONG, which uses INTEGER — a signed 32-bit integer.