Installing Resource Monitoring agents on remote hosts
You must install the Resource Monitoring agents on the target host for which you want to monitor the performance statistics. You need to run the agents to establish a connection with the Resource Monitoring service.
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.
- The Docker agent must have been launched in a Docker container and requires Docker 19.03.
About this task
This task applies to Java and Docker agents. However, the commands used to install agents are different from Java and Docker agents. You can find the commands and instructions in HCL OneTest™ Server in the Resource Monitoring agents page.
Before you start the Docker agents, you must build a Docker image.Procedure
- Click Set up Agents to extend Resource Monitoring service link in HCL OneTest™ Server to access the agents page where you can find the instructions and commands that are to be used to install and run the agents.
-
Expand Configure the Java agent and click
Download jar file to download the Java agent, or
expand Configure the Docker agent and click
Download Docker file to download a Docker
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 or docker file name.
curl -O -J https://hostName/rm/Agent-jar wget --content-disposition https://hostName/rm/Agent-jar
-
Copy the build command that is under Build the Docker
image, paste it in your console and run it to build a Resource
Monitoring Docker image.
docker build --network=host --rm -t rmagent
Note: This step applies to Docker agents only. -
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 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>