SNMP

SNMP

This Datastream module enable to register the datastreams of SNMP Hardware module.

This datastreams corresponds to the inputs/outputs obtained through snmp protocol.

To access source code click here.

Dependencies

This module requires the following modules:

  • SNMP Hardware: Provide an implementation of SNMP that the datastream module need to connect to devices and collect the information of each datastream.
  • Commons: Provide the SNMP APIs, exceptions and types and the basic APIs to register the service.

Configuration

To configure SNMP Datastream module, a file named es.amplia.oda.datastreams.snmp.cfg must be created with the next parameters for each OID that you want to register:

  • oid: Required parameter. OID of the variable in device MIB.

  • deviceId: Required parameter. The device identifier name that stores the OID. It also indicates the data needed to connect with device (defined in snmp hardware configuration file).

  • dataType: Required parameter. Type of the data stored in the OID.

    Possible values:

    • OID
    • INTEGER
    • STRING
    • GAUGE
    • COUNTER32
    • COUNTER64
    • TIMETICK
    • OPAQUE
    • IP
  • datastreamId: Required parameter. The identifier name of the datastream.

  • feed: null if not present. Feed to associate to the datastreamId.

  • eventPublishType: Optional parameter. Indicates how we want to publish the events snmp received (traps).

    It can take two values:

    • dispatcher - events will be publish immediatelly as soon as it is received.
    • statemanager - events will be passed to the state manager (rules can be applied) and will be published as other events (through collector and dispatcher).

    Default value is dispatcher.

es.amplia.oda.datastreams.snmp.cfg will have a similar format to:

1.3.6.1.2.1.1.4.0,testOda=dataType:Integer,datastream:textSnmp,feed:snmp,eventPublishType:dispatcher
1.3.6.1.2.1.1.5.0,testOda2=dataType:String,datastream:textSnmp2,feed:snmp2,eventPublishType:statemanager