1 Reply Latest reply on Apr 19, 2005 1:15 PM by dimitris

    Where I can get more info about Exposing MBean Events via SN

    mikek753

      Hello all,

      I use JBoss 4.0.0. And snmp-adaptor.sar in my deploy folder.
      In trap viewer I can see just one trap type "coldstart", but I don't see "heartbeat" - I didn't get any "heartbeat".

      I have / read jboss4guide/html/ch2.chapter.html#ch2.trap.fig , but that isn't enough for me.
      Where I can get more info about how to code "notifications.xml"?

      Any Example how to expose MyMBean notifications via SNMP would be great.

      In my MBean code I send notification as:

      long now = System.currentTimeMillis();
      AttributeChangeNotification stateChange = new AttributeChangeNotification(
      this, getNextNotificationSequenceNumber(), now, getName()
      + " initializing", "State", "java.lang.Integer",
      new Integer(STARTED), new Integer(mBeanState));
      sendNotification(stateChange);

      What I have to add into notifications.xml to send the SNMP trap for that notification?
      What I'm missing that heartbeat doesn't send any traps?

      There is notifications.xml I use:

      <notification-map-list>


      <notification-type>heartbeat</notification-type>
      3
      0
      1.2.3.4.5.6.7
      <var-bind-list wrapper-class="org.jboss.jmx.adaptor.snmp.agent.NotificationWrapperSupport">
      <var-bind>
      a:uptime
      1.2.3.4.5.6.7.5
      </var-bind>
      <var-bind>
      a:trapCount
      1.2.3.4.5.6.7.6
      </var-bind>
      <var-bind>
      n:message
      1.2.3.4.5.6.7.7
      </var-bind>
      <var-bind>
      n:sequenceNumber
      1.2.3.4.5.6.7.8
      </var-bind>
      </var-bind-list>



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


      </notification-map-list>


      Thanks a lot