Installing and running a Java agent on a remote host
You must install the resource monitoring java agent on the target host for which you want to monitor the resources and collect the metrics. You need to run the agent to establish a connection with Rational® Test Automation Server.
Before you begin
- The resource monitoring service does not require access to the agent host but the agent must have reached the service host over HTTPS.
- The Java agent must have been launched from a jar file and requires a Java 8 virtual machine.
Procedure
- Click Set up Agents to extend Resource Monitoring service link in IBM® Rational® Test Automation Server to access the agents page where you can find the instructions and commands that you can use to install and run the agents.
-
Expand Configure the Java agent and click
Download jar file to download the Java agent.
You can also use the curl and wget commands to download the agent without accessing the resource monitoring web UI. For more facility, use the code snippets to copy and fill in the commands with the valid offline token and the jar file name.
For Windows:
curl -O -J https://hostName/rm/Agent-jar
For Linux:
wget --content-disposition https://hostName/rm/Agent-jar
-
Configure the command as follows to run your agent:
- Copy the appropriate command for Windows or Linux with the code snippets.
- Enter the path to the directory that contains the agent .jar file, and paste the command.
On Windows:set RTCP_OFFLINE_TOKEN=(Enter your offline token here) java -jar (Enter the name of the downloaded jar file here) --ServiceUrl=https://hostName/rm --projectId=<project_id>
On Linux:sudo RTCP_OFFLINE_TOKEN=(Enter your offline token here) java -jar (Enter the name of the downloaded jar file here) --ServiceUrl=portNumber/rm --projectId=<project_id>