All Products
Search
Document Center

Application Real-Time Monitoring Service:Control the agent version

Last Updated:Nov 08, 2024

In a Kubernetes cluster, the ack-onepilot component enables the automatic upgrade of the Application Real-Time Monitoring Service (ARMS) agent. If you prefer not to automatically upgrade the agent to the latest version, you can lock the agent version. This allows you to verify the new agent version in the test environment before you gradually upgrade the agents for all applications.

Solution 1 (recommended): Manually specify the agent version

Required ack-onepilot version

The ack-onepilot version must be 3.0.17 or later.

To view the ack-onepilot version of a Container Service for Kubernetes (ACK) cluster, go to the Clusters page in the ACK console, click More in the Actions column for the cluster, and choose Operations > Manage Components. If the version does not meet the requirement, click Upgrade to upgrade the ack-onepilot component.

image

Specify an agent version by modifying the label field in the application YAML file. This operation will override the automatic upgrade of the ARMS agent, ensuring that the agent of the specified version is used.

  1. Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Agent Management > Agent Release Notes to view the available online agent versions. We recommend that you select the latest version.

    image

  2. On the Agent Online Status tab, check the current agent version of your application for rollback if necessary.

  3. Specify the agent version for your application.

    Note

    If you use both method 1 and method 2 or both method 1 and method 3, the version specified by method 2 or method 3 has a higher priority than that specified by method 1.

    • Method 1: Modify the application YAML file. Add "aliyun.com/agent-version: Agent version" under the labels field and click Update. The application will automatically restart to apply the modification.

      This modification only takes effect on the current application. For other applications, you must modify their YAML files accordingly.

      image

      If the ack-onepilot component is V3.3.0 or later, you can control the agent version in progressive update mode by adding the following label under aliyun.com/agent-version.

      aliyun.com/enable-progressive-update: 'true'
      Note
      • When you re-deploy a workload (Deployment or StateSet) in an ACK cluster in progressive update mode, the agent of only one to two instances is updated to the version specified by aliyun.com/agent-version. The version of the agent installed in other instances remain unchanged.

      • If the application workload contains fewer than three replicas, progressive update does not take effect. Even if you specify an agent version, all the replicas do not update to the specified version. In this case, we recommend that you do not enable progressive update for the worload.

    • Method 2: When you deploy an application to a Kubernetes cluster in the Enterprise Distributed Application Service (EDAS) console, you can specify the agent version in the Monitoring and Governance Configurations section on the Advanced Settings tab.

      Note

      To adjust the available agent versions, contact EDAS technical support.

    • Method 3: If an application is created or deployed in a Kubernetes cluster by calling the InsertK8sApplication or DeployK8sApplication operation of the EDAS API, you can use the CustomAgentVersion parameter to specify the agent version for the application. For more information, see DeployK8sApplication.

  4. Verify the specified agent version in the test environment before you upgrade the agents for other applications.

    If the new agent version encounters issues, you can roll back the agent version by performing the operations in Step 3.

Solution 2: Contact technical support to specify the agent version

If the ack-onepilot version is earlier than 3.0.17 or a large workload is required to manually modify the YAML file, you can use the online version locking feature to upgrade the agent from an outdated or soon-to-be unsupported version to the latest version.

  • Select an application to verify the upgrade in the test environment. Contact ARMS technical support to upgrade the locked agent version of the application to the latest version. After the upgrade is complete, restart the application to verify the upgrade.

  • After the new version is verified in the test environment, contact ARMS technical support to upgrade the locked agents in batches for clusters that need to be upgraded. After the new online version takes effect, restart the applications in batches.