SNMP: Read Node

The SNMP: Read Node allows you to read values from multiple OIDs on your SNMP device. This node is available in edge workflows.

SNMP: Read Node Configuration

Node Properties

There are three categories to the configuration for the SNMP: Read Node: the connection, the read instructions, and the result.

Connection Configuration

SNMP: Read Node Connection Configuration

First, configure the information to establish a connection to the device.

  • Host Template: (Required) A string template for the destination address. This can be either an IPv4 or IPv6 address, or a hostname that resolves to an address.
  • Port Template: (Optional) A string template or integer for the UDP port at the target address. Default is port 161.
  • Source Port Template: (Optional) A string template or integer for the UDP port from which the message should be sent on the edge device. If not provided, a random port is selected at runtime.
  • SNMP Version: (Required) The version of SNMP with which to establish a connection. Options are Version1, Version2c, or Version3. Defaults to Version2c.

Depending on the version selected, additional input is required.

Version1 and Version2c Configuration

  • Community Template: (Required) A string template for the community credential delivered with the request. Defaults to public.

Version3 Configuration

SNMP: Read Node Version3 Configuration

  • Username Template: (Required) A string template for the username.
  • Security Level: (Required) The amount of security to use when establishing the SNMP connection. Options are No Authentication or Encryption, Authenticate, No Encryption, and Authenticate and Encrypt.
  • Authentication Method: The protocol to use for authentication. Required if the selected security level requires authentication. Options are SHA or MD5. Defaults to SHA.
  • Authentication Key: A string template for the authentication key. Required if the selected security level requires authentication.
  • Encryption Method: The method to use to encrypt the requested data. Options are DES or AES. Defaults to DES. Required if the selected security level requires encryption.
  • Private Key: A string template for the key to use when encrypting the requested data. Required if the selected security level requires encryption.

Read Instructions

SNMP: Read Node Instructions

Next, indicate the instructions to read values. Read Instructions can either be specified with an array of template strings or by pointing to a payload path with the required instructions. At least one instruction is required.

  • Array of Template Strings: For each instruction, the following configuration fields are required:

    • OID Template: (Required) Template for the OID from which to read.
    • Result Key: (Required) The key at which to store the result of the read operation. This key and its corresponding value will be placed on the Result Path.
  • Payload Path: Enter a payload path that resolves to an array of Read Instructions to be run on this node. The following are the object properties that each object in the array should contain for successful reads:

    • oid: (Required) Template for the OID from which to read.
    • resultKey: (Required) The key at which to store the result of the read operation. This key and its corresponding value will be placed on the Result Path.

Result

SNMP: Read Node Results Configuration

Finally, indicate the payload path at which the result should be placed. The result path defines where on the payload to store the result of the read(s). If values are successfully read, this represents an object with values at the given keys for each read. If there are any errors, the result includes an object with details about the error.

Node Example

The following is an example of data from a successful read:

{
  "result": {
    "first": "Value Name",
    "second": 76
  }
}

Node Errors

The following is an example of a failed read due to timeout:

{
  "error": {
    "message": "Request timed out",
    "type": "SnmpReadError"
  }
}

Was this page helpful?


Still looking for help? You can also search the Losant Forums or submit your question there.