DX OI - How to delete unwanted metrics from Performance Analytics UI

book

Article ID: 215546

calendar_today

Updated On:

Products

DX Operational Intelligence

Issue/Introduction

How to delete unwanted or inactive metric from Performance Analytics Filter?

For example:

Environment

 DX Operational Intelligence 20.2+

Resolution

Deleting metrics is not possible using the UI, however, you can remove this information using Elastic queries as documented below:

 

STEP 1: Obtain the elastic endpoint

If openshift

oc get routes -n<dxi-your-namespace> | grep jarvis-es

Output example:

jarvis-es-nqdt4                             es.munqa001493.bpc.broadcom.net                           /                  jarvis-elasticsearch-lb       9200                                          None

 
If kubernetes

kubectl get ingress -n<dxi-you-rnamespace> | grep jarvis-es

Output example:

jarvis-es                             es.10.109.32.162.nip.io                                     80        12d

 

STEP 2: Identify the Metrics you are planning to delete:

Example 1: List all metrics

http(s):/es.<endpoint>/ao_itoa_metrics_metadata_2_1/_search?pretty

 

Example 2: List all metrics from a specific tenant

http(s):/es.<endpoint>/ao_itoa_metrics_metadata_2_1/_search?pretty&q=(@tenant_id:"A35DDB2F-7888-43BB-8FEC-415B023A4064")

 

Example 3: List all metrics from UIM only for example:

http(s):/es.<endpoint>/ao_itoa_metrics_metadata_2_1/_search?pretty&q=(product:"UIM")

 

NOTE: If you need to delete data for specific tenant, then find out the correct tenant name as below:

http(s):/es.<endpoint>/ao_tenants_1_1/_search?size=200&pretty

Example: 

http:/es.munqa001493.bpc.broadcom.net/ao_tenants_1_1/_search?size=200&pretty

In this example: 4E1F2D8E-AA5F-4A41-A1DF-D60F8C5E9B3A

 

STEP 3:  Connect to your Openshift or Kubernetes master and create a delete.json file and include your query filter:

Example 1: Delete all metrics from UIM

{
    "query": {
        "bool": {
            "must": [
               {
                   "match": {
                      "product": "UIM"
                   }
               }
            ]
        }
    }
}

Example 2: Delete all metrics from UIM from a specific tenant

{
    "query": {
        "bool": {
            "must": [
               {
                   "match": {
                      "product": "UIM"
                   }
               },{
                   "match": {
                      "@tenant_id": "<tenant_id>"
                   }
               }
            ]
        }
    }
}

 

STEP 4:  Execute the delete operation:

curl --header "Content-Type: application/json" --request POST --data "@delete.json" http(s):/es.<endpoint>/ao_itoa_metrics_metadata_2_1/_delete_by_query

 

You should get a message confirming the number of records that has been deleted, below an example:

 

Expected Result for this example: metrics are not longer be available

 

NOTE: If the curl command doesn't return anything, then verify that elastic endpoint is reachable, for example run: curl http(s):/es.<endpoint> , it should return the version of elasticsearch as below:

If elastic endpoint is just not available from the unix servers then you can run the curl commands from elastic pod, you can connect using :

kubectl exec -ti <elastic pod> -n <dxi namespaec> sh

 

STEP 5: scale down and scale up the metric-metadata deployment

kubectl scale deployment doi-metric-metadata --replicas=0
kubectl scale deployment doi-metric-metadata --replicas=1

 

STEP 6: restart the integration connector(s)

 

Additional Information

DX AIOPs - Troubleshooting, Common Issues and Best Practices
https://knowledge.broadcom.com/external/article/190815 

Attachments