All Products
Search
Document Center

Application Real-Time Monitoring Service:Uninstall an ARMS agent for Go

Last Updated:Dec 18, 2024

If you no longer need Application Real-Time Monitoring Service (ARMS) to monitor your Go applications, you can uninstall the ARMS agent. This topic describes how to uninstall an ARMS agent for Go, remove code enhancements from the agent, and clean up the residue caused by mixed compilation failures.

Uninstall an ARMS agent deployed in an ACK cluster

Warning

The ack-onepilot component is shared by Microservices Engine (MSE) and ARMS. Before you uninstall the component, make sure that you are not using MSE. Otherwise, MSE becomes available.

Uninstall the ARMS agent for all applications in the cluster

Method 1: Use the ACK console

  1. Log on to the Container Service for Kubernetes (ACK) console.

  2. In the left-side navigation pane, click Clusters. On the Clusters page, click the name of the cluster.

  3. In the left-side navigation pane, choose Operations > Add-ons. On the Add-ons page, enter ack-onepilot in the upper-right corner.

  4. Click Uninstall on the ack-onepilot card.

  5. In the message that appears, click OK.

  6. Restart the pod.

Method 2: Use the CLI

  1. Run the following command to uninstall the ack-onepilot component:

    helm3 uninstall --namespace ack-onepilot ack-onepilot
  2. Restart the pod.

Uninstall the ARMS agent for a specific application in the cluster

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters. On the Clusters page, find the cluster and click Applications in the Actions column.

  2. On the Deployments page, choose More > View in YAML in the Actions column of the application.

  3. In the Edit YAML dialog box, delete the labels that you added when you installed the ARMS agent and click Update.

  4. Restart the pod.

Uninstall an ARMS agent that is manually installed

Generally, instgo restores your code base after the mixed compilation is completed. If you no longer need the code enhancements provided by the ARMS agent, you do not need to delete instgo. Instead, you can perform the following operations to replace instgo with Go and recompile your application.

  1. (Optional) Pull the code base and recompile it by running thego buildcommand.

  2. Deploy the application in the production environment in place of the original one.

Clean up the residue caused by mixed compilation

During the mixed compilation, the ARMS agent for Go modifies some of your files to add code enhancements. After the mixed compilation is complete, the ARMS agent for Go automatically cleans up the modified files. However, you must manually clean up the files in the following scenarios:

  • The compilation was forcibly stopped or killed.

  • instgo unexpectedly exited due to panic.

In the preceding scenarios, you can manually run thecleancommand to clean up the modified files.

Linux/Darwin

./instgo clean

Windows

.\instgo.exe clean

Delete instgo

If you no longer need instgo, perform the following steps to delete it.

  1. Delete all files in the cache directory specified by the--cacheDircommand during compilation. If no cache directory is specified, use the default cache directory.

    Linux/Darwin

    # Replace ${cacheDir} with the specified cache directory.
    rm -rf ${cacheDir}/aliyun-go-agent
    # Use the default cache directory.
    rm -rf /opt/.opt/aliyun-go-agent

    Windows

    # Replace ${cacheDir} with the specified cache directory.
    rmdir ${cacheDir}\aliyun-go-agent -Recurse
    # Use the default cache directory.
    rmdir C:\ProgramData\.opt\aliyun-go-agent -Recurse
  2. Delete instgo.