The Alert Management sub-service of Application Real-Time Monitoring Service (ARMS) can send an alert event to your EventBridge event bus when an alert is triggered, claimed, commented on, or cleared. You can consume EventBridge events to connect to a third-party platform. This allows you to implement automated remediation or ticketing system integration. This topic describes how to send ARMS alert events to your EventBridge event bus.

Background information

EventBridge is a serverless event bus service that is provided by Alibaba Cloud. You can connect Alibaba Cloud services, custom applications, and software as a service (SaaS) applications to EventBridge in a standardized and centralized manner. You can use EventBridge to route events among the preceding applications based on the standardized CloudEvents 1.0 protocol. You can also use EventBridge to build loosely coupled and distributed event-driven architectures. For more information, see What is EventBridge?

Step 1: Create EventBridge resources

  1. Create an EventBridge event bus. For more information, see Manage custom event buses.
    After you create an event bus, obtain the public endpoint of the event bus on the Event Bus Overview page. Event Bus public endpoint
  2. Add a custom event source. For more information, see Manage custom event sources.
    Custom event sources

Step 2: Configure the EventBridge integration in ARMS

  1. Log on to the ARMS console. In the left-side navigation pane, choose Alert Management > Integrations.
  2. On the Integrations page, click the Notification Integration tab and then click EventBridge.
  3. In the Add Integration dialog box, set the parameters and click Save. The following table describes the parameters.
    Parameter Description
    Name The name of the custom integration. Example: EventBridge integration.
    Description Optional. The description of the custom integration.
    Endpoint The public endpoint that you obtained in Step 1.
    AccessKey The AccessKey ID of your Alibaba Cloud account. For more information, see Obtain an AccessKey pair.
    AccessKey Secret The AccessKey secret of your Alibaba Cloud account. For more information, see Obtain an AccessKey pair.
    Message Bus Name The name of the event bus that you created in Step 1. Example: armstest.
    regionId The ID of the region where the event bus that you created in Step 1 resides. Example: cn-hangzhou.
    Event Source Name The name of the event source that you created in Step 1. Example: arms.

Step 3: Configure a notification policy

When you configure a notification policy, select the EventBridge integration that you created in the previous step in the Ticket System field. For more information, see Create and manage a notification policy.

Step 4: View alert events in the EventBridge console

Log on to the EventBridge console to view alert events. For more information, see Query events.

Event Code Event
aliyun:arms:alarm:create Trigger an alert:
aliyun:arms:alarm:claim Claim an alert:
aliyun:arms:alarm:comment Comment on an alert:
aliyun:arms:alarm:close Clear an alert:
Click Event Detail in the Actions column to view the parameters of the event. The following examples show the formats of the preceding alert events:
  • Trigger an alert:
    {
        "datacontenttype": "application/json",
        "aliyunaccountid": "11xxxxxxxxxxx",
        "data": {
            "owner": "xx",  // The owner of the alert. Set the value to the contact that is specified in the notification policy.
            "data": {        // The content of the alert. The alert content is compatible with the event format of the open source Alertmanager. For more information, see the official documentation of Prometheus (https://prometheus.io/docs/alerting/latest/configuration/?spm=a2c4g.11186623.0.0.179176a6M4TIb5#webhook_config).
                "alerts": [
                    {
                        "fingerprint": "9b115ab3762a47b51a8efcb516d4aa50",
                        "annotations": {
                            "message": "Manually triggered test alert"
                        },
                        "startsAt": "2022-06-07T09:22:01.645000000Z",
                        "endsAt": "2022-06-07T09:27:39.099000000Z",
                        "labels": {
                            "severity": "error",
                            "regionId": "cn-hangzhou",
                            "_aliyun_arms_denoise_code": "0",
                            "_aliyun_arms_integration_name": "Custom integration",
                            "alertname": "Manually triggered alert",
                            "_aliyun_arms_product_type": "CUSTOM",
                            "_aliyun_arms_userid": "11xxxxxxxxxxx",
                            "_aliyun_arms_integration_id": "616",
                            "_aliyun_arms_is_denoise_filtered": "false"
                        },
                        "status": "firing"
                    }
                ],
                "commonLabels": {
                    "severity": "error",
                    "regionId": "cn-hangzhou",
                    "_aliyun_arms_denoise_code": "0",
                    "_aliyun_arms_integration_name": "Custom integration",
                    "alertname": "Manually triggered alert",
                    "_aliyun_arms_product_type": "CUSTOM",
                    "_aliyun_arms_userid": "11xxxxxxxxxxx",
                    "_aliyun_arms_integration_id": "616",
                    "_aliyun_arms_is_denoise_filtered": "false"
                },
                "externalURL": "https://arms.console.aliyun.com/#/alarm/alert/detail/12345",
                "groupLabels": {
                    "alertname": "Manually triggered alert",
                },
                "receiver": "",
                "level": "P2",
                "dispatchRuleName": "O & M team",
                "startTime": "2022-06-07 17:22:01",
                "commonAnnotations": {
                    "message": "Manually triggered test alert"
                },
                "status": "firing"
            },
            "timestamp": 1654593783951
        },
        "subject": "https://arms.console.aliyun.com/#/alarm/alert/detail/12345", // The globally unique URL of the alert.
        "aliyunoriginalaccountid": "11xxxxxxxxxxx",
        "source": "arms",
        "type": "aliyun:arms:alarm:create",
        "aliyunpublishtime": "2022-06-07T09:23:04.003Z",
        "specversion": "1.0",
        "aliyuneventbusname": "armstest",
        "id": "d997f8c775d4d15b05f3346d5863fdc6******_create",
        "aliyunregionid": "cn-hangzhou",
        "aliyunpublishaddr": "xx.xx.xx.xx"
    }
  • Claim an alert:
    {
        "datacontenttype": "application/json",
        "aliyunaccountid": "11xxxxxxxxxxx",
        "data": {
            "owner": "xx", // The owner of the alert.
            "handler": "xx", // The handler of the alert.
            "data": { // The content of the alert. The alert content is compatible with the event format of the open source Alertmanager. For more information, see the official documentation of Prometheus (https://prometheus.io/docs/alerting/latest/configuration/?spm=a2c4g.11186623.0.0.179176a6M4TIb5#webhook_config).
                "alerts": [
                    {
                        "fingerprint": "9b115ab3762a47b51a8efcb516d4aa50",
                        "annotations": {
                            "message": "Manually triggered test alert"
                        },
                        "startsAt": "2022-06-07T09:20:43.780000000Z",
                        "endsAt": "2022-06-07T09:25:43.780000000Z",
                        "labels": {
                            "severity": "error",
                            "regionId": "cn-hangzhou",
                            "_aliyun_arms_denoise_code": "0",
                            "_aliyun_arms_integration_name": "Custom integration",
                            "alertname": "Manually triggered alert",
                            "_aliyun_arms_product_type": "CUSTOM",
                            "_aliyun_arms_userid": "11xxxxxxxxxxx",
                            "_aliyun_arms_integration_id": "616",
                            "_aliyun_arms_is_denoise_filtered": "false"
                        },
                        "status": "firing"
                    }
                ],
                "commonLabels": {
                    "severity": "error",
                    "regionId": "cn-hangzhou",
                    "_aliyun_arms_denoise_code": "0",
                    "_aliyun_arms_integration_name": "Custom integration",
                    "alertname": "Manually triggered alert",
                    "_aliyun_arms_product_type": "CUSTOM",
                    "_aliyun_arms_userid": "11xxxxxxxxxxx",
                    "_aliyun_arms_integration_id": "616",
                    "_aliyun_arms_is_denoise_filtered": "false"
                },
                "externalURL": "https://arms.console.aliyun.com/#/alarm/alert/detail/12345",
                "groupLabels": {
                    "alertname": "Manually triggered alert",
                },
                "receiver": "",
                "level": "P2",
                "dispatchRuleName": "O & M team",
                "startTime": "2022-06-07 17:20:43",
                "commonAnnotations": {
                    "message": "Manually triggered test alert"
                },
                "status": "firing"
            },
            "operator": "xx", // The operator of the alert.
            "timestamp": 1654593717195
        },
        "subject": "https://arms.console.aliyun.com/#/alarm/alert/detail/12345",
        "aliyunoriginalaccountid": "11xxxxxxxxxxx",
        "source": "arms",
        "type": "aliyun:arms:alarm:claim",
        "aliyunpublishtime": "2022-06-07T09:21:57.362Z",
        "specversion": "1.0",
        "aliyuneventbusname": "armstest",
        "id": "59e174db-f843-473a-9d3e-df3421******",
        "aliyunregionid": "cn-hangzhou",
        "aliyunpublishaddr": "118.31.XX.XX"
    }
  • Comment on an alert:
    {
        "datacontenttype": "application/json",
        "aliyunaccountid": "11xxxxxxxxxxx",
        "data": {
            "owner": "xx", // The owner of the alert.
            "handler": "xx", // The handler of the alert.
            "data": {  // The content of the alert. The alert content is compatible with the event format of the open source Alertmanager. For more information, see the official documentation of Prometheus (https://prometheus.io/docs/alerting/latest/configuration/?spm=a2c4g.11186623.0.0.179176a6M4TIb5#webhook_config).
                "alerts": [
                    {
                        "fingerprint": "9b115ab3762a47b51a8efcb516d4aa50",
                        "annotations": {
                            "message": "Manually triggered test alert"
                        },
                        "startsAt": "2022-06-07T09:20:44.000000000Z",
                        "endsAt": "2022-06-07T09:22:00.000000000Z",
                        "labels": {
                            "severity": "error",
                            "regionId": "cn-hangzhou",
                            "_aliyun_arms_denoise_code": "0",
                            "_aliyun_arms_integration_name": "Custom integration",
                            "alertname": "Manually triggered alert",
                            "_aliyun_arms_product_type": "CUSTOM",
                            "_aliyun_arms_userid": "11xxxxxxxxxxx",
                            "_aliyun_arms_integration_id": "616",
                            "_aliyun_arms_is_denoise_filtered": "false"
                        },
                        "status": "resolved"
                    }
                ],
                "commonLabels": {
                    "severity": "error",
                    "regionId": "cn-hangzhou",
                    "_aliyun_arms_denoise_code": "0",
                    "_aliyun_arms_integration_name": "Custom integration",
                    "alertname": "Manually triggered alert",
                    "_aliyun_arms_product_type": "CUSTOM",
                    "_aliyun_arms_userid": "11xxxxxxxxxxx",
                    "_aliyun_arms_integration_id": "616",
                    "_aliyun_arms_is_denoise_filtered": "false"
                },
                "externalURL": "https://arms.console.aliyun.com/#/alarm/alert/detail/12345",
                "groupLabels": {
                    "alertname": "Manually triggered alert",
                },
                "receiver": "",
                "level": "P2",
                "dispatchRuleName": "O & M team",
                "startTime": "2022-06-07 17:20:44",
                "endTime": "2022-06-07 17:22:00",
                "commonAnnotations": {
                    "message": "Manually triggered test alert"
                },
                "status": "resolved"
            },
            "comment": "Solution: False positive", // The content of the comment.
            "operator": "xx", // The operator of the alert.
            "timestamp": 1654593720385
        },
        "subject": "https://arms.console.aliyun.com/#/alarm/alert/detail/12345",
        "aliyunoriginalaccountid": "11xxxxxxxxxxx",
        "source": "arms",
        "type": "aliyun:arms:alarm:comment",
        "aliyunpublishtime": "2022-06-07T09:22:00.435Z",
        "specversion": "1.0",
        "aliyuneventbusname": "armstest",
        "id": "ef38ca1b-89cb-4c7c-9052-b73e15******",
        "aliyunregionid": "cn-hangzhou",
        "aliyunpublishaddr": "118.31.XX.XX"
    }
  • Clear an alert:
    {
        "datacontenttype": "application/json",
        "aliyunaccountid": "11xxxxxxxxxxx",
        "data": {
            "owner": "xx", // The owner of the alert.
            "handler": "xx", // The handler of the alert.
            "data": { // The content of the alert. The alert content is compatible with the event format of the open source Alertmanager. For more information, see the official documentation of Prometheus (https://prometheus.io/docs/alerting/latest/configuration/?spm=a2c4g.11186623.0.0.179176a6M4TIb5#webhook_config).
                "alerts": [
                    {
                        "fingerprint": "9b115ab3762a47b51a8efcb516d4aa50",
                        "annotations": {
                            "message": "Manually triggered test alert"
                        },
                        "startsAt": "2022-06-07T09:20:44.000000000Z",
                        "endsAt": "2022-06-07T09:22:00.000000000Z",
                        "labels": {
                            "severity": "error",
                            "regionId": "cn-hangzhou",
                            "_aliyun_arms_denoise_code": "0",
                            "_aliyun_arms_integration_name": "Custom integration",
                            "alertname": "Manually triggered alert",
                            "_aliyun_arms_product_type": "CUSTOM",
                            "_aliyun_arms_userid": "11xxxxxxxxxxx",
                            "_aliyun_arms_integration_id": "616",
                            "_aliyun_arms_is_denoise_filtered": "false"
                        },
                        "status": "resolved"
                    }
                ],
                "commonLabels": {
                    "severity": "error",
                    "regionId": "cn-hangzhou",
                    "_aliyun_arms_denoise_code": "0",
                    "_aliyun_arms_integration_name": "Custom integration",
                    "alertname": "Manually triggered alert",
                    "_aliyun_arms_product_type": "CUSTOM",
                    "_aliyun_arms_userid": "11xxxxxxxxxxx",
                    "_aliyun_arms_integration_id": "616",
                    "_aliyun_arms_is_denoise_filtered": "false"
                },
                "externalURL": "https://arms.console.aliyun.com/#/alarm/alert/detail/12345",
                "groupLabels": {
                    "alertname": "Manually triggered alert",
                },
                "receiver": "",
                "level": "P2",
                "dispatchRuleName": "O&M team",
                "startTime": "2022-06-07 17:20:44",
                "endTime": "2022-06-07 17:22:00",
                "commonAnnotations": {
                    "message": "Manually triggered test alert"
                },
                "status": "resolved"
            },
            "solution": "", // The solution of the alert.
            "operator": "xx", // The operator of the alert.
            "timestamp": 1654593720279
        },
        "subject": "https://arms.console.aliyun.com/#/alarm/alert/detail/12345",
        "aliyunoriginalaccountid": "11xxxxxxxxxxx",
        "source": "arms",
        "type": "aliyun:arms:alarm:close",
        "aliyunpublishtime": "2022-06-07T09:22:00.352Z",
        "specversion": "1.0",
        "aliyuneventbusname": "armstest",
        "id": "d997f8c775d4d15b05f3346d5863fdc6******_close",
        "aliyunregionid": "cn-hangzhou",
        "aliyunpublishaddr": "xx.xx.xx.xx"
    }