Enable Log Collection for Failing Pods

This page describes how to enable and use the Cluster Agent feature to collect logs for failing pods. This feature is automatically enabled on SaaS Controllers. You must enable on-premises Controllers described on this page.

When enabled, the Cluster Agent automatically collects logs for restarted or failed pods. The pod failure logs capture the status of the CrashLoopBackoff Back-off restarting failed container

Minimum Requirements

The Cluster Agent log collection feature requires:

  • Cluster Agent >= 20.7
  • Controller >= 20.10.0

Controller Settings

The following table lists the log settings that the technical support team can update:

Note: Any change to the sim.cluster.logs.cloudstore.enabled or sim.cluster.logs.s3.enabled flag or the bucket name configuration requires a controller restart. Since controller restarts are managed internally, customers must contact the Support team to make these changes.
Setting Definition Location Default

sim.cluster.logs.bucket.name

The folder name to store the pod logs.

Controller Administration Console with root user permission (Controller Settings)

kubernetes-log-snippets

sim.cluster.logs.capture.enabled

An option to activate or deactivate log capturing.

This option is enabled by default.

Controller Administration Console with root user permission

You can configure this setting at both account level (Account Settings) and Controller level (Controller Settings)

true

sim.cluster.logs.expiration.in.days

The number of days after which the logs get cleared from the storage. Controller Administration Console with root user permission (Controller Settings) 10

sim.cluster.logs.root.file.path

The complete root file path to store the logs.Modifying the path results in storing the logs in the new path but the older logs will remain in the previous location. Controller Administration Console with root user permission (Controller Settings) /opt/appdynamics
sim.cluster.failed.pod.limit The number of historical pods beyond this value is purged. Controller Administration Console with root user permission (Controller Settings) 1000
sim.cluster.logs.cloudstore.enabled By default, uploaded pod logs are stored on the controller filesystem. Use this setting to switch to AWS cloud storage (or revert back to the filesystem).
Note: You require to restart the Controller to apply changes after modifying this setting.
Controller Administration Console with root user permission (Controller Settings) false
sim.cluster.logs.s3.enabled

An option to save the logs in the S3 bucket. If you specify the value as false, the logs are saved in the Controller filesystem.

Note:
  • You require to restart the Controller to apply changes after modifying this setting.

  • If you are not using Amazon S3 bucket to save logs, disable the sim.cluster.logs.s3.enabled setting (sim.cluster.logs.s3.enabled=false).

Controller Administration Console with root user permission (Controller Settings) true

Use Cluster Agent Log Collection

You can view the logs on the Pod Details page and the Cluster Event page.

Pod Details Page

  1. Select Servers > Clusters.
  2. Double-click the required Cluster Agent. The cluster page displays the Dashboard, the Pods, the Inventory, and the Events tabs.
  3. Click Pods.
  4. Double-click any pod to display its Pod Details panel.
  5. Review the Error Log.Error Log on Pod Details page includes timestamp and status of log trigger
  6. Click the Actions icon to view the log details.The details of the error log is displayed along with timestamp and the log trigger status

Cluster Events Page

  1. ClickServers.
  2. On the left navigation bar, selectClusters ><Clustername>> Details > Events
  3. Double-click a cluster event to view the logs under the Logstab.Cluster Event Logs tab includes the log details