Skip to main content

Java Agent

There are two ways to deploy Java Agent:

Using Docker Images#

If you use docker images of app you need to share volume with drill agent files and add JAVA parameters. Try using this example:

version: '3'
services:
example-app:
image: repo/example-app:0.1.0
ports:
- 8080:8080
volumes:
- agent-files:/data
environment:
- JAVA_TOOL_OPTIONS="-agentpath:/data/libdrill_agent.so=drillInstallationDir=/data,adminAddress=host.docker.internal:8090,agentId=ExampleAgentId,buildVersion=0.1.0,logLevel=INFO"
agent-files:
image: drill4j/java-agent:0.7.0
volumes:
- agent-files:/java-agent
volumes:
agent-files:

agent-files — container with drill agent files.
adminAddress — host and backend port of your drill admin.
8090 — default port for agent connection.
agentId — ID for drill agent of application.
buildVersion — build version of your application.

Using Jar#

If you use a .jar for running you can download the archive with the agent distribution for your OS: Java Agent and start an application with the following parameters (example for Windows):

-agentpath:distr/drill_agent.dll=drillInstallationDir=distr,adminAddress=localhost:8090,agentId=ExampleAgent,buildVersion=0.1.0,logLevel=INFO

distr — folder with drill agent files.
Use .dll for Windows .so for Linux and .dylib agent file for MacOS.
adminAdress — host and backend port of your drill admin.
agentId — ID for drill agent of application.
buildVersion — build version of your application.