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 of HCL DevOps Test Hub (Test Hub). You need to run the agent to establish a connection with Test Hub.
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 17 virtual machine.
- Read and been familiar with the requirements to install and configure the resource monitoring agents on Test Hub. See Resource monitoring agents.
Procedure
-
Click Set up Agents to extend Resource Monitoring
service link in Test Hub 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.
With curl:
curl -O -J https://hostName/rm/Agent-jar
With wget:
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.
To connect resource monitoring agents to Test Hub in a team space use the following commands:On Windows:set HCL_ONETEST_OFFLINE_TOKEN=(Enter your offline token here) java -jar (Enter the name of the downloaded jar file here) --ServiceUrl=https://hostName/rm --spaceId=<team-space_id>
On Linux:sudo HCL_ONETEST_OFFLINE_TOKEN=(Enter your offline token here) java -jar (Enter the name of the downloaded jar file here) --ServiceUrl=portNumber/rm --spaceId=<team-space_id>
To connect resource monitoring agents to Test Hub in a project use the following commands:On Windows:set HCL_ONETEST_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 HCL_ONETEST_OFFLINE_TOKEN=(Enter your offline token here) java -jar (Enter the name of the downloaded jar file here) --ServiceUrl=portNumber/rm --projectId=<project_id>
Results
