[jboss-user] [Management, JMX/JBoss] - Re: SNMP adapter issue

Pop Octavian do-not-reply at jboss.com
Fri Apr 27 08:49:40 EDT 2007


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 at 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>
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041384#4041384

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041384



More information about the jboss-user mailing list