Integrate external alerts
Updated at:
You can route alerts from external systems (non-Cloud Monitor) through Cloud Monitor notification channels by calling an alert service URL.
Prerequisites
An alert contact group is created. For more information, see Create an alert contact group.Procedure
-
Log on to the Cloud Monitor console.
- In the left-side navigation pane, choose .
- Click the Alert Contact Group tab.
- For the target alert contact group, click Access External alert.
- In the Alert Service Guide panel, configure the parameters for integrating external alerts.
Parameter Description Security Setting The method used to validate alerts from an external system. Cloud Monitor verifies the alert content or login credentials before notifying contacts in the group. Valid values:- Security Keywords: Cloud Monitor validates that the alert content contains a predefined security keyword. Notifications are sent only when the content includes this keyword.
- Basic Auth: Cloud Monitor authenticates the external system using login credentials. Notifications are sent upon successful authentication.
Add Security Keyword A security keyword used for content validation. - Cloud Monitor sends notifications only if the alert content contains the security keyword.
- If no security keyword is configured, Cloud Monitor skips validation and sends alert notifications to all contacts in the alert contact group.
This setting is required when Security Setting is set to Security Keywords. To add a security keyword, perform the following steps:- Click Add Security Keyword.
- Click the
icon. - Enter a security keyword.
- Click Save Security Keywords.
Alert Level The alert level and the notification methods associated with it. Valid values: - phone call + SMS + email + webhook
- SMS + email + webhook
- email + webhook
Alert Service URL The URL that Cloud Monitor generates for the external system to send alerts. To regenerate the token in theAlert Service URL, click Update Token.
Alert Content The alert notification content. To verify that alerting works correctly, click Test Command to view the alert content and test command. - The alert content must be in JSON format and include the ruleName, title, and message fields. Example:
{"ruleName":"alert rule name","title":"alert title","message":"alert message"}. - The test command combines the Alert Content and the Alert service URL. Example:
curl -u "<accessKey>:<accessSecret>" -H "Content-Type: application/json" -d '{"ruleName":"alert rule name","title":"alert title","message":"alert message"}' "https://metrichub-cms-cn-hangzhou.aliyuncs.com/event/notify?token=eyJhbGlVaWQiOiIxMjA4ODYzMTc4NjEyOTUzIiwibmFtZSI6IuS6kei0puWPt-aKpeitpuiBlOezu-S6uiIsInRva2VuVHlwZSI6ImNvbnRhY3RHcm91cCJ9.HZtXuDWVaP68Bi-0a7****&level=CRITICAL".Click the
icon next to the test command to copy it. Replace <accessKey>:<accessSecret>with your AccessKey ID and AccessKey Secret, paste the command into a command prompt, and run it. A successful test returns a response similar to the following:{"requestId":"de912e9f-622d-4691-b19c-fbb763f746da","code":"200","msg":null,"data":{"requestId":"de912e9f-622d-4691-b19c-fbb763f746da"}}
- Click Close.
Is this page helpful?