[SNMP4J] Mapping JMX notification To SNMP trap

Frank Fock fock at agentpp.com
Sun Apr 5 23:44:52 CEST 2009


Hi,

Have you studied the JvmManagementMibInst.java example
already?

When using the SNMP4J-AgentJMX framework, you do not
need to call the NotificationOriginator directly.

Without knowing your notification type MIB specification
and not knowing the MBean definition, I cannot help
you defining the JMXNotificationIndexSupport.

As the JavaDoc of JMXNotificationIndexSupport reads,
you need to map a JMX notification data object to
an instance OID suffix for SNMP. That mapping is
performed by such an object.

Best regards,
Frank

wafae alami wrote:
> hi ,
> 
> I want to make a mapping between between JMX notifications received from an
> MbeanServer to SNMP trap to send to snmp manager .
> In my class I have added a listener to those notifications , but when
> received I have the following message :
> 
>  27 mars 2009 16:14:31 org.snmp4j.log.JavaLogAdapter log
> INFO: No PDU handler found for request
> CommandResponderEvent[transportMapping=org.snmp4j.transport.DefaultUdpTransportMapping at 139422bpeerAddress
> =155.132.215.56/38530, processed=true, pdu=[TRAP[requestID=172,
> errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.2.1.1.3.0 = 2:08:50.86;
> 1.3.6.1.6.3.1.1.4.1.0 = 1.3.6.1.4.1.637.71.6.1.2; 1.3.6.1.4.1.637.71.6.6.1.0
> = 411 days, 19:13:42.12; 1.3.6.1.4.1.637.71.6.6.2.0 = 16;
> 1.3.6.1.4.1.637.71.6.6.3.0 = 0; 1.3.6.1.4.1.637.71.6.6.4.0 = Restarting
> failed autoStart instance; 1.3.6.1.4.1.637.71.6.6.5.0 = mcad7p38;
> 1.3.6.1.4.1.637.71.6.6.6.0 = MySqlCluster__mysql_mcad7p38;
> 1.3.6.1.4.1.637.71.6.6.7.0 = MySql; 1.3.6.1.4.1.637.71.6.6.8.0 = 6;
> 1.3.6.1.4.1.2162.10.3.1.3.3 = 2009/03/27 16:14:25: Code 16 (Notif) Comp =
> 'MySql', Inst = 'MySqlCluster__mysql_mcad7p38', on host mcad7p38: Restarting
> failed autoStart instance]]], securityName=public, securityModel=2,
> securityLevel=1]
> 
> 
> 1-  I have created the method :
> 
> 
>        public void alarmsEventsNotif(NotificationOriginator
> notificationOriginator,
>                                            OctetString context,
>                                            VariableBinding[] vbs) {
> 
>          notificationOriginator.notify(context, oidAlarmEventsNotif, vbs);
>        }
> 
>   and add a  listener to my notification , but I don't know how and where
> call alarmsEventsNotif method to notify the  notificationOriginator ?
> 
> 2- my notification source is associated to a scalar mbean while the
> 
>     notificationSupport.add(oid , new MbeanNotificationInfo(
> MBeanNotificationObjectInfo[] ,JMXNotificationIndexSupport );
> 
> require an JMXNotificationIndexSupport  instance ??  what should I use for
> this case ?
> 
> 
> Thanks in advance .
> 
> Ouafae .
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list