Managing alarms by using REST API


An alarm is a response to one or more related events. It is a notification sent by the Fault Management System (FMS) when a threshold is breached. You can create primary and secondary alarms by using REST API. Additionally, you can monitor the alarms by using the UI or REST API. The alarms are correlated from the FMS. Based on these alarms, the incidents are automatically created in Incident Management. 


Before you begin

To create and update alarms, you must have the required roles and permissions. For more information, see Roles-and-permissions.


To create a primary alarm by using REST API

To create a primary alarm

cURL example

https://<Innovation Suite server URL>/api/rx/application/record/recordinstance

Important

You cannot manually create a primary alarm.

Before you begin

Make sure that you have a valid authentication token. For more information, see Access-and-authentication-for-REST-API.

To create a primary alarm by using the REST API in the Postman client

  1. Open the Postman REST client.
  2. Set the request URL as:
    https://<Innovation Suite server URL>/api/rx/application/record/recordinstance
  3. Select POST as the operation.
  4. Select raw.
  5. From the list, select JSON.
  6. Enter the JSON input for creating a primary alarm.
    For example:

    {
     "resourceType": "com.bmc.arsys.rx.services.record.domain.RecordInstance",
     "recordDefinitionName": "com.bmc.dsm.netops-extensions:AM-Alarm",
     "fieldInstances": {
       "880004125": {
         "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
         "id": 880004125,
         "value":"1LLZ6BS"      // Alarmed object
       },
       "880004101": {
         "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
         "id": 880004101,
         "value": "new Alarm"     // Alarm Details
       },
       "880004106": {
         "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
         "id": 880004106,
         "value": 10     // Alarm Type
       },
       "880004114": {
         "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
         "id": 880004114,
         "value": "failure"     // Probable Cause
       },
       "880004111": {
         "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
         "id": 880004111,
         "value": 20     // Perceived Severity
       },
       "880004118":{
         "resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
         "id": 880004118,
         "value":"Netcool"     // Source System ID
       },
       "880004120" : {
         "resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
         "id": 880004120,
         "value":"Ack"     // State
       },
       "880004132" : {
         "resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
         "id": 880004132,
         "value":"2023-07-04T09:48:48Z"     // Alarm Raised Time
       }
     }
    }
  7. Click Send.
    When an incident or a primary alarm is created by using REST API, the payload provides the time when the alarm is first triggered as Alarm First Occurrence. If the payload does not provide this value, the system uses the current timestamp as the alarm time. This timestamp captures the event start time more accurately than the payload.


To create a secondary alarm by using REST API

To create a secondary alarm

cURL example

https://<Innovation Suite server URL>/api/rx/application/record/recordinstance

Important

You cannot manually create a secondary alarm.

Before you begin

Make sure that you have a valid authentication token. For more information, see Access-and-authentication-for-REST-API.

To create a secondary alarm by using the REST API in the Postman client

  1. Open the Postman REST client.
  2. Set the request URL as:
    https://<Innovation Suite server URL>/api/rx/application/record/recordinstance
  3. Select POST as the operation.
  4. Select raw.
  5. From the list, select JSON.
  6. Enter the JSON input for creating an alarm.
    For example:

    {
         "resourceType": "com.bmc.arsys.rx.services.record.domain.RecordInstance",
         "recordDefinitionName": "com.bmc.dsm.netops-extensions:AM-Alarm",
         "fieldInstances": {
           "880004125": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004125,
             "value": "254294101057672"     // Alarmed Object
           },
           "880004101": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004101,
             "value": "These are the alarm details"     // Alarm Details
           },
           "880004106": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004106,
             "value": 10     // Alarm Type
           },
           "880004114": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004114,
             "value": "Cause"     // Probable Cause
           },
           "880004111": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004111,
             "value": 20     // Perceived Severity
           },
           "880004118":{
             "resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004118,
             "value":"Netcool"     // Source System ID
           },
           "880004120" : {
             "resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004120,
             "value":"Ack"     // State
           },
              "880004104": {
         "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
         "id": 880004104,
         "value": 1688464128     // Alarm Raised Time
       },
               "880004126" : {
               "resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
               "id": 880004126,
               "value":"AGGG1P27J624TASIRBUNSIRBUNWOBN"     // Linked Request ID
           },
           "880004132" : {
             "resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004132,
             "value":"2023-07-04T09:48:48Z"     // Alarm Raised Time
           }
         }
    }
  7. Click Send.
    When an incident or a secondary alarm is created by using REST API, the payload provides the time when the alarm is first triggered as Alarm First Occurrence. If the payload does not provide this value, the system uses the current timestamp as the alarm time. This timestamp captures the event start time more accurately than the payload.


To update an alarm by using REST API

To update an alarm

cURL example

https://<Innovation Suite server URL>/api/rx/application/record/recordinstance/com.bmc.dsm.netops-extensions%3AAM-Alarm/<Alarm ID>

Important

You cannot manually update an alarm.

Before you begin

Make sure that you have a valid authentication token. For more information, see Access-and-authentication-for-REST-API.

To update an alarm by using the REST API in the Postman client

  1. Open the Postman REST client.
  2. Set the request URL as:
    https://<Innovation Suite server URL>/api/rx/application/record/recordinstance/com.bmc.dsm.netops-extensions%3AAM-Alarm/<Alarm ID>
  3. Select PUT as the operation.
  4. Select raw.
  5. From the list, select JSON.
  6. Enter the JSON input for creating an alarm.
    For example:

    {
     "id": "AGGG1P27J624TASIRBUNSIRBUNWOA9", //Alarm ID
     "resourceType": "com.bmc.arsys.rx.services.record.domain.RecordInstance",
      "recordDefinitionName": "com.bmc.dsm.netops-extensions:AM-Alarm",
      "fieldInstances": {
       "880004125": {
         "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
         "id": 880004125,
         "value": "1LLZ6BS",     // Alarmed Object
       },
          "880004111": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004111,
             "value": 60     // Perceived Severity
           },
            "880004131": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004131,
             "value": "2024-01-04T09:49:48Z"     // Alarm Cleared Time
           },
            "880004108": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004108,
             "value": "Test"     // System ID
           },
            "880004109": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004109,
             "value": "Test"     // User ID
           }
           
     }
    }
  7. Click Send.
    When an incident or a secondary alarm is created by using REST API, the payload provides the time when the alarm is first triggered as Alarm First Occurrence. If the payload does not provide this value, the system uses the current timestamp as the alarm time. This timestamp captures the event start time more accurately than the payload.


To clear alarms by changing the severity by using REST API

Incident Management defines the default alarm severity for each alarm, which is aligned with the TMF642 standard and the Alarm Resource specification

graphic on severity levels.png

After an alarm is triggered, it is defined within six severity levels. These severity levels represent service-affecting conditions ordered from the most severe to the least:

Severity

Description

Critical

Indicates that a service outage has occurred and that immediate corrective action is required.

Major

Indicates that a service affecting a condition has developed and an urgent corrective action is required.

Minor

Indicates the existence of a non service affecting fault condition and that a corrective action should be taken in order to prevent a more serious fault.

Warning

Indicates the detection of a potential or impending service affecting fault condition before any significant effects have occurred.

Intermediate

Indicates that the severity level cannot be determined.

Cleared

Indicates that alarms are resolved and the device has returned to normal operation.


To update the alarm severity by using REST API

You can add a new alarm to an existing incident, or a current alarm can be updated.

Before you begin

Make sure that you have a valid authentication token. For more information, see Access-and-authentication-for-REST-API.

To update the alarm severity in the Postman client

  1. Open the Postman REST client.
  2. Set the request URL as:
    https://<Innovation Suite server URL>/api/rx/application/record/recordinstance/com.bmc.dsm.netops-extensions%3AAM-Alarm/<Alarm ID>
  3. Select as PUT in the operation.
  4. Select raw.
  5. From the list, select JSON.
  6. Enter the JSON input.
    For example, update the following details in the payload to change the severity from Minor to Major:

    Fields

    Values needed to change the severity

    Description

    Referredtype

    alarm

    Denotes the targeted entity.

    Id

    xyz

    Indicates the incident ID that is being updated.

    Severity

    major

    Indicates the Severity value that is being updated.

    Request body to update the severity
      {
     "id": "AGGG1P27J624TASIRBUNSIRBUNWOA9", //Alarm ID
     "resourceType": "com.bmc.arsys.rx.services.record.domain.RecordInstance",
      "recordDefinitionName": "com.bmc.dsm.netops-extensions:AM-Alarm",
      "fieldInstances": {
       "880004125": {
         "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
         "id": 880004125,
         "value": "1LLZ6BS",     // Alarmed Object
       },
          "880004111": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004111,
             "value": 60     // Perceived Severity
           },
            "880004131": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004131,
             "value": "2024-01-04T09:49:48Z"     // Alarm Cleared Time
           },
            "880004108": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004108,
             "value": "Test"     // System ID
           },
            "880004109": {
             "resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
             "id": 880004109,
             "value": "Test"     // User ID
           }
           
     }
    }
  7. Click Send.
    After the alarm is added to the incident, the severity value can be updated manually or by using the API. For more information about changing the alarm severity by using UI, see Managing-incident-requests.

    When you change the alarm severity value in the response body to Cleared and if the work orders and impact records associated with the incident are resolved, the status of the incident automatically changes to Resolved.

    If the alarm severity is updated to any other value by using REST API, the status of the incident automatically changes to In Progress, unless the incident is in Resolved status.

 

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