3 Replies Latest reply on Apr 27, 2007 10:36 AM by Heiko Rupp

    SNMP adapter issue

    Octavian Pop Newbie

      Hi,

      I have one problem regarding the SNMP Adapter from JBoss (v4.0.5).
      I changed in
      JBOSS_HOME\server\default\deploy\snmp-adaptor.sar\META-INF\jboss-service.xml
      the readCommunity and writeCommunity attribute values for
      SnmpAgentService mbean and the heartbeat traps still have the default
      values ("public"/"private"). Is this a bug, or I have to do some other
      changes?
      Below is the content of jboss-service.xml, so you can take a closer look.

      Thanks in advance for your reply.

      Best regards,
      Octavian Pop.




      <!-- A simple trap receiver that acts as an SNMP Manager -->


      1162
      ssss
      aaaaa



      <!-- The SNMP adaptor MBean -->


      org.jboss.jmx.adaptor.snmp.agent.RequestHandlerImpl
      /attributes.xml
      org.jboss.jmx.adaptor.snmp.agent.TrapFactorySupport
      /notifications.xml
      /managers.xml
      10
      1162
      false
      ssss
      aaaaa


      <subscription-list>
      <!-- Monitor events from SNMP adaptor itself -->



      <!-- Monitor timer for heartbeat events -->


      ssss
      aaaaa


      <!-- Valid JMX ObjectName patterns may be used as well, for example


      will subscribe to all matching mbeans for all notification types
      notification types can be used for simple prefix matching, e.g.


      matches both JMX.mbean.registered and JMX.mbean.unregistered -->

      </subscription-list>


      <depends optional-attribute-name="TimerName">




      <!-- Defines the system information as specified in rfc-1213
      iso.org.dod.internet.mgmt.mib-2.system.* -->


      In The Matrix
      Central Computer
      Agent Smith
      <!-- attribute name="SysName"> set internally to serverConfig@hostAddress-->
      <depends optional-attribute-name="SnmpAgent">
      jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor



      <!-- Used for internal testing - ignore

      -->

        • 1. Re: SNMP adapter issue
          Dimitris Andreadis Master

          AFAIR, the public/private community strings make only sense for snmp get/set.

          Or else, what you want to do?

          • 2. Re: SNMP adapter issue
            Octavian Pop Newbie

            Hi,
            I want to set the community string for SNMP traps.

            The commnuity value for the traps I receive, using KIWI, is "public", this is a default value as far as I know. I want to change the community string to another value changing the readCommunity or writeCommunity from jboss-service.xml.

            The only attributes I found in jboss-sevice.xml related to community are readCommunity and writeCommunity.

            Is this right, or these two attributes are refering to something else?

            If I am wrong, can you give me a hint how can I set the community string for traps?

            Below is the jboss-service.xml i am using.

            Best regards.

            <service>
            
             <!-- A simple trap receiver that acts as an SNMP Manager -->
             <mbean code="org.jboss.jmx.adaptor.snmp.trapd.TrapdService"
             name="jboss.jmx:name=SnmpAgent,service=trapd,type=logger">
            
             <attribute name="Port">1162</attribute>
             <attribute name="WriteCommunity">ssss</attribute>
             <attribute name="ReadCommunity">aaaaa</attribute>
            
             </mbean>
            
             <!-- 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.RequestHandlerImpl</attribute>
             <attribute name="RequestHandlerResName">/attributes.xml</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">10</attribute>
             <attribute name="Port">1162</attribute>
             <attribute name="DynamicSubscriptions">false</attribute>
             <attribute name="WriteCommunity">ssss</attribute>
             <attribute name="ReadCommunity">aaaaa</attribute>
            
             <attribute name="SubscriptionList">
             <subscription-list>
             <!-- Monitor events from SNMP adaptor itself -->
             <mbean name="jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor">
             <notification type="jboss.snmp.agent.coldstart"/>
             </mbean>
             <!-- Monitor timer for heartbeat events -->
             <mbean name="jboss.jmx:name=SnmpAgent,service=timer,type=heartbeat">
             <notification type="jboss.snmp.agent.heartbeat"/>
             <attribute name="WriteCommunity">ssss</attribute>
             <attribute name="ReadCommunity">aaaaa</attribute>
             </mbean>
            
             <!-- Valid JMX ObjectName patterns may be used as well, for example
             <mbean name="*:service=invoker,*">
            
             will subscribe to all matching mbeans for all notification types
             notification types can be used for simple prefix matching, e.g.
             <notification type="JMX.mbean">
            
             matches both JMX.mbean.registered and JMX.mbean.unregistered -->
            
             </subscription-list>
             </attribute>
            
             <depends optional-attribute-name="TimerName">
             <mbean code="javax.management.timer.Timer"
             name="jboss.jmx:name=SnmpAgent,service=timer,type=heartbeat"/>
             </depends>
             </mbean>
            
             <!-- Defines the system information as specified in rfc-1213
             iso.org.dod.internet.mgmt.mib-2.system.* -->
             <mbean code="org.jboss.jmx.adaptor.snmp.system.MIB2SystemGroupService"
             name="jboss.jmx:name=SnmpAgent,service=MIB2SystemGroup">
            
             <attribute name="SysLocation">In The Matrix</attribute>
             <attribute name="SysDescr">Central Computer</attribute>
             <attribute name="SysContact">Agent Smith</attribute>
             <!-- attribute name="SysName"></attribute> set internally to serverConfig@hostAddress-->
             <depends optional-attribute-name="SnmpAgent">
             jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor
             </depends>
             </mbean>
            
             <!-- Used for internal testing - ignore
             <mbean code="org.jboss.jmx.adaptor.snmp.test.NotificationProducerService"
             name="jboss.jmx:name=SnmpAgent,service=notification,type=producer"/>
             -->
            </service>
            


            • 3. Re: SNMP adapter issue
              Heiko Rupp Master

              readCommunity and writeCommunity are afair for get/set only.

              I can't currently tell if the Manager accepts a community, but I don't think so.
              You might want to open a JIRA for this.