This content has been marked as final. Show 3 replies
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.
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:
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.