GetSNMP 2.0.0

Bundle
org.apache.nifi | nifi-snmp-nar
Description
Retrieves information from SNMP Agent with SNMP Get request and outputs a FlowFile with information in attributes and without any content
Tags
get, oid, snmp, walk
Input Requirement
ALLOWED
Supports Sensitive Dynamic Properties
false
  • Additional Details for GetSNMP 2.0.0

    GetSNMP

    Summary

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

    The processor can compile the SNMP Get PDU from the attributes of an input flowfile (multiple OIDs can be specified) or from a single OID specified in the processor property. In the former case, the processor will only consider the OIDs specified in the flowfile. The processor is looking for attributes prefixed with _ snmp$_. If such an attribute is found, the attribute name is split using the $ character. The second element must respect the OID format to be considered as a valid OID. The flowfile attribute value can be empty (it will be later filled with the retrieved value and written into the outgoing flowfile). 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”)

Properties
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.
Writes Attributes
Name Description
snmp$<OID> Response variable binding: OID (e.g. 1.3.6.1.4.1.343) and its value.
snmp$errorIndex Denotes the variable binding in which the error occured.
snmp$errorStatus The snmp4j error status of the PDU.
snmp$errorStatusText The description of error status.
snmp$nonRepeaters The number of non repeater variable bindings in a GETBULK PDU (currently not supported).
snmp$requestID The request ID associated with the PDU.
snmp$type The snmp4j numeric representation of the type of the PDU.
snmp$typeString The name of the PDU type.
snmp$textualOid This attribute will exist if and only if the strategy is GET and will be equal to the value given in Textual Oid property.