In Flashduty On-call
You can obtain an integration push URL in either of the following ways.
Use a dedicated integration
- In the Flashduty console, select Channel and open a channel
- Select Configuration → Integrations → Private integration, then click Add an integration
- Select China Mobile Cloud, then click Save
- Open the generated integration card and copy the Push URL
Use a shared integration
- In the Flashduty console, select Integration Center → Alert Events
- Select China Mobile Cloud and enter an integration name
- Configure the default route and select a channel; after creation, add more rules under Route if needed
- Click Save and copy the generated Push URL
In China Mobile Cloud
1
Create an alarm contact with a webhook address
- Sign in to the China Mobile Cloud console and go to 云监控 (Cloud Monitor) → 告警服务 (Alarm service) → 告警联系人 (Alarm contacts)
- Click 新建告警联系人 (Create alarm contact) and enter the contact’s name, mobile number, and email
- Paste the full Flashduty integration push URL into 自定义webhook地址 (Custom webhook address). The URL must include
integration_key - Save the contact
2
Notify the contact from an alarm policy
- Go to 云监控 (Cloud Monitor) → 告警服务 (Alarm service) → 告警策略 (Alarm policies), then create or edit an alarm policy
- Select the alarm contact created in the previous step as a notification recipient and save the policy
3
Verify
- 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
- Restore the threshold. After the monitoring data returns to normal and China Mobile Cloud pushes the recovery, confirm that the original alert recovers
Alert Key
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:
- Repeated pushes and the recovery push for the same resource and alarm rule go to the same alert
- When one alarm rule applies to several resources, each resource gets its own alert
- Changes to the alarm level, alarm content, trigger value, or time do not change the Alert Key
alarmId are rejected.
Status and severity
The alert recovers when
recover is true. Any other value is treated as a trigger. The severity comes from the alarm level (alarmLevel):
A recovered alert keeps the severity it had before recovery.
Alert content and labels
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.
Troubleshooting
- 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 - Flashduty returns a parameter error: Confirm that the pushed content includes
alarmId - 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
- All alerts have Warning severity: Check
alarmLevelin the pushed content and see the status and severity section above