Default language.

Alarm policy baseline metric management endpoints in the REST API


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
Get baseline metrics of all the available algorithms of an alarm policy for a specific tenant

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..

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
         }
        ]
     }
    ]
 }
}

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

GET algorithms/<algorithm_id>/metrics
Get baseline metrics for a specific algorithm of an alarm policy for a specific tenant

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

 

Successful response

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

 

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
Update the baseline metrics for an algorithm of an alarm policy for a specific tenant
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

 

Example request body

Example: Updating non third-party metric
{
 "metrics": [
   {
     "entityTypeId": "NUK_CPU",
     "attributes": [
       "vmUtilization"
      ]
   },
   {
     "entityTypeId": "NUK_SMP",
     "attributes": [
       "vmUtilization",
       "Utilization"
      ]
   }
  ]
}
Example: Updating third-party metric
{
 "metrics": [
   {
     "entityTypeId": "AppDynamics_Overall_Application_Performance",
     "isThirdparty": "true",
     "attributes": [
       "Freed-Objects__MB_"
      ]
   }
  ]
}

Successful response

Response: Non third-party metric
{
 "metrics": [
   {
     "entityTypeId": "NUK_SMP",
     "baselineStatus": {
       "VmUtilization": "ALREADY_ENABLED",
       "Utilization": "ALREADY_ENABLED"
     }
   },
   {
     "entityTypeId": "NUK_CPU",
     "baselineStatus": {
       "vmUtilization": "ENABLED"
     }
   }
  ]
}
Response: Third-party metric
{
 "metrics": [
   {
     "entityTypeId": "AppDynamics_Overall_Application_Performance",
     "baselineStatus": {
       "Freed-Objects__MB_": "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
Delete the baseline metrics for an algorithm for a specific tenant
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

 

Example request body

Example: Deleting non third-party metric
{
 "metrics": [
   {
     "entityTypeId": "NUK_CPU",
     "attributes": [
       "vmUtilization",
       "IdleTime"
      ]
   },
   {
     "entityTypeId": "NUK_SMP",
     "attributes": [
       "vmUtilization"
      ]
   }
  ]
}
Example: Deleting third-party metric
{
 "metrics": [
   {
     "entityTypeId": "AppDynamics_Overall_Application_Performance",
     "isThirdparty": "true",
     "attributes": [
       "Freed-Objects__MB_"
      ]
   }
  ]
}

Successful response

Response: Non third-party metric
{
 "metrics": [
   {
     "entityTypeId": "NUK_SMP",
     "baselineStatus": {
       "VmUtilization": "DISABLED",
       "IdleTime": "NOT_EXIST"
     }
   },
   {
     "entityTypeId": "NUK_CPU",
     "baselineStatus": {
       "vmUtilization": "DISABLED"
     }
   }
  ]
}
Response: Third-party metric
{
 "metrics": [
   {
     "entityTypeId": "AppDynamics_Overall_Application_Performance",
     "baselineStatus": {
       "Freed-Objects__MB_": "DISABLED"
     }
   }
  ]
}

 

Configure weekends for calculating the daily baseline

You can configure weekends for calculating the daily baseline.

Run the APIs in this section to configure weekends.

To create the weekend configuration

POST  global-configuration/weekends URL
Create the weekend configuration
Request URL
https://<BMC Helix Portal URL>/aiops-config/api/v1.0/global-configuration
Example request URL with optional parameters
https://test.bmc.com/aiops-config/api/v1.0/global-configuration
Request Header
Content-Type: application/json
Authorization: JWT Token

Parameter details

 

Example request body

Example: Creating the weekend configuration
{
   "name": "weekends",
   "description": "weekends configuration",
   "configuration": "{\"weekends\":[\"THURSDAY\"]}",
   "enable": true
}

Successful response

Response: Creating the weekend configuration
{
 "resourceId": "weekends",
 "statusCode": 200,
 "statusMsg": "weekends Global configuration created successfully."
}

To update the weekend configuration

PUT  global-configuration/weekends URL
Update the weekend configuration
Request URL
https://<BMC Helix Portal URL>/aiops-config/api/v1.0/global-configuration/weekends
Example request URL with optional parameters
https://test.bmc.com/aiops-config/api/v1.0/global-configuration/weekends
Request Header
Content-Type: application/json
Authorization: JWT Token

Parameter details

 

Example request body

Example: Updating the weekend configuration
{
   "name": "weekends",
   "description": "weekends configuration",
   "configuration": "{\"weekends\":[\"FRIDAY\"]}",
   "enable": true
}

Successful response

Response: Updating the weekend configuration
{
 "resourceId": "weekends",
 "statusCode": 200,
 "statusMsg": "weekends configuration updated successfully."
}

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*