Knowledge Base

Showing results for 
Search instead for 
Did you mean: 

Delete abandoned machine agent

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:


  1. From controller UI by creating a dummy application.
  2. 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.


  1. From the command line, change to the Controller's bin directory. <controller_home>/bin.
  2. Use the following script to log into the Controller database of the Controller.
    • For Windows: controller.bat login-db
    • For Linux: login-db
  3. Get the host-name from controller UI for which you want to delete the machine agents.
  4. 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.


  1. 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.

Version history
Revision #:
3 of 3
Last update:
‎11-30-2018 01:38 PM
Updated by:
Labels (1)
Tags (1)

Found this article helpful? Click the Thumbs Up button.
Have an additional comment? Post it below.