This documentation supports an earlier version of BMC Helix Operations Management.

To view the documentation for the latest version, select 23.2 from the Product version picker.

Managing baseline metrics in alarm policies with REST APIs

The following section provides a list of supported endpoints and an overview about running these endpoints. Before you run an endpoint, you must authenticate yourself. For more information, see  Access and authentication for the REST API Open link

Run APIs to get, update, and delete baseline metrics of algorithms in alarm policies.

Get baseline-enabled metrics of algorithms in alarm policies

You can get, update, and delete baseline-enabled metrics of algorithms in alarm policies.

Run the APIs in this section to get, update, and delete baseline metrics.


To get baseline metrics of all the available algorithms for a specific tenant

GET algorithms/metrics

This endpoint returns only metrics for which the baseline is enabled.

Request URL
https://<BMC Helix Portal URL>/aiops-config/api/v2.0/algorithms/metrics
Example request URL with optional parameters
https://test.bmc.com/aiops-config/api/v2.0/algorithms/metrics
Request Header
Content-Type: application/json
Authorization: Bearer <JWT_token>

For instructions on obtaining the JWT token, see Access and authentication for the REST API. Open link

Successful response

{
  "metrics": {
    "tdigest": [
      {
        "entityTypeId": "PSM_OpenVMS_TCP",
        "attributes": [
          {
            "attribute": "ConnectionsPassive",
            "instanceCount": 0
          },
          {
            "attribute": "ConnectionsActive",
            "instanceCount": 0
          }
        ]
      },
      {
        "entityTypeId": "PMW_SIB_COMM_MSGENG_STANDARD",
        "attributes": [
          {
            "attribute": "Errors",
            "instanceCount": 0
          }
        ]
      }
    ]
  }
}

The instanceCount parameter in the response will be used in the future.


To get baseline metrics for a specific algorithm for a specific tenant

GET algorithms/<algorithm_id>/metrics

This endpoint returns only metrics for which the baseline is enabled.

Request URL
https://<BMC Helix Portal URL>/aiops-config/api/v2.0/algorithms/<algorithm_id>/metrics
Example request URL with optional parameters
https://test.bmc.com/ /aiops-config/api/v2.0/algorithms/tdigest/metrics
Request Header
Content-Type: application/json
Authorization: JWT Token

Parameter details


Parameter NameValue TypeLocated inMandatoryDescription
algorithm_id
StringURLYes

Name of the algorithm.


Successful response

{
  "metrics": [
    {
      "entityTypeId": "NT_HEALTH",
      "attributes": [
        {
          "attribute": "MemoryUsage",
          "instanceCount": 0
        },
        {
          "attribute": "ProcessorUtilization",
          "instanceCount": 0
        }
      ]
    }
  ]
}

The instanceCount parameter in the response will be used in the future.


Update baseline metrics of algorithms in alarm policies

You can update the baseline metrics for a specific algorithm in alarm policies. 

Run the APIs in this section to update baseline metrics.


To update the baseline metrics for an algorithm of an alarm policy for a specific tenant

PUT algorithms/<algorithm_id>/metrics
Request URL
https://<BMC Helix Portal URL>/aiops-config/api/v2.0/algorithms/<algorithm_id>/metrics
Example request URL with optional parameters
https://test.bmc.com/aiops-config/api/v2.0/algorithms/tdigest/metrics
Request Header
Content-Type: application/json
Authorization: JWT Token

Parameter details


Parameter NameValue TypeLocated inMandatoryDescription
algorithm_id
StringURLYes

Name of the algorithm.

metricsObjectBodyYes

Combination of entity type IDs (data type: String) and list of attributes (data type: List of string).


Example request body

{
    "metrics": [
        {
            "entityTypeId": "NUK_CPU",
            "attributes": ["vmUtilization" ]
        },

       {
            "entityTypeId": "NUK_SMP",
            "attributes": ["vmUtilization","Utilization" ]
        }
    ]
}


Successful response

{
"metrics": [
     {
       "entityTypeId": "NUK_SMP",
       "baselineStatus": {
             "VmUtilization": "ALREADY_ENABLED",
             "Utilization": "ALREADY_ENABLED"
       }
   },
   {
      "entityTypeId": "NUK_CPU",
      "baselineStatus": {
      "vmUtilization": "ENABLED"
       }
    }
 ]
}


Delete baseline metrics for an algorithm in alarm policies

You can delete the baseline metrics for a given algorithm in alarm policies.

Run the APIs in this section to delete baseline metrics.


To delete the baseline metrics for an algorithm for a specific tenant

DELETE  algorithms/<algorithm_id>/metrics
Request URL
https://<BMC Helix Portal URL>/aiops-config/api/v2.0/algorithms/<algorithm_id>/metrics
Example request URL with optional parameters
https://test.bmc.com/aiops-config/api/v2.0/algorithms/tdigest/metrics
Request Header
Content-Type: application/json
Authorization: JWT Token

Parameter details


Parameter NameValue TypeLocated inMandatoryDescription
algorithm_id
StringURLYes

Name of the algorithm.

metricsObjectBodyYes

Combination of entity type IDs (data type: String) and list of attributes (data type: List of string).


Example request body

{
  "metrics": [
    {
      "entityTypeId": "NUK_CPU",
      "attributes": [
        "vmUtilization",
        "IdleTime"
      ]
    },
    {
      "entityTypeId": "NUK_SMP",
      "attributes": [
        "vmUtilization"
      ]
    }
  ]
}


Successful response

{
  "metrics": [
    {
      "entityTypeId": "NUK_SMP",
      "baselineStatus": {
        "VmUtilization": "DISABLED",
        "IdleTime": "NOT_EXIST"
      }
    },
    {
      "entityTypeId": "NUK_CPU",
      "baselineStatus": {
        "vmUtilization": "DISABLED"
      }
    }
  ]
} 
Was this page helpful? Yes No Submitting... Thank you

Comments