Uninstalling the ICAgent (Linux)
If the ICAgent on a server is uninstalled, server O&M will be affected, making topology and tracing functions unavailable. Exercise caution when performing this operation.
You can uninstall the ICAgent using either of the following methods:
- Uninstalling the ICAgent Through the APM Console: The ICAgent has been successfully installed, and needs to be uninstalled.
- Uninstalling the ICAgent Through Logging In to a Server: The ICAgent fails to be installed, and needs to be uninstalled.
- Remotely Uninstalling the ICAgent: The ICAgent has been successfully installed, and needs to be remotely uninstalled.
- Uninstalling the ICAgent in Batches: The ICAgent has been successfully installed, and needs to be uninstalled in batches.
Uninstalling the ICAgent Through the APM Console
- Log in to the APM console. In the navigation pane, choose Agent > Management.
- Select Other: user-defined nodes from the drop-down list on the right of the page.
- Select one or more servers whose ICAgent is to be uninstalled, and click Uninstall ICAgent. In the Uninstall ICAgent dialog box, click Yes.
Wait for about 1 minute to complete the uninstallation. When the ICAgent status changes from Uninstalling to Uninstall, the ICAgent is successfully uninstalled.
To reinstall the ICAgent, wait for 5 minutes after it is uninstalled. Otherwise, the ICAgent may be automatically uninstalled.
Uninstalling the ICAgent Through Logging In to a Server
- Log in to the server from which the ICAgent is to be uninstalled as the root user.
- Run the following command to uninstall the ICAgent:
bash /opt/oss/servicemgr/ICAgent/bin/manual/uninstall.sh;
- Wait until the message "ICAgent uninstall success" is displayed.
Remotely Uninstalling the ICAgent
In addition to the preceding methods, you can use a method similar to Inherited Installation to remotely uninstall the ICAgent.
- Run the following command (x.x.x.x indicates the server IP address) on the server where the ICAgent has been installed:
bash /opt/oss/servicemgr/ICAgent/bin/remoteUninstall/remote_uninstall.sh -ip x.x.x.x
- Enter the password of the root user of the server where the ICAgent is to be uninstalled as prompted.
- If both the expect tool and ICAgent have been installed on a server, the ICAgent is successfully uninstalled from the remote server after the preceding command is run. If the ICAgent has been installed on a server, but the expect tool has not, enter the information as prompted.
- Ensure that the root user can run the SSH and SCP commands on the Elastic Cloud Server (ECS) server where the ICAgent has been installed to communicate with the remote ECS server where the ICAgent is to be uninstalled.
- If the message "ICAgent uninstall success" is displayed, the ICAgent is successfully uninstalled. After the ICAgent is successfully uninstalled, choose Agent > Management in the navigation pane to view the ICAgent status.
Uninstalling the ICAgent in Batches
If the ICAgent has been installed on a server and the installation package ICProbeAgent.zip exists in the /opt/ICAgent/ directory of the server, use this method to uninstall the ICAgent from multiple remote ECS servers with a few clicks.
The ECS servers must belong to the same Virtual Private Cloud (VPC) and network segment.
Prerequisites
The IP addresses and passwords of all ECS servers where the ICAgent is to be uninstalled have been collected, sorted in the iplist.cfg file, and uploaded to the /opt/ICAgent/ directory on the ECS server where the ICAgent has been installed. As shown in the following example, each IP address and password in the iplist.cfg file must be separated by a space.
192.168.0.109 password (Enter the actual password.)
192.168.0.39 password (Enter the actual password.)
- Because the iplist.cfg file contains sensitive information, you are advised to clear it in time.
- If the passwords of all servers are the same, you only need to list IP addresses in the iplist.cfg file and enter the password once during execution. If the password of an IP address is different from those of other IP addresses, you need to list both passwords and IP addresses in the iplist.cfg file.
Procedure
- Run the following command on the server where the ICAgent has been installed:
bash /opt/oss/servicemgr/ICAgent/bin/remoteUninstall/remote_uninstall.sh -batchModeConfig /opt/ICAgent/iplist.cfg
Enter the default password of the root user of the servers where the ICAgent is to be uninstalled as prompted. If the passwords of all IP addresses have been configured in the iplist.cfg file, press Enter to skip this step. Otherwise, enter the default password.
batch uninstall begin Please input default passwd: send cmd to 192.168.0.109 send cmd to 192.168.0.39 2 tasks running, please wait... End of uninstall agent: 192.168.0.109 End of uninstall agent: 192.168.0.39 All hosts uninstall icagent finish.
Wait until the message "All hosts uninstall icagent finish." is displayed, which indicates that the ICAgent has been successfully uninstalled from all the hosts listed in the configuration file.
- After the ICAgent is successfully uninstalled, choose Agent > Management in the navigation pane to view the ICAgent status.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot