Delete a Smarts device from APG.
search cancel

Delete a Smarts device from APG.

book

Article ID: 304677

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:

  • How do I delete a Smarts device from M&R APG.
  • Removed Smarts device from APG Management Database Metrics but the device still remains.
  • After running through the following the standard M&R APG procedure for removing devices,Smarts devices still remain in APG.
  • Cannot remove Smarts devices from M&R APG.

Environment

M&R- 7.x

Cause

This issue can have the following causes:

  • Device has not been removed from Smarts: In addition to being removed from APG, the device must also be removed from Smarts.If a collector is still polling for device information, it will create the device even after being removed from APG Management Database Metrics. (Note: make sure the device was removed and not just unmanaged) 
  • Import Properties task is not running: If import properties task does not complete successfully needs to be updated manually.

Resolution

  • To successfully remove a Smarts device from M&R APG, you must do the following:
    • Remove the device from Smarts.
    • Remove the device from APG.
    • Update the flat table used by Tomcat to read APG data. 
  • To remove a device from Smarts, run the following dmctl command against all Smarts domains:
    <SmartsBaseDir>./dmctl -s <APM Domain Name> invoke <class>::<instance> remove

    IMPORTANT! The device needs to be removed from all the Smarts domains.
  • To remove the device from APG,do the following:
      • Stop Default Collector Manager Service.
        ./manage-modules.sh service stop collector-manager Default
      • In M&R GUI, Please go to the below location:
         APG administration > Modules > Management of Database Metrics
  • Delete all metrics associated with device. To do this, search for the device name under Filter, select all, then delete.
  • Start Default Collector Manager Service. In Windows, use cmd 'run as adminstrator mode' to run the following:
    ./manage-modules.sh service start collector-manager Default
  • Manually run the import properties task 
    • If you want to see the change to take effect immediately, refresh the database flat table where tomcat reads the APG data from as follows:
    • Navigate to administration/centralized management/scheduled tasks/database.
    • Run :  import properties task
  • Restart the Tomcat service:
     <APGbase>/bin/apg-tomcat-default restart

Additional Information

Note: If deleting metrics is not working, check import properties and make sure it is running successfully if it did not complete with a code 1, it is likely caused by crashed tables in the database.