7 Replies Latest reply on Jan 9, 2006 1:04 AM by karanuk

    Jboss->snmp-adaptor->snmptrapd->snmptt configuration issue

    karanuk

      Hello,
      I needed to investigate jmx-notifications -> snmp traps -> nagios(1.3) ->alert process.Got the the snmp-adaptor.sar configured as
      jboss-service.xml
      -----------------------------------------------------------
      <?xml version="1.0" encoding="UTF-8"?>


      org.jboss.jmx.adaptor.snmp.agent.RequestHandlerSupport
      org.jboss.jmx.adaptor.snmp.agent.TrapFactorySupport
      /notifications.xml
      /managers.xml
      0
      1161
      false

      <subscription-list>
      <mbean name="jboss.jmx:name=HelloWorld,service=test,type=testBroadcaster"/>
      </subscription-list>


      -----------------------------------------------------------
      manager.xml
      __________________________________________

      172.19.22.250
      162
      <local-address></local-address>
      <local-port></local-port>
      1

      __________________________________________
      and notifications.xml as
      ------------------------------------------------------

      <notification-type>com.acme.jmx-smnp.test</notification-type>
      0
      0
      .1.3.6.1.4.1.2162.500.1.1
      <var-bind-list wrapper-class="org.jboss.jmx.adaptor.snmp.agent.NotificationWrapperSupport">
      <var-bind>
      n:message
      .1.3.6.1.4.1.2162.500.1.1.1
      </var-bind>
      </var-bind-list>

      ------------------------------------------------------
      where com.acme.jmx-smnp.test is the notification-type emitted by mbean jboss.jmx:name=HelloWorld,service=test,type=testBroadcaster.
      The case happening being that with a configured snmptrapd+snmptt combination the above trap is gettig accepted as "coldStart" trap and the notification type "com.acme.jmx-smnp.test" accepted as "coldStart" trap variable.
      If someone faced such issue previously or if i'm making here some configurations mistake,do let me know.

      thanx in advance,
      karanuk

        • 1. Re: Jboss->snmp-adaptor->snmptrapd->snmptt configuration iss
          dimitris

          When you post your configuration/descriptors in the forums, wrap them using:

          [ code ]

          [ /code ]

          (without the spaces)

          • 2. Re: Jboss->snmp-adaptor->snmptrapd->snmptt configuration iss
            karanuk

            The conf xml tags seems to have got dropped.The descriptors r as bellow.

            jboss-service.xml
            -------------------------------------------------------------------------
            <service>
             <!-- The SNMP adaptor MBean -->
             <mbean code="org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService"
             name="jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor">
             <attribute name="RequestHandlerClassName">org.jboss.jmx.adaptor.snmp.agent.RequestHandlerSupport</attribute>
             <attribute name="TrapFactoryClassName">org.jboss.jmx.adaptor.snmp.agent.TrapFactorySupport</attribute>
             <attribute name="NotificationMapResName">/notifications.xml</attribute>
             <attribute name="ManagersResName">/managers.xml</attribute>
             <attribute name="HeartBeatPeriod">0</attribute>
             <attribute name="Port">1161</attribute>
             <attribute name="DynamicSubscriptions">false</attribute>
             <attribute name="SubscriptionList">
             <subscription-list>
             <mbean name="jboss.jmx:name=HelloWorld,service=test,type=testBroadcaster"/>
             </subscription-list>
             </attribute>
             </mbean>
            </service>
            --------------------------------------------------------------------------
            notifications.xml
            --------------------------------------------------------------------------
            <notification-map-list>
            <mapping>
             <notification-type>com.acme.jmx-smnp.test</notification-type>
             <generic>0</generic>
             <specific>0</specific>
             <enterprise> .1.3.6.1.4.1.2162.500.1.1</enterprise>
             <var-bind-list wrapper-class="org.jboss.jmx.adaptor.snmp.agent.NotificationWrapperSupport">
             <var-bind>
             <tag>n:message</tag>
             <oid>.1.3.6.1.4.1.2162.500.1.1.2</oid>
             </var-bind>
             </var-bind-list>
             </mapping>
            </notification-map-list>
            --------------------------------------------------------------------------
            managers.xml
            --------------------------------------------------------------------------
            <manager-list>
            <manager>
             <address>172.19.22.250</address>
             <port>162</port>
             <local-address></local-address>
             <local-port></local-port>
             <version>1</version>
             </manager>
            </manager-list>
            --------------------------------------------------------------------------
            


            looking forward for your thoughts,
            KaranUK

            • 3. Re: Jboss->snmp-adaptor->snmptrapd->snmptt configuration iss
              karanuk

              Hi,
              Was just debugging and found that the generic and specific tags in the notifications.xml are overriding the enterprise OID and so the coldStart trap's being sent.

              notification-map-list>
              <mapping>
               <notification-type>com.acme.jmx-smnp.test</notification-type>
               <generic>0</generic>
               <specific>0</specific>
               <enterprise> .1.3.6.1.4.1.2162.500.1.1</enterprise>
               <!--etc-->
               </mapping>
              </notification-map-list>
              

              The only document describing notifications.xml seems to be http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossSNMPAdapterNotifications and as such does not detail the role of generic and specific tags.If someone knows the set of values that can be passed to these tags and their significance,plz do let us know.

              looking forward for ur reply,
              karanUk.

              • 4. Re: Jboss->snmp-adaptor->snmptrapd->snmptt configuration iss
                dimitris

                Generic needs to be set to "6", meaning "enterpriseSpecific". "0" is essentially "coldStart".

                see

                http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094aa5.shtml

                • 5. Re: Jboss->snmp-adaptor->snmptrapd->snmptt configuration iss
                  karanuk

                  Thanks Dimitris :)
                  That resolved the case.

                  regards,
                  nKaranUk

                  • 6. Re: Jboss->snmp-adaptor->snmptrapd->snmptt configuration iss
                    dimitris

                    It'd be nice if you can post, for the benefit of all, a sort description of how you are using the snmp adaptor with nagios. Thanks.

                    • 7. Re: Jboss->snmp-adaptor->snmptrapd->snmptt configuration iss
                      karanuk

                      With snmp-adaptor.sar set up to send traps,Nagios could be configured as per details in links below.

                      http://www.nagios.org/faqs/viewfaq.php?faq_id=29
                      http://www.samag.com/documents/s=9559/sam0503g/

                      karanuk