Watch4net APG: How do I delete a Smarts device from APG?; Removed Smarts device from APG Management Database Metrics but the device still remains
search cancel

Watch4net APG: How do I delete a Smarts device from APG?; Removed Smarts device from APG Management Database Metrics but the device still remains

book

Article ID: 304677

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:


How do I delete a Smarts device from Watch4net APG?

Removed Smarts device from APG Management Database Metrics but the device still remains
After running through the following the standard Watch4net APG procedure for removing devices, Smarts devices still remain in APG

Cannot remove Smarts devices from Watch4net APG

Environment

VMware Smart Assurance - Watch4Net/M&R

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 Watch4net APG, you must do the following:

  1. Remove the device from Smarts.
  2. Remove the device from APG.
  3. Update the flat table used by Tomcat to read APG data.

The following sections explain how to do each of these tasks.

Removing the device from Smarts:
To remove a device from Smarts, run the following dmctl command against all Smarts domains:

<SmartsBaseDir>/dmct s INCHARGE-AM-PM invoke <class>::<instance> remove

Example
dmctl s INCHARGE-AM-PM invoke Router::foo remove

IMPORTANT! The device needs to be removed from all the Smarts domains.

Removing the device from APG
To remove the device from APG, do the following:

  1. Stop Default Collector Manager Service. In Windows, use cmd 'run as adminstrator mode' and run the following
            ./manage-modules.sh (or cmd) service stop collector-manager Default

     2.   In APG, go to:

            APG administration > Modules > Management of Database Metrics

 
  1. Delete all metrics associated with device. To do this, search for the device name under Filter, select all, then delete.
  2. Start Default Collector Manager Service. In Windows, use cmd 'run as adminstrator mode' to run the following:

    ./manage-modules.sh (or cmd) 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:

  1. Navigate to administration/centralized management/scheduled tasks/database
          Run :  import properties task

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