We have a java process whose "ps -ef" listing gives it a unique string of NewstrakSearch. That is what we attempt to match for, but Foglight AppMonitor agent never seems to find it when it is actually up and running because the string is too long
1. JMX monitoring - Foglight JMX agent can monitor a JDK 1.5.x or higher process and get information from its mbeans (JVM information and other mbeans that may be exposed).
More information can be found in these documents
http://communities.quest.com/docs/DOC-13156
http://communities.quest.com/docs/DOC-11781
2. Utility agents - App monitor to monitor the fact that the process is running, log filter to monitor a log file that may be
generate by this process.
More information about utility agents can be found here http://communities.quest.com/docs/DOC-7816
You are right that AppMonitor has problems with very long process string lines. The agent has a limited number of characters it can store in the database.
But here's a nifty trick: Near the beginning of the java startup line, add a descriptive term like "-Djvmname=MyWASapp", then tell AppMonitor to look for that JVM name string. The extra "-D" will not affect your app in any way, but the tag will let you identify and track this process with AppMonitor.
3. Depending on how much memory is allocated to that Java process you may be able to instrument it with our Java agent running as an X agent (Generic flag), that is doing generic monitoring that gives you JVM information as well as request time information. If you choose the JMX agent option you will probably have to exclude some classes as there are probably methods that are called thousands of time and instrumenting them add overhead.
You can follow the configuration that is demonstrated in this answer http://communities.quest.com/message/37652#37652