3 Replies Latest reply: Feb 26, 2013 3:16 PM by Guinea RSS

    Access ServiceMix MBeans for Metric Extenstions

      Trying a new method for monitoring ActiveMQ (ServiceMix) within OEM 12c ( I have a custom built plugin that monitors specific aspects of a ServiceMix instance but would like the ability to create custom metrics based on the MBeans within ActiveMQ. When setting up the ME (Metric Extension), it asks for an MBean Pattern (ObjectName etc) to access the specific MBean and the corresponding Attributes, in order to set up the metrics. I can't seem to access the MBean. Does anyone know how to access the Mbeans for ActiveMQ to setup Metric Extensions for OEM 12c? What is the syntax for the MBean Pattern it is looking for and how do I point it at that location, to load the appropriate MBean attributes?
        • 1. Re: Access ServiceMix MBeans for Metric Extenstions
          There are different styles of mbeans that will result in a different type of pattern necessary to access it. Since we're talking about a 3rd party customer mbean, it's hard to predict what the pattern to locate it might be.

          The easiest way to locate that mbeans pattern may be to use an mbean browser in a development environment to find the mbean and get its pattern. If you are using a JRF enabled domain, there is an mbean browser built into the Fusion Middleware Control. If not, you can try using and external mbean browser like jconsole or wlshell in order to locate the mbean.
          • 2. Re: Access ServiceMix MBeans for Metric Extenstions
            Maybe there is a more logical way to monitor an ActiveMQ instance on a server. Something within OEM that will just select the ActiveMQ instance as a target and from there, it will have a JMX connection to the MBeanServer. Anyone familiar with this?
            • 3. Re: Access ServiceMix MBeans for Metric Extenstions
              So I think I see the issue. The plugin we are using allows us to set up a custom Target Type of ServiceMix. With this, we give it a name and then a JMX Hostname, which ends up being the hostname of the server the ActiveMQ instance is running. The ServiceURL the plugin uses is service:jmx:rmi:///jndi/rmi://%jmx_hostName%:1099/karaf-root. The jmx_hostName is fed from that user input, I am assuming. Well when I try to run the Metric Extension against a serviceMix target, it says:

              Failed to get test Metric Extension metric result.: cannot communicate with Target: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ConfigurationException [Root exception is java.rmi.UnknownHostException: Unknown host: %jmx_hostName%; nested exception is:
                   java.net.UnknownHostException: %jmx_hostName%]

              It looks like because the Metric Extension is a generic setup, even though I am passing it a ServiceMix target, the JMX hostname is not being set and is sitting as the variable. Which means we can't access the MbeanServer because it doesn't know which JMX Hostname is. Just some assumptions...would love some feedback... maybe a better way to monitor ActiveMQ, by adding a type of target in OEM, selecting the activemq instance and then being able to access the MBeans of THAT target through Metric Extensions.