How to enable DEBUG Level Logging for AppDynamics Smart Agent
This article explains how to enable DEBUG level logging for the AppDynamics Smart Agent by updating the config.ini file and restarting the Smart Agent service.
Why do I need to collect the debug-level log file?
The Smart Agent logs entries at the info level by default. Sometimes, debug-level logs are required to investigate an issue in more detail.
Debug-level logging provides more detailed and insightful entries, which can help identify the root cause of the experienced issue. These logs are especially useful when standard info logs do not contain enough detail for troubleshooting.
You can collect Smart Agent logs from the server where the Smart Agent is installed.
1. Locate the Smart Agent configuration file
The Smart Agent configuration file is located in the Smart Agent installation directory, for example:
/opt/appdynamics/appdsmartagent/config.ini
In your environment, the relevant section currently looks like this:
[Telemetry]
LogLevel = info
LogFile = log.log
2. Change the logging level to DEBUG
Edit the config.ini file and change the telemetry logging level from:
[Telemetry]
LogLevel = info
to:
[Telemetry]
LogLevel = debug
After the change, the section should look like this:
[Telemetry]
LogLevel = debug
LogFile = log.log
3. Confirm the log file location
The Smart Agent writes logs to the file configured by the LogFile parameter.
Default value:
LogFile = log.log
In your example, the default log file is:
/opt/appdynamics/appdsmartagent/log.log
4. Restart the Smart Agent service
After saving the configuration change, restart the Smart Agent service:
sudo systemctl restart smartagent
5. Verify DEBUG logging
After the restart, check the configured log file:
/opt/appdynamics/appdsmartagent/log.log
You can use the following command:
tail -f /opt/appdynamics/appdsmartagent/log.log
Confirm that debug-level entries are being written to the log file.
6. Collect debug-level logs from the requested Smart Agent action
Reproduce or perform the requested Smart Agent action while debug-level logging is enabled. This ensures the log file captures the detailed entries needed for troubleshooting.
7. Provide the log file for troubleshooting
If Smart Agent logs are requested for troubleshooting, provide the configured log file.
Default log file:
/opt/appdynamics/appdsmartagent/log.log
... View more