Why do I need to collect the debug-level log file?
The Cluster Agent by default logs the entries at the info level. Sometimes, the debug-level log files are necessary to investigate an experienced issue. Debug-level logging logs are more insightful entries that can be later used to identify the root cause of the experienced issue. There are two ways you can collect the agent log files at the desired logging level.
- By editing the currently running Cluster Agent
- By updating the Cluster Agent with a new configuration.
1. Edit the currently running Cluster Agent
- Determine the clusteragent object name:
kubectl -n appdynamics edit clusteragent -n appdynamics

- Edit the YAML file as shown below to set the logLevel to DEBUG, then save it (similar to using the vi editor):
kubectl edit clusteragent <cluster_agent_name> -n appdynamics
Edit the file to include:
Save the configuration: `:wq`
- Delete Cluster Agent pod with old configuration:
kubectl delete pod <cluster-agent-pod> -n appdynamics
- Now cluster should spin up a new cluster agent pod.
Keep the cluster-agent running for 15 minutes in debug logging mode.
- Collect logs by executing:
kubectl logs <cluster-agent-pod> -n appdynamics > cluster-agent.log
- Revert the changes
2. Update the Cluster Agent with a new configuration.
- Edit the configuration:
a) Kubernetes CLI installation -> "cluster-agent.yaml" file

b) Helm Chart installation -> "values.yaml" file

- Apply the changes
a) Kubernetes CLI installation -> kubectl apply -f cluster-agent.yaml
b) Helm Chart installation -> helm upgrade <release_name> -f values.yaml appdynamics-cloud-helmcharts/cluster-agent -n appdynamics
- Now cluster should spin up a new cluster agent pod.
Keep the cluster-agent running for 15 minutes in debug logging mode.
- Collect logs by executing:
kubectl logs <cluster-agent-pod> -n appdynamics > cluster-agent.log
- Revert the changes
I hope this article was helpful. Feel free to ask in case of any questions.