ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Alarm search API query returns multiple results when using apmgw endpoint

book

Article ID: 228077

calendar_today

Updated On:

Products

DX Operational Intelligence

Issue/Introduction

We are getting multiple results when we try Alarm search with apmgw endpoint.

curl  -s 'Connection: keep-alive'  -H 'accept: application/json'   -H 'authorization:  Bearer eyJ0a24iOiIwODk5ZDI0MC03YzXXXXXXXXXXXXXXXXXXXXXXXJkMmQ4ZjcXXXXXXXXXXXXXXXXXXXXXXXXXXXXXdWV9'  -H 'content-type: application/json' 'https://apmgw.dxi-na1.saas.broadcom.com:443/oipublic/aoanalytics/alarms/alarms_all/_search?q=(alarm_unique_id:2443541.dxi-na1.saas.broadcom.com-ab7843a351-DFHSJd-430b-a852-1056bb258f20-Custom%20Metric%20Host%20%28Virtual%29)' | jq .
{
  "took": 2066,
  "timed_out": false,
  "_shards": {
    "total": 35,
    "successful": 35,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 3427,
      "relation": "eq"
    },
    "max_score": 19.902037,
    "hits": [
 

Environment

Release : 20.2

Component : CA DOI ALARM ANALYTICS

Resolution

Example Alarm ID from the OI UI:

2534541.dxi-na1.saas.broadcom.com-aefsf351-077d-430b-a852-105fesf58f20-Custom Metric Host (Virtual)

Test the query with following command

curl  -s 'Connection: keep-alive'  -H 'accept: application/json'   -H 'authorization:  Bearer eyJ0a24iOiIwODk5ZDI0MC03YXXXXXXXXXXXXXXXXXXXXwODkiLCJhXCXXXXXXXXXXXXWV9' -H 'content-type: application/json' 'https://apmgw.dxi-na1.saas.broadcom.com:443/oipublic/aoanalytics/alarms/alarms_all/_search?q=alarm_unique_id:%222534541.dxi-na1.saas.broadcom.com-aefsf351-077d-430b-a852-105fesf58f20-Custom%20Metric%20Host%20%28Virtual%29%22'