日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

使用系統事件報警回調(推薦)

云監控除了電話、短信、郵件、釘釘、飛書、企業微信和Slack的報警通知方式外,還可以使用報警回調方式,讓您更自由、更靈活的處理事件報警。本文以將訂閱的系統事件推送至Webhook為例,為您介紹如何使用系統事件的報警回調功能,實現將云監控發送的報警通知集成到已有的運維系統或消息通知系統。

前提條件

請確保您已準備好公網URL地址。該URL地址為運維系統或消息通知系統的URL地址。

背景信息

云監控通過HTTP協議或HTTPS協議的POST請求推送報警通知到您指定的URL地址,請您將IP地址106.11.225.0/24、106.11.226.0/24、106.11.227.0/24、106.11.242.0/24、106.11.167.0/24、106.11.245.0/24、59.82.0.0/16、59.82.84.0/24、203.119.128.0/17、203.119.156.0/24和121.41.9.246加入防火墻的白名單。當您接收到報警通知后,可以根據通知內容做進一步處理。

操作步驟

  1. 創建推送渠道。

    本文以創建推送渠道Webhook為例進行介紹。

    1. 登錄云監控控制臺

    2. 在左側導航欄,選擇事件中心 > 事件訂閱

    3. 事件訂閱頁面,單擊推送渠道頁簽。

    4. 推送渠道頁簽,單擊創建推送渠道

    5. 創建推送渠道面板,輸入渠道名稱,目標類型選擇Webhook請求方式選擇POST數據格式選擇JSON地址輸入報警回調的URL地址,其他參數均不設置。

    6. 單擊確認

  2. 創建訂閱策略。

    以訂閱ECS實例的系統事件因實例錯誤實例重啟開始,并推送到Webhook為例。

    1. 單擊訂閱策略頁簽。

    2. 訂閱策略頁簽,單擊創建訂閱策略

    3. 創建訂閱策略頁面,設置訂閱策略的相關參數。

      • 基本信息:輸入訂閱策略名稱。

      • 報警訂閱訂閱類型選擇系統事件訂閱范圍中的產品選擇云服務器ECS事件名稱選擇因實例錯誤實例重啟開始,其他參數均不設置,表示訂閱本賬號內所有ECS實例的系統事件因實例錯誤實例重啟開始

        說明

        關于云服務器ECS支持的系統事件,請參見云服務器ECS

      • 合并降噪:使用默認值。

      • 通知通知配置不設置,自定義通知方式使用默認通知方式。

        說明

        由于通知配置未設置報警組,即無報警聯系人,將不會收到報警通知。

      • 推送與集成:選擇步驟 1創建的推送渠道。

    4. 單擊提交

  3. 調試事件訂閱。

    1. 訂閱策略頁簽,單擊調試事件訂閱

    2. 創建事件調試面板,產品選擇云服務器ECS名稱選擇因實例錯誤實例重啟開始

      系統自動生成JSON格式的調試內容。

    3. 單擊確定

      系統提示操作成功,云監控自動給您設置的Webhook地址發送一條測試報警通知。

執行結果

當系統事件觸發報警時,云監控會將報警信息發送到您指定的URL地址。Webhook的請求方法包括POST和GET,其請求內容如下:

  • POST JSON

    參數名稱:body

    內容如下:

    {
      "userInfo": {
        "aliyunId": "test",
        "userIdSec": "te***st",
        "aliyunIdSec": "test***test",
        "nickName": "test",
        "nickNameSec": "te***st",
        "userName": "test",
        "userId": "test",
        "userNameSec": "te***st"
      },
      "subscription": {
        "subscriptionUuid": "testid",
        "conditions": [
          {
            "field": "source",
            "op": "EQ",
            "value": "SYS_EVENT"
          },
          {
            "field": "product",
            "op": "IN",
            "value": "ECS,Redis,RDS,Config,tag"
          }
        ],
        "relation": "AND"
      },
      "batchId": "testbatchid",
      "alert": {
        "alertStatus": "TRIGGERED",
        "groupId": "",
        "source": "SYS_EVENT",
        "eventContentMap": {
          "extensions": {
            "agentVersion": "test-version",
            "region": "cn-hangzhou",
            "azone": "cn-hangzhou-i",
            "uptime": 23000
          },
          "vmName": "i-testhost",
          "impact": "Alert",
          "opsCode": "InstanceStatusChange",
          "bizEventId": "test-event-id"
        },
        "dedupId": "test-id",
        "eventName": "CloudAssistant:FirstHeartbeat",
        "arn": "acs:ecs:cn-hangzhou:testuser:instance/i-testhost",
        "timestamp": 1704780333000,
        "traceId": "testid",
        "severity": "INFO",
        "product": "ECS",
        "eventRawContent": "{}",
        "eventType": "Notification",
        "userId": "test",
        "meta": {
          "sysEventMeta": {
            "regionNameEn": "cn-hangzhou",
            "resourceId": "acs:ecs:cn-hangzhou:test:instance/i-testhost",
            "product": "ECS",
            "eventNameEn": "CloudAssistant:FirstHeartbeat",
            "instanceName": "i-testhost",
            "level": "INFO",
            "resource": "",
            "regionNameZh": "華東1(杭州)",
            "groupId": "",
            "serviceTypeEn": "ECS",
            "eventType": "Notification",
            "serviceTypeZh": "云服務器ECS",
            "regionId": "cn-hangzhou",
            "eventTime": "20240109T140533.642+0800",
            "name": "CloudAssistant:FirstHeartbeat",
            "id": "testid",
            "status": "Normal",
            "eventNameZh": "云助手首次心跳事件"
          }
        }
      },
      "severity": "INFO",
      "strategyName": "eventwebhook",
      "userId": "test",
      "time": 1704780333000
    }
  • GET JSON

    參數名稱:data

    內容如下:

    {
      "userInfo": {
        "aliyunId": "test",
        "userIdSec": "te***st",
        "aliyunIdSec": "test***test",
        "nickName": "test",
        "nickNameSec": "te***st",
        "userName": "test",
        "userId": "test",
        "userNameSec": "te***st"
      },
      "subscription": {
        "subscriptionUuid": "testid",
        "conditions": [
          {
            "field": "source",
            "op": "EQ",
            "value": "SYS_EVENT"
          },
          {
            "field": "product",
            "op": "IN",
            "value": "ECS,Redis,RDS,Config,tag"
          }
        ],
        "relation": "AND"
      },
      "batchId": "testbatchid",
      "alert": {
        "alertStatus": "TRIGGERED",
        "groupId": "",
        "source": "SYS_EVENT",
        "eventContentMap": {
          "extensions": {
            "agentVersion": "test-version",
            "region": "cn-hangzhou",
            "azone": "cn-hangzhou-i",
            "uptime": 23000
          },
          "vmName": "i-testhost",
          "impact": "Alert",
          "opsCode": "InstanceStatusChange",
          "bizEventId": "test-event-id"
        },
        "dedupId": "test-id",
        "eventName": "CloudAssistant:FirstHeartbeat",
        "arn": "acs:ecs:cn-hangzhou:testuser:instance/i-testhost",
        "timestamp": 1704780333000,
        "traceId": "testid",
        "severity": "INFO",
        "product": "ECS",
        "eventRawContent": "{}",
        "eventType": "Notification",
        "userId": "test",
        "meta": {
          "sysEventMeta": {
            "regionNameEn": "cn-hangzhou",
            "resourceId": "acs:ecs:cn-hangzhou:test:instance/i-testhost",
            "product": "ECS",
            "eventNameEn": "CloudAssistant:FirstHeartbeat",
            "instanceName": "i-testhost",
            "level": "INFO",
            "resource": "",
            "regionNameZh": "華東1(杭州)",
            "groupId": "",
            "serviceTypeEn": "ECS",
            "eventType": "Notification",
            "serviceTypeZh": "云服務器ECS",
            "regionId": "cn-hangzhou",
            "eventTime": "20240109T140533.642+0800",
            "name": "CloudAssistant:FirstHeartbeat",
            "id": "testid",
            "status": "Normal",
            "eventNameZh": "云助手首次心跳事件"
          }
        }
      },
      "severity": "INFO",
      "strategyName": "eventwebhook",
      "userId": "test",
      "time": 1704780333000
    }
  • POST FORM和GET FORM

    參數名稱

    內容

    userInfo

    {
        "aliyunId": "test",
        "userIdSec": "te***st",
        "aliyunIdSec": "test***test",
        "nickName": "test",
        "nickNameSec": "te***st",
        "userName": "test",
        "userId": "test",
        "userNameSec": "te***st"
     }

    subscription

    {
        "subscriptionUuid": "testid",
        "conditions": [
          {
            "field": "source",
            "op": "EQ",
            "value": "SYS_EVENT"
          },
          {
            "field": "product",
            "op": "IN",
            "value": "ECS,Redis,RDS,Config,tag"
          }
        ],
        "relation": "AND"
      }

    alert

     {
        "alertStatus": "TRIGGERED",
        "groupId": "",
        "source": "SYS_EVENT",
        "eventContentMap": {
          "extensions": {
            "agentVersion": "test-version",
            "region": "cn-hangzhou",
            "azone": "cn-hangzhou-i",
            "uptime": 23000
          },
          "vmName": "i-testhost",
          "impact": "Alert",
          "opsCode": "InstanceStatusChange",
          "bizEventId": "test-event-id"
        },
        "dedupId": "test-id",
        "eventName": "CloudAssistant:FirstHeartbeat",
        "arn": "acs:ecs:cn-hangzhou:testuser:instance/i-testhost",
        "timestamp": 1704780333000,
        "traceId": "testid",
        "severity": "INFO",
        "product": "ECS",
        "eventRawContent": "{}",
        "eventType": "Notification",
        "userId": "test",
        "meta": {
          "sysEventMeta": {
            "regionNameEn": "cn-hangzhou",
            "resourceId": "acs:ecs:cn-hangzhou:test:instance/i-testhost",
            "product": "ECS",
            "eventNameEn": "CloudAssistant:FirstHeartbeat",
            "instanceName": "i-testhost",
            "level": "INFO",
            "resource": "",
            "regionNameZh": "華東1(杭州)",
            "groupId": "",
            "serviceTypeEn": "ECS",
            "eventType": "Notification",
            "serviceTypeZh": "云服務器ECS",
            "regionId": "cn-hangzhou",
            "eventTime": "20240109T140533.642+0800",
            "name": "CloudAssistant:FirstHeartbeat",
            "id": "testid",
            "status": "Normal",
            "eventNameZh": "云助手首次心跳事件"
          }
        }
      }

    severity

    INFO

    strategyName

    eventwebhook

    userId

    test

    time

    1704780333000

相關文檔