Description:

Retrieves information from SNMP Agent and outputs a FlowFile with information in attributes and without any content

Tags:

snmp, get, oid, walks

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, whether a property supports the Expression Language Guide and whether a property is considered “sensitive”, meaning that its value will be encrypted. Before entering a value in a sensitive property, ensure that the nifi.properties file has an entry for the property nifi.sensitive.props.key.

Name Default Value Allowable Values Description
OID The OID to request
Textual OID The textual OID to request
SNMP strategy (GET/WALK) GET * GET
* WALK
SNMP strategy to use (SNMP Get or SNMP Walk)
Host Name localhost Network address of SNMP Agent (e.g., localhost)
Port 161 Numeric value identifying Port of SNMP Agent (e.g., 161)
SNMP Version SNMPv1 * SNMPv1
* SNMPv2c
* SNMPv3
SNMP Version to use
SNMP Community (v1 & v2c) public SNMP Community to use (e.g., public)
SNMP Security Level authPriv *noAuthNoPriv
* authNoPriv
* authPriv
SNMP Security Level to use
SNMP Security name / user name Security name used for SNMP exchanges
SNMP Authentication Protocol * MD5
* SHA
SNMP Authentication Protocol to use
SNMP Authentication pass phrase Pass phrase used for SNMP authentication protocol
Sensitive Property: true
SNMP Private Protocol * DES
* 3DES
* AES128
* AES192
* AES256
SNMP Private Protocol to use
SNMP Private protocol pass phrase Pass phrase used for SNMP private protocol
Sensitive Property: true
Number of retries 0 Set the number of retries when requesting the SNMP Agent
Timeout(ms) 5000 Set the timeout (in milliseconds) when requesting the SNMP Agent

Relationships:

Name Description
success All FlowFiles that are received from the SNMP agent are routed to this relationship
failure All FlowFiles that cannot received from the SNMP agent are routed to this relationship

Reads Attributes:

None specified.

Writes Attributes:

None specified.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Summary:

This processor polls a SNMP agent to get information for a given OID (Strategy = GET) or for all the sub-tree associated to a given OID (Strategy = WALK). This processors supports SNMPv1, SNMPv2c and SNMPv3. The component is based on SNMP4J.

When the processor is triggered, it sends the SNMP request and gets the information associated to request OID(s). Once response is received from the SNMP agent, a FlowFile is constructed. The FlowFile content is empty, all the information is written in the FlowFile attributes. In case of a single GET request, the properties associated to the received PDU are transferred into the FlowFile as attributes. In case of a WALK request, only the couples “OID/value” are transferred into the FlowFile as attributes. SNMP attributes names are prefixed with snmp$ prefix.

Regarding the attributes representing the couples “OID/value”, the attribute name has the following format:

*snmp$OID$SMI_Syntax_Value

where OID is the request OID, and SMI_Syntax_Value is the integer representing the type of the value associated to the OID. This value is provided to allow the SetSNMP processor setting values in the correct type.

SNMP Properties

In case of a single SNMP Get request, the following is the list of available standard SNMP properties which may come with the PDU: (“snmp$errorIndex”, “snmp$errorStatus”, “snmp$errorStatusText”, “snmp$nonRepeaters”, “snmp$requestID”, “snmp$type”)

Configuration Details

At the time of writing this document it only defines the essential configuration properties which are suitable for most cases. Other properties will be defined later as this component progresses. Configuring GetSNMP:

*Host - [REQUIRED] the name of the host where the SNMP agent is running. (default is localhost)
*Port - [REQUIRED] the port number on which the SNMP agent is listening. (default is 161)
*OID - [REQUIRED] the root OID to request.
*Version - [REQUIRED] the SNMP version to use (SNMPv1 [default], or SNMPv2c, or SNMPv3)
*Community - [REQUIRED if SNMPv1 or SNMPv2c] the SNMP community to use. (default is public)
*Security Level - [REQUIRED if SNMPv3] the security level to use. (default is authPriv)
*Security Name - [REQUIRED if SNMPv3] the security name (user name) to use.
*Authentication Protocol - [REQUIRED if SNMPv3 and authNoPriv or authPriv] the authentication protocol to use.
*Authentication Password - [REQUIRED if SNMPv3 and authNoPriv or authPriv] the authentication password to use.
*Private Protocol - [REQUIRED if SNMPv3 and authPriv] the private protocol to use.
*Private Password - [REQUIRED if SNMPv3 and authPriv] the private password to use.
*Retries - [REQUIRED] Sets the number of retries to be performed before a request is timed out. (default is 0)
*Timeout - [REQUIRED] Sets timeout in milliseconds before a confirmed request is resent or timed out. (default is 5000)