Smart Agent provides the auto-attach feature to auto instrument a Java application with AppDynamics Java Agent or a NodeJS application with AppDynamics NodeJS Agent. You can use Smart Agent Command Line Interface for additional configuration.
Supported Runtimes and Frameworks:
- Java: Tomcat, Weblogic, Springboot, JBoss, Glassfish and plain Java applications
- NodeJS
Advanced Auto-Attach Configuration
To use advanced configuration to auto-attach the agent to the applications, You must have AppDynamics command line utility installed. See Smart Agent Command Line Utility.
You can overwrite the default ld_preload.json (which will attach the agent to all supported Java frameworks and NodeJS applications)
and add your own with your updated rules. The default location for ld_preload.json
is /etc/opt/appdynamics/ld_preload.json
.
Use the configure command on Smart Agent CLI (appd CLI) to overwrite the configuration.
appd configure smartagent --attach-configure-file { path_to_ld_preload_json }
CODE
This copies the ld_preload.json
from control node to managed node.
Filters
The JSON configuration is broken into sections per supported runtime. For example, Java, NodeJS. For each section, you can provide a set of filters using regular expressions and also define a filter to auto attach or ignore the discovered application(s). The filters are applied in an order. The regular expressions are applied to the entire command line.
Example regex:
{
"name": "instrument node applications",
"regex": "node .*\\.js.*$",
"instrument": true
},
{
"name": "ignore npm commands",
"regex": "npm",
"instrument": false
}
JSON
Startup scripts such as, /opt/tomcat/bin/startup.sh
launch the Java applications internally with certain parameters. Auto-attach monitors the launch of the Java application and not of the shell script(s).