How to delete Retired Items in NetOps Performance Management
search cancel

How to delete Retired Items in NetOps Performance Management


Article ID: 230033


Updated On:


CA Performance Management - Usage and Administration DX NetOps


We are getting errors from the script in DX NetOps Performance Management.

According to the Errors running the script Knowledge Base article there are to many items for it to manage.

We can use the script script attached to this article to remove the items.


All supported DX NetOps Performance Management releases


Buildup of retired items created a data set to large for the script to work with.


The attached script requires a list of Item_ID values in a file to work with for deletion requests.

To generate the list of IDs we use a vsql prompt on the Data Repository database.

When the script runs it issues a curl statement to the DA /rest/retired API with deletion calls for each Item_ID in the list of IDs it's provided.

Complete the following steps to delete the retired items.

  1. Open a connection to a Data Repository database node to determine Retired item counts, and generate text file with Item_ID list for removal.
    1. Log in as the dradmin or equivalent user.
    2. Run \d to determine schema name. Note it in the 'schema' column. Use it anywhere we see <schema> in the following queries.
    3. Determine the current total Retired item count with this query:
      • select facet_qname, count(*) from <schema>.v_item_facet where item_id in (select item_id from <schema>.v_poll_item where is_filtered = 1) group by 1 order by 2 desc;
    4. The following will result in a file with a list of Item_IDs in /tmp/retireditems.txt. Change the path or filename as desired. Run these commands in the order listed:
      • \t
      • \a
      • \o /tmp/retireditems.txt
      • select item_id from <schema>.v_item_facet where facet_qname like '%}Retired';
      • \q
    5. We can run the following command against the resulting file to see a count of Item_IDs. It should match the vsql output for Retired items in 1.3 above:
      • wc -l /tmp/retireditems.txt

  2. Download the attached script. It needs to reside on a host with Data Aggregator access. Ideally place it on the Data Aggregator host itself.
    • Ensure it's correctly owned and permissioned to be executable.

  3. Run the script as follows. It will delete items in batches of 500 Item_IDs at a time:
    • ./ -da <DA_Host> -f /tmp/retireditems.txt

To monitor deletion run the vsql command in step 1.3 and monitor the Retired item counts. They should be decreasing as the script runs.

Attachments get_app