Alarm policy management endpoints in the REST API
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
Run APIs to create, update, enable, disable, delete, and search for alarm policies.
Alarm policy management
Use REST APIs to create, update, enable, disable, and delete alarm policies.
POST alarm_policies
Create an alarm policy
Authorization: Bearer <JWT_token>
For instructions on obtaining the JWT token, see Access and authentication for the REST API.
Parameter details
Parameter Name | Value Type | Mandatory | Description | Located in | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
policyName | String | Yes | The policy name. Any unique value is a valid value. | Body | ||||||||||||||
description | String | No | The policy description. Any value is a valid value. | Body | ||||||||||||||
executionOrder | Integer | Yes | The policy precedence. Values between 0-9999 are valid values. | Body | ||||||||||||||
enabled | Boolean | No | Indicates whether the policy is enabled or disabled. The following values are valid:
By default, the policy is disabled. | Body | ||||||||||||||
entityTypeId | String | Yes | The monitor type. | Body | ||||||||||||||
metricId | String | Yes | The attribute name. | Body | ||||||||||||||
label | String | Yes | The display name of an attribute. | Body | ||||||||||||||
unit | String | Yes | The unit of measurement. | Body | ||||||||||||||
path | String | Yes | The full path of attributes. | Body | ||||||||||||||
order | Integer | Yes | The order of the metric. Valid values are 0 and above. | Body | ||||||||||||||
comparison | String | Yes | The comparison operator. The following values are valid:
| Body | ||||||||||||||
threshold | Integer | Yes | The threshold value for the policy. An integer is a valid value. | Body | ||||||||||||||
duration | Integer | Yes | The duration in minutes. A positive integer from 0 to 9999. If you specify a value for duration, the numPolls value must be set to -1. | Body | ||||||||||||||
numPolls | Integer | Yes | The number of polls. A positive integer from 1 to 99. If you specify a value for numPolls, the duration value must be set to -1. | Body | ||||||||||||||
severity | String | Yes | The severity of the alarm. The following values are valid:
| Body | ||||||||||||||
autoClose | Boolean | Yes | The auto-close for the alarm. The following values are valid:
| Body | ||||||||||||||
configOrder | Integer | Yes | Metric value within the instance. Valid values are 0-2. | Body | ||||||||||||||
type | String | Yes | The policy type. The following types are valid:
| Body | ||||||||||||||
evaluationCriteria | String | Yes | The selection criteria for the policy. The following logical operators are valid:
Refer to the following table to understand the operators that can be used for each field:
| Body |
Request body
"entityThresholds":[
{
"metricDetails":{
"entityTypeId":"String",
"metricId":"String",
"label":"String",
"unit":"String",
"path":"String"
},
"order":Integer,
"alarmConfigurations":[
{
"condition":{
"comparison":"String",
"threshold":"String",
"duration":Integer,
"numPolls":Integer,
"baseline":Boolean
},
"action":{
"severity":"String",
"autoClose":Boolean
},
"configOrder":Integer
}
],
"type":"String",
"evaluationCriteria":"String"
}
],
"enabled":Boolean,
"policyName":"String",
"description":"String",
"executionOrder":Integer
}
Example request body
Example 1: Static threshold condition
"entityThresholds": [
{
"metricDetails": {
"entityTypeId": "IAK_CPU",
"metricId": "Utilization",
"label": "Utilization",
"unit": "%",
"path": "iak/1.1.31/IAK_CPU/Utilization"
},
"order": 0,
"alarmConfigurations": [
{
"condition": {
"comparison": "below",
"baseline": false,
"threshold": 10,
"duration": -1,
"numPolls": 10
},
"action": {
"severity": "MINOR",
"autoClose": true,
"closeDuration": -1
},
"configOrder": 0
}
],
"type": "ALL",
"evaluationCriteria": ""
}
],
"enabled": false,
"policyName": "Threshold violation by using poll count",
"description": "Metric violates the threshold for the specified poll count",
"executionOrder": 9999
}
Example 2: Baseline threshold condition
"entityThresholds": [
{
"metricDetails": {
"entityTypeId": "IAK_CPU",
"metricId": "Utilization",
"label": "Utilization",
"unit": "%",
"path": "iak/1.1.31/IAK_CPU/Utilization"
},
"order": 0,
"alarmConfigurations": [
{
"condition": {
"baseline": true,
"duration": 5,
"numPolls": -1
},
"action": {
"severity": "MAJOR"
},
"configOrder": 0
}
],
"type": "MULTI",
"evaluationCriteria": "( agent_host_name starts-with 'clm-pun-' ) AND ( agent_os contains 'Windows' ) "
}
],
"enabled": true,
"policyName": "Baseline violation",
"description": "Metric violates the baseline value",
"executionOrder": 9999
}
Example 3: Invalid values for the duration and polls
"entityThresholds": [
{
"metricDetails": {
"entityTypeId": "NUK_CPU",
"metricId": "Utilization",
"unit": "%",
"label": "Utilization",
"path": "nuk/22.4.12/NUK_CPU/Utilization"
},
"order": 1,
"alarmConfigurations": [
{
"condition": {
"comparison": "above",
"threshold": 0,
"duration": -1,
"numPolls": -1
},
"action": {
"severity": "MINOR",
"autoClose": false
},
"configOrder": 0
}
],
"type": "ALL",
"evaluationCriteria": ""
}
],
"policyName": "TestAlarmPolicy",
"description": "Alarm policy for Duration with Precedence value 5",
"executionOrder": 5,
"enabled": false
}
Example 4: Duplicate configurations within the same policy
"entityThresholds": [
{
"metricDetails": {
"entityTypeId": "NUK_Process",
"metricId": "ProcessCpuUsage",
"unit": "%",
"label": "CPU Used By Monitored Process",
"path": "nuk/22.4.11/NUK_Process/ProcessCpuUsage"
},
"order": 0,
"alarmConfigurations": [
{
"condition": {
"comparison": "below",
"threshold": 2,
"duration": -1,
"numPolls": 5
},
"action": {
"severity": "CRITICAL",
"autoClose": false
},
"configOrder": 0
},
{
"condition": {
"comparison": "above",
"threshold": 2,
"duration": -1,
"numPolls": 10
},
"action": {
"severity": "CRITICAL",
"autoClose": false
},
"configOrder": 1
}
],
"type": "ALL",
"evaluationCriteria": ""
}
],
"policyName": "mh_public_api_test",
"description": "Duplicate configurations within the same policy",
"executionOrder": 9999,
"enabled": true
}
Successful response
"statusCode": "200",
"resourceId": [
"64701389-49a4-47fa-a0c3-808bfb82d5d6"
]
}
Unsuccessful responses
Scenario 1
There must be exactly one space character on each side of the following elements:
• Operator
• Parenthesis
Scenario 2
"statusCode": "POLICY_ALREADY_EXIST",
"resourceId": null
}
Scenario 3: You specify invalid values for duration and polls simultaneously
Scenario 4: You specify a configuration that already exists in the same policy
The endpoint returns this response if you specify the same severity in different configurations for the same metric within a policy.
"statusCode": "WITHIN_POLICY_DUPLICATE_CONFIG_EXIST",
"resourceId": null
}
PUT alarm_policies/<policy ID>
Important
To update an existing policy, make sure that you send the entire policy detail request payload with the required values.
This update replaces the existing policy definition similar to overwriting changes in a file.
Update an alarm policy
Authorization: Bearer <JWT_token>
For instructions on obtaining the JWT token, see Access and authentication for the REST API.
Parameter details
Parameter Name | Value Type | Mandatory | Description | Located in | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
policyName | String | Yes | The policy name. Any unique value is a valid value. | Body | ||||||||||||||
description | String | No | The policy description. Any value is a valid value. | Body | ||||||||||||||
executionOrder | Integer | Yes | The policy precedence. Values between 0-9999 are valid values. | Body | ||||||||||||||
enabled | Boolean | No | Indicates whether the policy is enabled or disabled. The following values are valid:
By default, the policy is disabled. | Body | ||||||||||||||
entityTypeId | String | Yes | The monitor type. | Body | ||||||||||||||
metricId | String | Yes | The attribute name. | Body | ||||||||||||||
label | String | Yes | The display name of an attribute. | Body | ||||||||||||||
unit | String | Yes | The unit of measurement. | Body | ||||||||||||||
path | String | Yes | The full path of attributes. | Body | ||||||||||||||
order | Integer | Yes | The order of the metric. Valid values are 0 and above. | Body | ||||||||||||||
comparison | String | Yes | The comparison operator. The following values are valid:
| Body | ||||||||||||||
threshold | Integer | Yes | The threshold value for the policy. An integer is a valid value. | Body | ||||||||||||||
duration | Integer | Yes | The duration in minutes. A positive integer from 0 to 9999. If you specify a value for duration, the numPolls value must be set to -1. | Body | ||||||||||||||
numPolls | Integer | Yes | The number of polls. A positive integer from 1 to 99. If you specify a value for numPolls, the duration value must be set to -1. | Body | ||||||||||||||
severity | String | Yes | The severity of the alarm. The following values are valid:
| Body | ||||||||||||||
autoClose | Boolean | Yes | The auto-close for the alarm. The following values are valid:
| Body | ||||||||||||||
configOrder | Integer | Yes | Metric value within the instance. Valid values are 0-2. | Body | ||||||||||||||
type | String | Yes | The policy type. The following types are valid:
| Body | ||||||||||||||
evaluationCriteria | String | Yes | The selection criteria for the policy. The following logical operators are valid:
Refer to the following table to understand the operators that can be used for each field:
| Body |
Request body
"entityThresholds":[
{
"metricDetails":{
"entityTypeId":"String",
"metricId":"String",
"label":"String",
"unit":"String",
"path":"String"
},
"order":Integer,
"alarmConfigurations":[
{
"condition":{
"comparison":"String",
"threshold":"String",
"duration":Integer,
"numPolls":Integer,
"baseline":Boolean
},
"action":{
"severity":"String",
"autoClose":Boolean
},
"configOrder":Integer
}
],
"type":"String",
"evaluationCriteria":"String"
}
],
"enabled":Boolean,
"policyName":"String",
"description":"String",
"executionOrder":Integer
}
Example request body
Example 1: Static threshold condition
"id": "f835a4f5-116f-4282-b489-fcae7d46a913",
"policyName": "Test_Alarm_2",
"description": "Creating Alarm Policy",
"enabled": false,
"entityThresholds": [
{
"metricDetails": {
"entityTypeId": "IAK_WPAR",
"metricId": "UsedMemory",
"label": "Memory Used",
"unit": "MB",
"path": "iak/1.1.20/IAK_WPAR/UsedMemory"
},
"type": "MULTI",
"evaluationCriteria": "( agent_host_name starts-with 'clm-pun-' ) AND ( agent_os contains 'Windows' ) ",
"alarmConfigurations": [
{
"configId": "daf17a3b-0daa-4418-a8eb-efdb673cc4db",
"condition": {
"comparison": "above",
"threshold": 18,
"duration": -1,
"numPolls": 3,
"occurrence": 0,
"baseline": false
},
"action": {
"severity": "CRITICAL",
"autoClose": false
},
"configOrder": 0
}
],
"order": 0
}
],
"executionOrder": 9999
}
Example 2: Baseline threshold condition
"id": "d6155947-eb21-4797-b75b-1ffb41e83573",
"policyName": "Baseline violation",
"description": "Metric violates the baseline value",
"enabled": false,
"entityThresholds": [
{
"metricDetails": {
"entityTypeId": "NUK_CPU",
"metricId": "Utilization",
"label": "Utilization",
"unit": "%",
"path": "nuk/22.4.00/NUK_CPU/Utilization"
},
"type": "MULTI",
"evaluationCriteria": "( agent_host_name starts-with 'clm-pun-' ) AND ( agent_os contains 'Windows' ) ",
"alarmConfigurations": [
{
"configId": "d32c3620-4947-44c2-98ae-bb067ba94751",
"condition": {
"baseline": true,
"duration": 1
},
"action": {
"severity": "MINOR",
"autoClose": false,
"closeDuration": 0
},
"configOrder": 0
}
],
"order": 0
}
],
"executionOrder": 9999
}
Example 3: Add a metric to an existing policy
"id": "d6155947-eb21-4797-b75b-1ffb41e83573",
"policyName": "Service status and CPU usage",
"description": "Service status and CPU usage",
"enabled": false,
"entityThresholds": [
{
"metricDetails": {
"entityTypeId": "NT_SERVICES",
"metricId": "ServiceStatus",
"unit": "0 - Running, 1 - Ok not running, 2 - Warning not running, 3 - Alarm not running",
"label": "Service status",
"path": "psx_epd/20.05.11/NT_SERVICES/ServiceStatus"
},
"type": "MULTI",
"evaluationCriteria": "( agent_host_name string-equals 'clm-aus-vag88w' )",
"alarmConfigurations": [
{
"configId": "11a1590d-4d7d-4c4f-8f75-71fa2eb7ca09",
"condition": {
"comparison": "equal",
"threshold": 0,
"duration": 1,
"occurrence": 0,
"baseline": false
},
"action": {
"severity": "CRITICAL",
"autoClose": true,
"closeDuration": 0
},
"configOrder": 0
}
],
"order": 0
},
{
"metricDetails": {
"entityTypeId": "NUK_Process",
"metricId": "ProcessCpuUsage",
"unit": "%",
"label": "CPU used by monitored process",
"path": "nuk/22.4.11/NUK_Process/ProcessCpuUsage"
},
"type": "ALL",
"evaluationCriteria": "",
"alarmConfigurations": [
{
"configId": "b9b3c8f9-5976-4160-a602-9e0073fcc775",
"condition": {
"comparison": "above",
"threshold": 70,
"duration": 0,
"occurrence": 0,
"baseline": false
},
"action": {
"severity": "CRITICAL",
"autoClose": false,
"closeDuration": 0
},
"configOrder": 0
}
],
"order": 1
}
],
"executionOrder": 8655
}
Here, ProcessCpuUsage is the new metric that is added to the existing policy.
Successful response
"statusCode": "200",
"resourceId": [
"27391336-80e8-457c-ab6c-2ab0e27a2954"
]
}
Unsuccessful responses
Scenario 1: Policy does not exist
"statusCode": "POLICY_NOT_EXIST",
"resourceId": null
}
Scenario 2: Incorrect or invalid policy precedence
Scenario 3: The EntityTypeID parameter is empty
"statusCode": "500",
The EntityTypeId parameter cannot be empty or null.
}
Scenario 4: The EntityTypeID parameter is invalid
"statusCode": "500",
Invalid EntityTypeId.
}
Scenario 1: Invalid instance type
"statusCode": "500",
Invalid type : nIK3HXRc
}
POST alarm_policies/<policy ID>/enable
Enable an alarm policy
Authorization: Bearer <JWT_token>
For instructions on obtaining the JWT token, see Access and authentication for the REST API.
Parameter details
Parameter Name | Value Type | Mandatory | Description | Located in |
|---|---|---|---|---|
Policy Id | String | Yes | The identifier to enable a policy. Any unique value is a valid value. | Path |
Successful response
"statusCode":"200"
}
Unsuccessful responses
Scenario 1: Invalid policy ID
"statusCode":"500"
Invalid UUID string: 263927105892830
}
Scenario 2: Incorrect policy ID format
"statusCode":"500"
Error at index 9 in: "d38ccf559re7"
}
POST alarm_policies/<policy ID>/disable
Disable an alarm policy
Authorization: Bearer <JWT_token>
For instructions on obtaining the JWT token, see Access and authentication for the REST API.
Parameter details
Parameter Name | Value Type | Mandatory | Description | Located in |
|---|---|---|---|---|
Policy Id | String | Yes | The identifier to disable a policy. Any unique value is a valid value. | Path |
Successful response
"statusCode":"200"
}
Unsuccessful responses
Scenario 1: Invalid policy ID
"statusCode":"500"
Invalid UUID string: 263927105892830
}
Scenario 2: Incorrect policy ID format
"statusCode":"500"
Error at index 9 in: "d38ccf559re7"
}
DELETE alarm_policies/<policy ID>
Delete an alarm policy
Authorization: Bearer <JWT_token>
For instructions on obtaining the JWT token, see Access and authentication for the REST API.
Parameter details
Parameter Name | Value Type | Mandatory | Description | Located in |
|---|---|---|---|---|
Policy Id | String | Yes | The identifier to delete a policy. Any unique value is a valid value. | Path |
Successful response
"statusCode":"200",
"customMsg":"[Deleted policies.]"
}
Unsuccessful responses
Scenario 1: Incorrect policy ID
"statusCode": "500"
}
Scenario 1: Invalid policy ID
"statusCode": "404"
}
Alarm policy search
You can search for alarm policies based on one of the following criterion:
- Policy ID
- Other criteria that you specify
Run the APIs in this section to search for alarm policies.
GET alarm_policies/<policy ID>
Search for an alarm policy based on the policy ID
Authorization: Bearer <JWT_token>
For instructions on obtaining the JWT token, see Access and authentication for the REST API.
Parameter details
Parameter Name | Value Type | Mandatory | Description | Located in |
|---|---|---|---|---|
ID | String | Yes | The policy ID. A unique string value is a valid value. | Path |
Successful response
Example 1: Response
"responseTimeStamp": 1613549398716,
"statusCode": "200",
"statusMsg": "policy list success",
"totalRecords": 1,
"policies": [
{
"tenantId": "1786266992",
"id": "a3328dc5-3c2a-420c-a3e4-8b895eca0b87",
"policyName": "Test_Alarm_1",
"description": "",
"enabled": false,
"owner": "admin",
"createdTime": 1613542081767,
"modifiedTime": 1613542081767,
"entityThresholds": [
{
"metricDetails": {
"entityTypeId": "IAK_WPAR",
"metricId": "CPUUtilization",
"unit": "%",
"label": "CPU Utilization",
"path": "iak/1.1.20/IAK_WPAR/CPUUtilization"
},
"type": "MULTI",
"evaluationCriteria": "agent_os contains 'AIX' ",
"alarmConfigurations": [
{
"configId": "06177e2f-0a9d-482b-8fe3-35eec9adeef2",
"condition": {
"comparison": "above",
"threshold": 19,
"duration": 10,
"occurrence": 0,
"baseline": false
},
"action": {
"severity": "CRITICAL",
"autoClose": true,
"closeDuration": -1
},
"configOrder": 0
}
],
"order": 0
}
],
"executionOrder": 9999
}
]
}
Example 2: Response
"responseTimeStamp": 1613549398716,
"statusCode": "200",
"statusMsg": "policy list success",
"totalRecords": 1,
"policies": [
{
"tenantId": "1786266992",
"id": "d6155947-eb21-4797-b75b-1ffb41e83573",
"policyName": "Baseline violation",
"description": "Metric violates the baseline value",
"enabled": false,
"owner": "admin",
"createdTime": 1613542081767,
"modifiedTime": 1613542081767,
"entityThresholds": [
{
"metricDetails": {
"entityTypeId": "NUK_CPU",
"metricId": "Utilization",
"unit": "%",
"label": "Utilization",
"path": "nuk/22.4.00/NUK_CPU/Utilization"
},
"type": "MULTI",
"evaluationCriteria": "( agent_host_name starts-with 'clm-pun-' ) AND ( agent_os contains 'Windows' ) ",
"alarmConfigurations": [
{
"configId": "d32c3620-4947-44c2-98ae-bb067ba94751",
"condition": {
"baseline": true,
"duration": 1
},
"action": {
"severity": "MINOR",
"autoClose": false,
"closeDuration": 0
},
"configOrder": 0
}
],
"order": 0
}
],
"executionOrder": 9999
}
]
}
POST alarm_policies/search
Search for an alarm policy based on specified criteria
Authorization: Bearer <JWT_token>
For instructions on obtaining the JWT token, see Access and authentication for the REST API.
Parameter details
Parameter Name | Value Type | Mandatory | Description | Located in |
|---|---|---|---|---|
searchString | String | No | The value that you specify for the search. The policy name is a valid value. | Body |
attribute | String | No | The criteria to sort policies. Valid values:
| Body |
order | String | No | The ascending or descending order to sort policies. Valid values:
| Body |
Request body
"searchString":"String",
"sortCriteria":{
"attribute":"String",
"order":"String"
}
}
Example request body
"searchString": "PATROL Knowledge Module for Linux",
"sortCriteria": {
"attribute": "modifiedTime",
"order": "DESC"
}
}
Successful response
"statusCode": "200",
"totalRecords": 1,
"policies": [
{
"tenantId": "1877651219",
"id": "6d87d1b0-ba46-4a60-a35d-3c6cd84f1fd2",
"policyName": "PATROL Knowledge Module for Linux",
"description": "Global threshold configuration policy for Collection status(Disks), Collection status(File Systems), FileSystem Mount Status(File System), Process Count Check(Process), Process Ownership Check(Process), Parent PID is 1(Process). ",
"enabled": true,
"owner": "admin",
"createdTime": 1664271514462,
"modifiedTime": 1694685867428,
"executionOrder": 9999,
"entityThresholds": [
{
"metricDetails": {
"entityTypeId": "NUK_Disk_Container",
"metricId": "_CollectionStatus",
"unit": "1 - OK, 2 - Not OK",
"label": "Collection status",
"path": "nuk/22.4.11/NUK_Disk_Container/_CollectionStatus"
},
"type": "ALL",
"evaluationCriteria": "",
"alarmConfigurations": [
{
"configId": "5b81b51f-f18c-4861-9909-c72de3915319",
"condition": {
"comparison": "equal",
"threshold": 2,
"duration": 5,
"occurrence": 0,
"baseline": false
},
"action": {
"severity": "CRITICAL",
"autoClose": true,
"closeDuration": -1
},
"configOrder": 0
}
],
"order": 0
},
{
"metricDetails": {
"entityTypeId": "NUK_FileSystem_Container",
"metricId": "_CollectionStatus",
"unit": "1 - OK, 2 - Not OK",
"label": "Collection status",
"path": "nuk/22.4.11/NUK_FileSystem_Container/_CollectionStatus"
},
"type": "ALL",
"evaluationCriteria": "",
"alarmConfigurations": [
{
"configId": "e5f025ff-610c-4cf7-b5ed-2072e2e1db52",
"condition": {
"comparison": "equal",
"threshold": 2,
"duration": 5,
"occurrence": 0,
"baseline": false
},
"action": {
"severity": "CRITICAL",
"autoClose": true,
"closeDuration": -1
},
"configOrder": 0
}
],
"order": 1
},
{
"metricDetails": {
"entityTypeId": "NUK_FileSystem",
"metricId": "MountStatus",
"unit": "0 - OK, 1 - Unmounted, 2 - Unknown",
"label": "Filesystem mount status",
"path": "nuk/22.4.11/NUK_FileSystem/MountStatus"
},
"type": "ALL",
"evaluationCriteria": "",
"alarmConfigurations": [
{
"configId": "348ea3b6-1b02-4217-9d1d-82b9a8d7a8dc",
"condition": {
"comparison": "equal",
"threshold": 1,
"duration": 5,
"occurrence": 0,
"baseline": false
},
"action": {
"severity": "CRITICAL",
"autoClose": true,
"closeDuration": -1
},
"configOrder": 0
}
],
"order": 2
},
{
"metricDetails": {
"entityTypeId": "NUK_Process",
"metricId": "ProcessCountCheck",
"unit": "0 - OK, 1 - Warning, 2 - Alarm",
"label": "Process count check",
"path": "nuk/22.4.11/NUK_Process/ProcessCountCheck"
},
"type": "ALL",
"evaluationCriteria": "",
"alarmConfigurations": [
{
"configId": "0579bbc3-736a-405a-8cd4-867fb610c4f5",
"condition": {
"comparison": "equal",
"threshold": 2,
"duration": 5,
"occurrence": 0,
"baseline": false
},
"action": {
"severity": "CRITICAL",
"autoClose": true,
"closeDuration": -1
},
"configOrder": 0
}
],
"order": 3
},
{
"metricDetails": {
"entityTypeId": "NUK_Process",
"metricId": "ProcessOwnerCheck",
"unit": "0 - OK, 1 - Warning, 2 - Alarm",
"label": "Process ownership check",
"path": "nuk/22.4.11/NUK_Process/ProcessOwnerCheck"
},
"type": "ALL",
"evaluationCriteria": "",
"alarmConfigurations": [
{
"configId": "b390e582-5fa8-40d7-aed2-680440b2bf9b",
"condition": {
"comparison": "equal",
"threshold": 2,
"duration": 5,
"occurrence": 0,
"baseline": false
},
"action": {
"severity": "CRITICAL",
"autoClose": true,
"closeDuration": -1
},
"configOrder": 0
}
],
"order": 4
},
{
"metricDetails": {
"entityTypeId": "NUK_Process",
"metricId": "ProcessParentPID1",
"unit": "0 - OK, 1 - Warning, 2 - Alarm",
"label": "Parent PID is 1",
"path": "nuk/22.4.11/NUK_Process/ProcessParentPID1"
},
"type": "ALL",
"evaluationCriteria": "",
"alarmConfigurations": [
{
"configId": "6ca0a52a-c9f7-4746-944e-53c10f2bbe09",
"condition": {
"comparison": "equal",
"threshold": 2,
"duration": 5,
"occurrence": 0,
"baseline": false
},
"action": {
"severity": "CRITICAL",
"autoClose": true,
"closeDuration": -1
},
"configOrder": 0
}
],
"order": 5
}
]
}
]
}
Alarm policy export
Run the REST API endpoint in this section to export all alarm policy data.
GET export
Export all alarm policy data
Authorization: Bearer <JWT_token>
For instructions on obtaining the JWT token, see Access and authentication for the REST API.
Parameter details
Parameter Name | Value Type | Mandatory | Description | Located in |
|---|---|---|---|---|
TBD | TBD | Yes | The policy name. Any unique value is a valid value. | Body |
Status codes
HTTP status code | Description |
|---|---|
200 | Success The CSV data is returned. |
| 401 | Unauthorized access The token is invalid or missing. |
| 403 | Forbidden user The user does not have the permissions to view alarm policies |
| 429 | Too many requests Wait for some time and try again. |
| 500 | Internal server error There is a database or system error. Wait for some time and try again. |
| 503 | Service unavailable The database connection pool is exhausted. Wait for some time and try again. |
Request body
TBD
"entityThresholds":[
{
"metricDetails":{
"entityTypeId":"String",
"metricId":"String",
"label":"String",
"unit":"String",
"path":"String"
},
"order":Integer,
"alarmConfigurations":[
{
"condition":{
"comparison":"String",
"threshold":"String",
"duration":Integer,
"numPolls":Integer,
"baseline":Boolean
},
"action":{
"severity":"String",
"autoClose":Boolean
},
"configOrder":Integer
}
],
"type":"String",
"evaluationCriteria":"String"
}
],
"enabled":Boolean,
"policyName":"String",
"description":"String",
"executionOrder":Integer
}
Example request body
TBD
Example TBD
"entityThresholds": [
{
"metricDetails": {
"entityTypeId": "IAK_CPU",
"metricId": "Utilization",
"label": "Utilization",
"unit": "%",
"path": "iak/1.1.31/IAK_CPU/Utilization"
},
"order": 0,
"alarmConfigurations": [
{
"condition": {
"comparison": "below",
"baseline": false,
"threshold": 10,
"duration": -1,
"numPolls": 10
},
"action": {
"severity": "MINOR",
"autoClose": true,
"closeDuration": -1
},
"configOrder": 0
}
],
"type": "ALL",
"evaluationCriteria": ""
}
],
"enabled": false,
"policyName": "Threshold violation by using poll count",
"description": "Metric violates the threshold for the specified poll count",
"executionOrder": 9999
}
Successful response: TBD
"statusCode": "200",
"resourceId": [
"64701389-49a4-47fa-a0c3-808bfb82d5d6"
]
}
Unsuccessful responses
Scenario 1: TBD
There must be exactly one space character on each side of the following elements:
• Operator
• Parenthesis
Scenario 2: TBD
"statusCode": "POLICY_ALREADY_EXIST",
"resourceId": null
}