A machine agent is considered to be abandoned when it is not attached to any APM agents.
There are two ways to delete the abandoned machine agent:
From controller UI by creating a dummy application.
The manual step to delete from the DB.
Two of them are described below:
From controller UI:
1) Please make sure that machine agent is no longer running or reporting.
2) create a dummy application from appdynamics controller UI.
3) Associate the machine agents that you want to delete to that application.
4) delete the dummy app that you have created from step 1.
The manual step from DB:
Please follow the below steps to manually delete them from the database.
This process will ensure that they do not appear in UI. But the entries still present in the db.
From the command line, change to the Controller's bin directory. <controller_home>/bin.
Use the following script to log into the Controller database of the Controller.
For Windows: controller.bat login-db
For Linux: controller.sh login-db
Get the host-name from controller UI for which you want to delete the machine agents.
Run this query to check the row exists in `DB:
SELECT * FROM machine_instance WHERE NAME = '<host-name>';
`<host-name>` is the value you got from controller UI in step 3.
Run this query for marking the agent as historical:
UPDATE machine_instance SET historical = 1 WHERE NAME = '<host-name>';
<host-name> is the value you got from controller UI in step 3.
The controller process will take some time to remove it after marking it as historical.
... View more