Hello everybody,
I am using hyperic-HQ version 4.6.6.
I just started trying to get hyperic working at my place of business and am having issues with JMX/MBean autodiscovery. Our environement has java processes that run and have @ManagedResource / @ManagedOperation annotated spring beans for some of our methods and the like. After starting up my hq-agent on the deployed VM that is running these processes I See:
serverName - Solaris 10 | modified | server set changed | ||
serverName | NTP 4.x | /usr/lib/inet/xntpd | new | N/A |
serverName | Sendmail 8.x | /usr/sbin/sendmail | new | N/A |
serverName | HQ Agent 4.6.6 | /export/home/deploy/hyperic-hq-agent-4.6.6 | new | N/A |
in the autodiscovery section (where sever name is our actual server name). When I add this to my inventory, I see the following resources:
CPU, File Server, Network Server, NFS Mount, sshd process.
Nothing having to do with java, java processes, JMX or MBeans.
I have been working off of this documentation:
http://support.hyperic.com/display/DOCS46/Java+Applications
According to that documentation:
If your applications expose MBeans using the Spring 3.0 JMX annotations (@ManagedResource, @ManagedMetric, @ManagedAttribute, @ManagedOperation), they should automatically be exported with the required descriptors.
What am I doing wrong for these to not show up? Is there a flag I need to set in one of the properties files to turn on java/mbean autodiscovery, or is there something else I need to be doing? JMX is configureed for the running processes by Spring (not directly with -Dsun.remote..... command line args).
There are no errors in my agent.log, and it shows this block for discovery:
Any help would be greatly appreciated, this is really the main use case we are trying to get this up and running for.
Also, just re-checked agent.log and found this guy:
org.hyperic.hq.agent.AgentRemoteException: Failed to unschedule metrics for entity 2:10002: No measurement schedule for: 2:10002
at org.hyperic.hq.measurement.agent.server.MeasurementCommandsService.unscheduleMeasurements(MeasurementCommandsService.java:433)
at org.hyperic.hq.measurement.agent.server.MeasurementCommandsServer.dispatchCommand(MeasurementCommandsServer.java:167)
at org.hyperic.hq.agent.server.CommandDispatcher.processRequest(CommandDispatcher.java:113)
at org.hyperic.hq.agent.server.CommandListener.handleConn(CommandListener.java:216)
at org.hyperic.hq.agent.server.CommandListener.access$100(CommandListener.java:57)
at org.hyperic.hq.agent.server.CommandListener$AgentDispatchTask.run(CommandListener.java:200)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Message was edited by: developer1 Fixed capatalization error
Hi,
I would not recommended modifying the existing plugin. What you need to do is click on on of your platforms, choose "New Server" from the drop-down menu and choose "Sun JVM 1.5". After you have created the server, you will have to go through the "Configuration Properties" page and configure JMX URL etc.
Cheers,
Mirko
Hi,
if I remember correctly the plugin is not enabled for autodiscovery per default. That means you would have to manually deploy the Java/JMX plugin and it should then autodiscover MBeans.
Cheers,
Mirko
Mirko Pluhar wrote:
Hi,
if I remember correctly the plugin is not enabled for autodiscovery per default. That means you would have to manually deploy the Java/JMX plugin and it should then autodiscover MBeans.
Cheers,
Mirko
Thank you for the response.
I am working on trying to do this but I am not sure how to verify that I am deploying the plugin.
In my agenthome/bundles/agent-4.6.6/pdk/plugins directory I have the file: jmx-plugin.xml with the contents attached.
I also have sun-jvm-service.xml which is attached just in case it matters. I was under the impression that if there was an xml descriptor for the plugin present in this directory then the plugin is installed.
When I run : java -jar /export/home/deploy/hyperic-hq-agent-4.6.6/bundles/agent-4.6.6/pdk/lib/hq-pdk-4.6.6.jar -m discover the only thing I see that relates to jmx and rmi is: I notice that I show port 6969 in this log. Is that the port for jmx that was found or is that the port that is configured? In my xml I set to port 12003 which is where the MBean server should be, but this information is showing 6969 with user system. Maybe I have the wrong config file?
In any case, the goal here is this. We have applicatiosn and we want to be able to call the @ManagedOperation methods and also see the @ManagedAttributes of those Resources. We should ideally not have to tell hyperic what ObjectNames to use, it should just scan and find them.
Do you see any glaring problems with my config?
Hi,
I would not recommended modifying the existing plugin. What you need to do is click on on of your platforms, choose "New Server" from the drop-down menu and choose "Sun JVM 1.5". After you have created the server, you will have to go through the "Configuration Properties" page and configure JMX URL etc.
Cheers,
Mirko