Once a Device is set to a Retired state, if the old historic data is unwanted, it is beneficial to system health to remove them from the system.
When also regularly running the remove_not_present_items.sh script to delete retired component items, first deleting retired devices may improve the time it takes for the remove_not_present_items.sh script to complete. Deleting the device parent, deletes related items, and often will greatly reduce the retired item count pending deletion.
Provides a simple method to list the internal IDs representing Retired Devices to simply their removal via a deletion script.
All supported Dx NetOps Performance Management releases.
The steps involved are:
To execute the steps complete the following:
1: Enter the CLI on the PC server and go to the (default path) /opt/CA/MySql/bin directory. Run the following command as the root, or sudo root user, that owns the installation:
For example:
2: Take the SourceID value from step 1 and run the following command. Change the directory, and filename the ID's are written to, as desired.
After create the retiredLocalIdsToDelete.out
Edit the File and remove the first line:
localid
Just need to have the numbers
If you got the message:
-bash: ./deleteAllDevicesInFile.pl: /usr/bin/perl^M: bad interpreter: No such file or directory
Just use the dos2unix to convert the file