Configure Auto-Attach

You can use additional configurations to auto-attach Java Agent to a specific Java service instead of the default one.

Before You Begin

You must have Smart Agent command line utility installed. See Smart Agent Command Line Utility.

Important: The Smart Agent CLI is deprecated and will reach End of Support on February 2, 2026. Until then, only critical security fixes and bug fixes will be provided and a release will be made as needed.

It is recommend to use Smartagentctl instead of Smart Agent Command Line Utility. See Install Smart Agent.

Configure Auto-Attach Using Smart Agent CLI

You can overwrite the default ld_preload.json to auto-attach Java Agent to a specific service. For more information about auto-attach feature, see Auto-Attach Java and NodeJS Agents.
Use the configure command on Smart Agent CLI to overwrite the configuration.
For example:
appd configure smartagent --attach-configure-file { path_to_ld_preload_json }
This copies the ld_preload.json from control node to managed node.
For using Smart Agent CLI, see Smart Agent Command Line Utility.