Version 4

    Configuring snmp-adaptor notifications.xml file

     

    The notifications.xml file follows the XML Schema defined in

    Notification.xsd

     

    This configuration file is used to specify how the intercepted JMX Notifications

    to which the snmp adaptor subscribes to, will be mapped to SNMP traps.

    The mapping is driven by matching the notification type of the notification,

    as shown in the example below:

      <mapping>
        <notification-type>jboss.snmp.agent.coldstart</notification-type>
        <generic>0</generic>
        <specific>0</specific>
        <enterprise>1.2.3.4.5.6.7</enterprise>
        <var-bind-list wrapper-class="org.jboss.jmx.adaptor.snmp.agent.NotificationWrapperSupport">
          <var-bind>
            <tag>a:startTime</tag>
            <oid>1.2.3.4.5.6.7.9</oid>
          </var-bind>
          <var-bind>
            <tag>a:trapCount</tag>
            <oid>1.2.3.4.5.6.7.6</oid>
          </var-bind>
        </var-bind-list>               
      </mapping>
      ...
    </notification-map-list>
    

    The example entry matches the type jboss.snmp.agent.coldstart of a

    notification that is emitted by the snmp adaptor itself upon startup. The tags

    generic and specific should be used to set the generic and specific

    trap ids of the generated trap. The enterprise tag represents the OID

    of the entity that is supposed to be emitting the trap.

     

    The generated trap may contain an arbitrary payload of variable bindings

    with explicitly specified oids (defined using the element) and values

    extracted from the emitted notification. To extract those values a wrapper class

    implementing the org.jboss.jmx.adaptor.snmp.agent.NotificationWrapper

    interface must be supplied. At runtime, the value specified using the

    element is passed to the wrapper class implementation as the key

    to be mapped, in an implementation specific way, to a corresponding value.

     

    A default implementation of this interface comes with class org.jboss.jmx.adaptor.snmp.agent.NotificationWrapperSupport.

    This implementation recognizes the following set of tags:

     

    Tag

    Description

    n:message

    n.getMessage()

    n:sequenceNumber

    n.getSequenceNumber()

    n:timeStamp

    n.getSequenceNumber()

    n:type

    n.getType()

    n:all

    n.toString()

    n:class

    n.getClass().getName()

    a:startTime

    snmp agent/adaptor start time

    a:uptime

    snmp agent/adaptor up time

    a:trapCount

    snmp agent/adaptor trap count

    any-other-tag

    looked-up in n.getUserData() if it's a HashMap

     

    Referenced by: