Document toolboxDocument toolbox

Forward response to SNMP

Overview

You can send the query results as SNMP traps V2 over UDP protocol. To do it, you must include the destination object in your request and set type to snmp like this:

"destination": { "type":"snmp" }

Parameters

With the destination.type set to snmp, you need to specify some additional parameters to create a "trap", which are the notification messages sent from a remote SNMP-enabled device. The API request requires a destination address to which send the traps.

Parameter

Description

Parameter

Description

oidField*required

Indicate the unique OID of the trap. The value must be a string representing a valid OID value.

address*required

Field that includes the address to which send the trap, in format IP/port (for example, 127.0.0.1/2222).

payloadField*required

Field to get the payload from.

descField

Field to get the description from.

community

Field to get the SNMP community string from.

Query using LINQ and forwarding to SNMP

{ "query":"LinQ_query", "from":1549627003.141, "destination":{ "type":"snmp", "params":{ "oidField":"myOid", "address":"127.0.0.1/2222", "payloadField":"url", "community":"public" } } }

The result of the request is the SNMP trap with the provided fields.

Errors

The following table describes the possible errors you may get with your response:

Error code

Message

Description

Error code

Message

Description

420

QUERY_SNMP_NO_PARAMS

No params sent

421

QUERY_SNMP_MISSED_OID_FIELD

Missing parameter oidField

422

QUERY_SNMP_MISSED_ADDRESS

Missing parameter address

423

QUERY_SNMP_BAD_ADDRESS

Wrong address. Must follow format "host/port"

424

QUERY_SNMP_MISSED_PAYLOAD_FIELD

Missing parameter payloadField