Dx NetOps Performance Management all versions
This could be done using the "remove_not_present_items.sh" script available on the Data Aggregator system in the directory /opt/IMDataAggregator/scripts
This script can be customized for different filter criteria.
The filtering examples/options are provided to allow taking an approach that deletes the 'not present' items on a subset of devices specified by a filter.
For example, the option:
[-z <filter by facet type>]
results into:
<Pollable.SourceFacetTypes type="CONTAINS">$FILTERFACETTYPE</Pollable.SourceFacetTypes>
As an example, looking at the REST output for QosClassMaps, can see:<Pollable version="1.1.1"><IsExcludedFromReports>false</IsExcludedFromReports><SourceFacetTypesList><SourceFacetTypes>{http://im.ca.com/normalizer}NormalizedQosClassMapInfo</SourceFacetTypes></SourceFacetTypesList><PollRate>FAST</PollRate><IsPollEnabled>true</IsPollEnabled><IsPolled>true</IsPolled></Pollable>
So to set the QosClassMaps filter in the script this option ca be used:
-z NormalizedQosClassMapInfo
Note:
The '-o' option (used to get an output file) appears to override the '-z' option. So should not be used in this case.
The '-F' option will not actually do the delete operation, and returns a list of the items, so it can be used to test what can be deleted.
For example, running this command:
./remove_not_present_items.sh -z NormalizedQosClassMapInfo -F -h <host_name>
will print a result similar to the following, showing the list of items that will be delete by running the script as above without the -F option:####### RESULT OF SEARCH ##########################Items found to be deleted: 1Would you like to list the names of the items?Select 1 for yes; 2 for noYesNo#? 1********** Not Present Item List ****************cbQoS Fa3/4/UnknownPolicy/class-default-...********** Not Present Item List End*************######### NOT PRESENT ITEM DELETION ###############
Refer to the NetOps Performance Management documentation here:
Delete Components That Are Not Present