The Cluster Agent is administered from the AppDynamics Controller where you can enable, disable, configure, and delete the Cluster Agent. You can also change which namespaces to monitor.

Any configuration change made in the Controller applies to the Cluster Agent as well. These changes take a couple of minutes and the status is shown through a progress indicator icon.

View the Cluster Agent Summary

From the Controller UI Home screen:

  1. In the upper-right corner, click the Settings icon  > AppDynamics Agents.
  2. Click the Cluster Agents tab. A list of your Clusters appear. By default, all agents are enabled.

  3. Double-click on a Cluster Agent. A dialog appears showing a Cluster Agent Summary of your current settings. The summary card shows the Cluster NameKubernetes VersionCluster ID, and currently monitored Namespaces. To the right of the Namespaces table is a Search bar, where you can search by namespace.

  4. Click X to close the Cluster Agent Summary card.

Disable the Cluster Agent

  1. Select a Cluster Agent from the list.
  2. Click the Disable icon. You can also select the Cluster name, right-click, and select Disable. 
    A dialog appears confirming you disabled the agent successfully. These changes take a couple of minutes and the status is shown through a progress indicator icon. When you disable the agent, it does not report metrics, events, or monitor pods or containers. You can re-enable a disabled agent by following the steps below. 

Enable the Cluster Agent

  1. Select a Cluster Agent from the list.
  2. Click Enable icon. You can also select the Cluster name, right-click, and select Enable.
    A dialog appears confirming you enabled the agent successfully. These changes take a couple of minutes and the status is shown through a progress indicator icon. When you enable the agent, it reports metrics, events, and monitors containers.

Add or Remove Namespaces

To add or remove a namespace from the cluster:

  1. Double-click a cluster from the list.
  2. Click the Configure icon.
  3. To modify namespaces, select a namespace by checking the corresponding box. Once the desired namespace box is checked, click the arrow to move it to the Selected namespace table or Available namespace table.
  4. Click OK to close the dialog box. These changes take a couple of minutes and the status is shown through a progress indicator icon.

Update Namespaces in the Cluster Agent Configuration File

Updating namespaces in the cluster-agent.yaml file does not change your currently monitored namespaces. It assures that if the Cluster Agent pod unexpectedly restarts, that your namespaces are preserved. See Troubleshoot the Cluster Agent.

 To update namespaces:

  1. Open the cluster-agent.yaml file in a text editor.
  2. Locate the nsToMonitor field:

    nsToMonitor:
        - "default"
        - "appdynamics"
    CODE
  3. Make certain that the list of namespaces is correct. If it is not correct, add or remove namespaces in the cluster-agent.yaml file

  4. Open a command-prompt and run the following command to apply the namespaces changes:

    kubectl apply -f cluster-agent.yaml
    CODE
  5. To verify the AppDynamics Operator registered the monitored namespace value, from the command-prompt run:

    kubectl -n appdynamics describe cm cluster-agent-config | grep APPDYNAMICS_CLUSTER_MONITORED_NAMESPACES -A 2
    CODE
  6. In our nsToMonitor example, this would be the expected output:
    APPDYNAMICS_CLUSTER_MONITORED_NAMESPACES:
    ----
    default,appdynamics
    CODE

Delete the Cluster Agent

To delete a Cluster Agent:

  1. Select the Cluster Agent name that you want to delete.
  2. Click the Delete icon. A dialog asks you to confirm that you want to delete the Cluster Agent.
  3. Click Delete. If you delete a Cluster Agent, you will lose all historical data.