External alerts are alerts that are generated by external systems. CloudMonitor can receive external alerts and send alert notifications to alert contact groups that you configure. CloudMonitor provides an URL that you can use to call the alert service to report external alerts.

Prerequisites

An alert contact group is created. For more information, see Create an alert contact or alert contact group.

Procedure

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, choose Alerts > Alert Contacts.
  3. Click the Alert Contact Group tab.
  4. Find the alert contact group that you want to use and click Access External Alert.
  5. In the Alert Service Guide panel, set the parameters.
    Parameter Description
    Security Setting
    The method that is used to authenticate the content of alert notifications or the logon information of the external system. Valid values:
    • Security Keywords: CloudMonitor checks whether the content of alert notifications contains the specified keywords. CloudMonitor sends alert notifications to alert contacts in the alert contact group only if the content of the alert notifications contains the specified keywords.
    • Basic Auth: CloudMonitor authenticates the logon information of the external system. If the external system passes the authentication, CloudMonitor sends alert notifications to alert contacts in the alert contact group.
    Add Security Keyword The security keywords that you add to authenticate the content of alert notifications.
    • If you add security keywords, CloudMonitor checks whether the content of alert notifications contains the specified keywords. If the content of the alert notifications contains the specified security keywords, CloudMonitor sends the alert notifications to alert contacts in the alert contact group.
    • If you do not add security keywords, CloudMonitor sends alert notifications without authenticating the content.
    If you set the Security Setting parameter to Security Keywords, you must add at least one security keyword. To add security keywords, perform the following steps:
    1. Click Add Security Keyword.
    2. Click the Add icon.
    3. Enter a security keyword.
    4. Click Save Security Keywords.
    Alert Level The methods that are used to send alert notifications. Valid values:

    Email + DingTalk

    Alert Service URL The URL that is used to call the alert service in CloudMonitor.

    If you want to change the token of the URL, click Update Token.

    Alert Content The content of alert notifications. To test whether the alert is valid, click Test Command to view the alert content and test command.
    • The alert content is in JSON format and must contain the ruleName, title, and message fields. Example: {"ruleName":"Alert rule name","title":"Alert message title","message":"Alert message content"}.
    • The test command consists of the alert content and alert service URL. Example: curl -H "Content-Type: application/json" -d '{"ruleName":"Alert rule name","title":"Alert message title","message":"Alert message content"}' "https://metrichub-cms-cn-hangzhou.aliyuncs.com/event/notify?token=eyJhbGlVaWQiOiIxMjA4ODYzMTc4NjEyOTUzIiwibmFtZSI6IkUtY29tbWVyY2VCYWNrZ3JvdW5kTW9kdWxlVGVtcGxhdGUiLCJzZWN1cmUiOiJjOWZjM2IxMy1jZmJkLTQ2ZDAtOGRiYy04NjcxNDVhMjkyZDEiLCJ0b2tlblR5cGUiOiJjb250YWN0R3JvdXAifQ.xw8NcbVgHwHutGL4Gx****&level=CRITICAL".
      You can click the Copy icon at the end of the command to copy the command, and paste the command to a command prompt window to test the command. If the following result is returned, the test is successful:
      {"requestId":"de912e9f-622d-4691-b19c-fbb763f746da","code":"200","msg":null,"data":{"requestId":"de912e9f-622d-4691-b19c-fbb763f746da"}}
  6. Click Close.