|
Configurations to be performed to monitor the Java Transactions
The following configurations have to be performed before attempting to monitor the Java Transactions using the eG JTM Monitor:
- In the <EG_INSTALL_DIR>\lib directory (on Windows; on Unix, this will be /opt/egurkha/lib) of the eG agent, you will find the following files:
- eg_jtm.jar
- aspectjrt.jar
- aspectjweaver.jar
- jtmConn.props
- jtmLogging.props
- jtmOther.props
- Login to the system hosting the Java application to be monitored.
- If the eG agent will be ‘remotely monitoring’ the target Java application (i.e., if the Java application is to be monitored in an ‘agentless manner’), then, copy all the files mentioned above from the <EG_INSTALL_DIR>\lib directory (on Windows; on Unix, this will be /opt/egurkha/lib) of the eG agent to any location on the Java application host.
- Then, proceed to edit the start-up script of the Java application being monitored, and append the following lines to it:
set JTM_HOME=<<PATH OF THE LOCAL FOLDER CONTAINING THE JAR FILES AND PROPERTY FILES LISTED ABOVE>>
“-javaagent:%JTM_HOME%\aspectjweaver.jar”
“-DEG_JTM_HOME=%JTM_HOME%”
Note that the above lines will change based on the operating system and the web/web application server being monitored.
Then, add the eg_jtm.jar, aspectjrt.jar, and aspectjweaver.jar files to the CLASSPATH of the Java application being monitored.
Finally, save the file. Once this is done, then, the next time the Java application starts, the eG JTM Monitor scans the web requests to the application for configured URL patterns. When a match is found, the eG JTM Monitor collects the desired metrics and stores them in memory.
Then, every time the eG agent runs the Java Transactions test, the agent will poll the eG JTM Monitor (on the target application) for the required metrics, extract the same from the application's memory, and report them to the eG manager.
- Next, edit the jtmConn.props file. You will find the following lines in the file:
#Contains the connection properties of eGurkha Java Transaction Monitor
JTM_Port=13631
Designated_Agent=
By default, the JTM_Port parameter is set to 13631. If the Java application being monitored listens on a different JTM port, then specify the same here. In this case, when managing a Java Application using the eG administrative interface, specify the JTM_Port that you set in the jtmConn.props file as the Port of the Java application.
Also, against the Designated_Agent parameter, specify the IP address of the eG agent which will poll the eG JTM Monitor for metrics. If no IP address is provided here, then the eG JTM Monitor will treat the host from which the very first ‘measure request’ comes in as the Designated_Agent.
Note:
In case a specific Designated_Agent is not provided, and the eG JTM Monitor treats the host from which the very first ‘measure request’ comes in as the Designated_Agent, then if such a Designated_Agent is stopped or uninstalled for any reason, the eG JTM Monitor will wait for a maximum of 10 measure periods for that ‘deemed’ Designated_Agent to request for metrics. If no requests come in for 10 consecutive measure periods, then the eG JTM Monitor will begin responding to ‘measure requests’ coming in from any other eG agent.
- Finally, save the jtmConn.props file.
Now you may proceed to configure the Java Transactions test and obtain the desired measures.
|