To solve the problem, I have tried to study the plugin code for discovering the Process via PIQL. In the ProcessDiscovery, discovering mechanism is done for pid option alone. I dont find any code for PIQL option. Please forgive If I have said anything wrong. As per my knowledge I am saying this, I dont know whether the call is from any remote function. Please help me solve this problem.
You may have more than one JVM running on your system. Look at your agent logs, you'll see something like:
java.lang.Exception: process query [process|basename|match=(?i)^java.*] did not return a single process
RHQ cannot pickup a random resource if your PIQL query returns multiple processes.
You are correct. In my agent, there are multiple process. Thanks for your guidance.