VMware Cloud Community
beamerblvd
Contributor
Contributor
Jump to solution

Apache and Glassfish Monitoring Questions

Hyperic HQ version 4.5.1.2 running on Windows Server 2008 R2.

I have two questions.

First: I have a SINGLE instance of Apache 2.2 installed in D:\Apache\Application on a machine monitored by Hyperic HQ. However, upon starting the Hyperic agent, it auto-discovered TWO instances of Apache, one with an install path of "D:\Apache\Application" and the other with an install path of "D:\Apache\Application\conf\httpd.conf." What's the deal here? Why does it see this as two instances? Is it safe to delete one of them from inventory? Which one (and how do I delete it from inventory)?

Second: I have two servers running clustered Glassfish 3.1.0. Server 1 has the Domain Application Server (DAS) running JMX on port 8686. Then, Server 1 and Server 2 each have two instances (total of four instances that all belong to the same cluster) running JMX on ports 28686 and 28687 on each machine. I installed and started Hyperic agents on both machines. Since the Glassfish plugin is included in this version of Hyperic, I expected it to auto-discover a total of five instances of Glassfish (including the DAS). However, it didn't detect any instances at all. Why wouldn't it discover them? They are for sure running. What do I do to add them to inventory without auto-discovery?

Thanks in advance for helping this first-timer get started.

Nick
0 Kudos
1 Solution

Accepted Solutions
excowboy
Virtuoso
Virtuoso
Jump to solution

Hi,

You are getting the following error message, because you have two Glassfish instances running and the PTQL query must be unique.

"The configuration has not been set for this resource due to : Invalid configuration: Error retrieving value: Failed to invoke getProcMem[State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot]: Query matched multiple processes (3): State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot"


Please have a look at the Configuration Properties page again and check the process.query parameter (I believe that is the correct identifier).

It probably contains "State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot"

Now you have to do some reading 😉 Check the following page and change the parameter above.
http://support.hyperic.com/display/SIGAR/PTQL#PTQL-IdentifyingaUniqueJavaProcess

Please let us know if you have any questions.

Cheers,
Mirko

View solution in original post

0 Kudos
8 Replies
admin
Immortal
Immortal
Jump to solution

On the Apache question, sometimes multiple plug-ins can discover the same resource. Browse Resources -> Servers, and select the Filter drop-down, you should see the two Apache Server Types listed for that Platform and you can delete one of them.

Glassfish should have been auto-discovered, this can have a number of causes, but you can manually add a resource that hasn't been auto-discovered:

http://support.hyperic.com/display/DOC/Auto-Discovery#Auto-Discovery-ManuallyAddingResourcesthatAreN...
beamerblvd
Contributor
Contributor
Jump to solution

Thanks for the help. I was able to delete the superfluous Apache HTTPD instances. However, I cannot get Hyperic to monitor Glassfish 3.1.

I can add the server (by the way, the only Glassfish option is "Glassfish 9.x," but the newest version of Glassfish is 3.1, the one I'm using; there is no Glassfish 9.x), but I can't configure the server.

I enter the Glassfish domain nome (prototype), the JMX url (service:jmx:rmi:///jndi/rmi://localhost:8686/jmxrmi) which is correct, the username and password, press Save, and get this error:

"The configuration has not been set for this resource due to : Invalid configuration: Error retrieving value: Failed to invoke getProcMem[State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot]: Query matched multiple processes (3): State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot"

I suspect this is because there are three instances of Glassfish running on that server. Am I still doing something wrong? Or does Hyperic not support monitoring multiple instances of Glassfish on the same server?
0 Kudos
beamerblvd
Contributor
Contributor
Jump to solution

Should I be using this instead of the Glassfish plugin that comes bundled with Hyperic?

http://support.hyperic.com/display/hypcomm/Sun+Glassfish+Enterprise+Server
0 Kudos
beamerblvd
Contributor
Contributor
Jump to solution

Does anybody else have any suggestions? I can't find any information or documentation for how to deal with multiple Glassfish instances on one machine (it handles multiple Tomcat instances just fine), and my free trial is about to expire.
0 Kudos
excowboy
Virtuoso
Virtuoso
Jump to solution

Hi,

You are getting the following error message, because you have two Glassfish instances running and the PTQL query must be unique.

"The configuration has not been set for this resource due to : Invalid configuration: Error retrieving value: Failed to invoke getProcMem[State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot]: Query matched multiple processes (3): State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot"


Please have a look at the Configuration Properties page again and check the process.query parameter (I believe that is the correct identifier).

It probably contains "State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot"

Now you have to do some reading 😉 Check the following page and change the parameter above.
http://support.hyperic.com/display/SIGAR/PTQL#PTQL-IdentifyingaUniqueJavaProcess

Please let us know if you have any questions.

Cheers,
Mirko
0 Kudos
beamerblvd
Contributor
Contributor
Jump to solution

Thank you, very much! This was exactly the information I needed to get up and running with Glassfish! All is working now. 🙂
0 Kudos
beamerblvd
Contributor
Contributor
Jump to solution

For other curious readers, I changed the PTQL query to search also for the instance names in the arguments ... this seemed to do the trick.

Instead of the default PTQL query of:

State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot

For my DAS instance I used:

State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot,Args.*.eq=server

For my server 1 instances 1 and 2 I used:

State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot,Args.*.eq=s01instance01
State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot,Args.*.eq=s01instance02

And for my server 2 instances 2 and 2 I used:

State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot,Args.*.eq=s02instance01
State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot,Args.*.eq=s02instance02
0 Kudos
evil_evo
Contributor
Contributor
Jump to solution

Hi There, can you please help me ... I am running 3 tomcat instance on windows server 2008, I ran into same issue (I can only monitor one instance at a time), while googling I saw your post can you please let me know how to configure the following line ...

State.Name.eq=java,Args.*.ct=com.sun.aas.instanceRoot,Args.*.eq=s01instance01

what should I be using for s01instance01 in my case? should it be the installation directory or the service name (I have used service name didnt work) . Please help thanks...
0 Kudos