Cluster Agent Restarts

If the Cluster Agent restarts, you can verify that a restart occurred from the pod details. To retrieve the pod details, enter:

kubectl get pods -n appdynamics

Sample output:

NAME                                         READY   STATUS    RESTARTS   AGE
appdynamics-operator-6fff76b466-qtx57        1/1     Running   0          4h18m
k8s-cluster-agent-perf-jg-6fc498d557-q7zst   1/1     Running   1          83m

If the Cluster Agent unexpectedly restarts, the RESTARTS count value will be greater than zero. You will have to explicitly reset both namespaces and the logs.

Note: We recommend that you do not overwrite the default stdoutLogging: true property value in the cluster-agent.yaml file. If you set this property to false, the kubectl logs command does not return logs.

Cluster Agent logs persist even if the Cluster Agent is restarted by Kubernetes. To view the Cluster Agent logs for the Cluster Agent pod (that restarted), enter:

kubectl -n appdynamics logs --previous ${CLUSTER_AGENT_POD_NAME}

If the Cluster Agent pod has restarted, the monitored namespaces (that you configured through the UI) are not preserved. If you configured namespaces through the UI, you should add the same namespaces to your cluster-agent.yaml file under nsToMonitorRegex, and then apply the configuration. As a result, the Cluster Agent pod will retain the monitored namespaces when it restarts.

If you did not add namespaces to the cluster-agent.yaml file, you can reconfigure your monitored namespaces:

  1. Go to conkeyref="vars/product_name" Agents > Cluster Agents > {CLUSTER_AGENT} > Configure.
  2. Add the namespaces to monitor.

See Add or Remove Namespaces.