|
| 1 | +--- |
| 2 | +title: "China Mobile Cloud (ecloud) Cloud Monitor integration" |
| 3 | +description: "Sync China Mobile Cloud Cloud Monitor alerts to Flashduty On-call through the custom webhook of an alarm contact. Alerts close automatically when they recover." |
| 4 | +keywords: ["alert integration", "China Mobile Cloud", "ecloud", "Cloud Monitor", "移动云", "Webhook"] |
| 5 | +--- |
| 6 | + |
| 7 | +Push China Mobile Cloud (ecloud) Cloud Monitor alerts to Flashduty On-call through the custom webhook address of an alarm contact. Alerts that the same rule keeps raising on the same resource map to one Flashduty alert: the alert opens when it triggers and recovers automatically when China Mobile Cloud pushes the recovery. |
| 8 | + |
| 9 | +<div className="hide"> |
| 10 | + |
| 11 | +## In Flashduty On-call |
| 12 | +--- |
| 13 | + |
| 14 | +You can obtain an integration push URL in either of the following ways. |
| 15 | + |
| 16 | +### Use a dedicated integration |
| 17 | + |
| 18 | +1. In the Flashduty console, select **Channel** and open a channel |
| 19 | +2. Select **Configuration** → **Integrations** → **Private integration**, then click **Add an integration** |
| 20 | +3. Select **China Mobile Cloud**, then click **Save** |
| 21 | +4. Open the generated integration card and copy the **Push URL** |
| 22 | + |
| 23 | +### Use a shared integration |
| 24 | + |
| 25 | +1. In the Flashduty console, select **Integration Center → Alert Events** |
| 26 | +2. Select **China Mobile Cloud** and enter an integration name |
| 27 | +3. Configure the default route and select a channel; after creation, add more rules under **Route** if needed |
| 28 | +4. Click **Save** and copy the generated **Push URL** |
| 29 | + |
| 30 | +</div> |
| 31 | + |
| 32 | +## In China Mobile Cloud |
| 33 | +--- |
| 34 | + |
| 35 | +<Steps> |
| 36 | +<Step title="Create an alarm contact with a webhook address"> |
| 37 | + |
| 38 | +1. Sign in to the China Mobile Cloud console and go to **云监控 (Cloud Monitor)** → **告警服务 (Alarm service)** → **告警联系人 (Alarm contacts)** |
| 39 | +2. Click **新建告警联系人 (Create alarm contact)** and enter the contact's name, mobile number, and email |
| 40 | +3. Paste the full Flashduty integration push URL into **自定义webhook地址 (Custom webhook address)**. The URL must include `integration_key` |
| 41 | +4. Save the contact |
| 42 | + |
| 43 | +China Mobile Cloud requires the webhook address to be reachable from the public internet. The Flashduty push URL meets this requirement. |
| 44 | + |
| 45 | +</Step> |
| 46 | + |
| 47 | +<Step title="Notify the contact from an alarm policy"> |
| 48 | + |
| 49 | +1. Go to **云监控 (Cloud Monitor)** → **告警服务 (Alarm service)** → **告警策略 (Alarm policies)**, then create or edit an alarm policy |
| 50 | +2. Select the alarm contact created in the previous step as a notification recipient and save the policy |
| 51 | + |
| 52 | +When an alarm rule in the policy triggers or recovers, China Mobile Cloud pushes the alarm to the contact's webhook address. |
| 53 | + |
| 54 | +</Step> |
| 55 | + |
| 56 | +<Step title="Verify"> |
| 57 | + |
| 58 | +1. Make an alarm rule in the policy trigger, for example by temporarily lowering the threshold of a CPU utilization rule on a cloud server, and confirm that Flashduty receives an active alert |
| 59 | +2. Restore the threshold. After the monitoring data returns to normal and China Mobile Cloud pushes the recovery, confirm that the original alert recovers |
| 60 | + |
| 61 | +</Step> |
| 62 | +</Steps> |
| 63 | + |
| 64 | +## Alert Key |
| 65 | +--- |
| 66 | + |
| 67 | +Every push from China Mobile Cloud carries an alarm ID (`alarmId`). According to China Mobile Cloud, `alarmId` stays the same for alarms that the same rule keeps raising on the same resource. Flashduty computes the Alert Key from `alarmId`, so: |
| 68 | + |
| 69 | +- Repeated pushes and the recovery push for the same resource and alarm rule go to the same alert |
| 70 | +- When one alarm rule applies to several resources, each resource gets its own alert |
| 71 | +- Changes to the alarm level, alarm content, trigger value, or time do not change the Alert Key |
| 72 | + |
| 73 | +Requests without `alarmId` are rejected. |
| 74 | + |
| 75 | +## Status and severity |
| 76 | +--- |
| 77 | + |
| 78 | +The alert recovers when `recover` is `true`. Any other value is treated as a trigger. The severity comes from the alarm level (`alarmLevel`): |
| 79 | + |
| 80 | +| China Mobile Cloud alarm level | Flashduty severity | |
| 81 | +| :--- | :--- | |
| 82 | +| 严重 (Critical) | Critical | |
| 83 | +| 重要 (Major) | Warning | |
| 84 | +| 次要 (Minor) | Info | |
| 85 | +| 提示 (Notice) | Info | |
| 86 | +| Empty or any other value | Warning | |
| 87 | + |
| 88 | +A recovered alert keeps the severity it had before recovery. |
| 89 | + |
| 90 | +## Alert content and labels |
| 91 | +--- |
| 92 | + |
| 93 | +The alert title combines the resource name (`resourceName`) and the metric name (`metricName`), for example `ECS-45273803 CPU利用率`. The alert description is the alarm content (`content`) pushed by China Mobile Cloud, which includes the trigger value and trigger time. |
| 94 | + |
| 95 | +| Label | Source | |
| 96 | +| :--- | :--- | |
| 97 | +| `check` | Metric name (`metricName`) | |
| 98 | +| `resource` | Resource name (`resourceName`) | |
| 99 | +| `resource_id` | Resource ID (`resourceId`) | |
| 100 | +| `product_type` | Resource type (`productType`), such as `云主机 ECS` | |
| 101 | +| `region` | Resource pool of the resource (`poolName`), such as `湖北-襄阳` | |
| 102 | +| `pool_id` | Resource pool ID (`poolId`) | |
| 103 | +| `ip_infos` | Resource IP information (`ipInfos`), sent for cloud servers (ECS) only | |
| 104 | +| `child_node` | Child node name (`childNode`), sent for child-node alarms only | |
| 105 | +| `alarm_id` | Alarm ID (`alarmId`) | |
| 106 | +| `alarm_type` | Alarm type (`alarmTypeCn`) | |
| 107 | +| `alarm_level` | Original alarm level in China Mobile Cloud | |
| 108 | +| `rule_id` | Alarm rule ID (`ruleId`); not sent when the rules in a policy are combined with AND | |
| 109 | +| `strategy_id` | Alarm policy ID (`strategyId`) | |
| 110 | +| `user_name` | China Mobile Cloud user name (`userName`) | |
| 111 | +| `notify_time` | Time of this alarm notification (`notifyTime`) | |
| 112 | + |
| 113 | +## Troubleshooting |
| 114 | +--- |
| 115 | + |
| 116 | +- **Flashduty receives no alerts**: Confirm that the alarm policy notifies the alarm contact that has the webhook address, and that the address is complete and includes `integration_key` |
| 117 | +- **Flashduty returns a parameter error**: Confirm that the pushed content includes `alarmId` |
| 118 | +- **The alert does not recover**: China Mobile Cloud pushes a recovery when the monitoring data returns to normal and it clears the real-time alarm automatically. If an alarm that ended another way (for example, a manual clear) pushes no recovery, close the corresponding alert in Flashduty manually |
| 119 | +- **All alerts have Warning severity**: Check `alarmLevel` in the pushed content and see the status and severity section above |
| 120 | + |
| 121 | +For a full description of the pushed fields, see the Cloud Monitor **告警联系人 (Alarm contacts)** document in the China Mobile Cloud help center. |
0 commit comments