I've installed a stand alone HornetQ instance on a Linux server with an RHQ agent. The JON server has a HornetQ plugin and it is correctly delivered to the agent (I see it in the plugins list). When I try to call "discovery" on the agent, the process is detected as a JMX Server (see below).
JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=, name=[/[..]/bin/java], ppid=]
However, HornetQ is not added to the list of resources and I can't see it in the JON server. I couldn't really find anything about what to do when the server is not added to the agent...
The HornetQ JVM will only be discovered by the jmx plugin if you enable JMX Remoting or, in RHQ 4.3 or later only, add the -Dorg.rhq.resourceKey=FOO option to your JVM's command line. For more info, see: http://rhq-project.org/display/JOPR2/Generic+JVM+Product+Configuration However, this will discover a generic "JMX Server" Resource, which will not expose any HornetQ-specific metrics, operations, etc. The HornetQ-specific Resources can currently only be discovered and managed by RHQ when HornetQ is running inside an AS5/6 instance. This is because the hornetq plugin's rhq-plugin.xml defines the "JMS Manager" Resource type as follows:
<service name="JMS Manager" discovery="JMSManagerDiscoveryComponent" class="JMSManagerComponent" singleton="true"> <runs-inside> <parent-resource-type name="JBossAS Server" plugin="JBossAS5"/> </runs-inside>
So it will only get discovered as a child of a (AS5) "JBossAS Server" Resource. Standalone-mode HornetQ instances will *not* be discovered. The hornetq plugin is owned by the HornetQ team, not by the RHQ/JON team, so you would need to create an enhancement request in https://issues.jboss.org/browse/HORNETQ. Or, if you have an EAP Managed subscription, you can create a support case and request the enhancement, which will improve the chance of it getting implemented. Note, the new jboss-as-7 plugin has builtin support for discovering and manageing HornetQ deployed to AS7.
> So there is no means to monitor HornetQ in a meaningful way if it is used as a stand alone? That's kind of.... unusable.
Correct, discovery of standalone HornetQ servers is currently not implemented, though I don't think it would be that much work to implement. As I said, file a HORNETQ jira issue, or a support case if you're an EAP Managed customer.
> HornetQ seems to already be recognized as a JMX server (see first post) but it is not added to ther recources and I have no idea how to tell him to do that...
Enable JMX remoting on the command line you use to start the HornetQ JVM. Did you read http://rhq-project.org/display/JOPR2/Generic+JVM+Product+Configuration ? Refer to the standard Sun docs for how to enable JMX Remoting:
You'll probably want to disable password authentication and SSL.
I'm not sure why it's not being discovered by the jmx plugin as a JMX Server then. Can you run the following command from the RHQ Agent prompt and paste the results in to this thread: debug --enable discovery --plugin JMX --verbose Also paste in any relelvant messages that get written to the Agent log after those commands are executed.