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

Prerequisites

An alert group is created. For more information, see Create an alert contact or alert 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 group that you want to use and click Access External alert.
  5. In the Alert Contact Group panel, set the parameters.
    Parameter Description
    Security setting
    The method to authenticate the content of an alert notification that is reported by the external system or the logon information of the external system. Valid values:
    • Safety words: CloudMonitor checks whether the content of the alert notification contains the specified words. If the content of the alert notification contains the specified words, CloudMonitor sends the alert notification to alert contacts in the alert group.
    • Basic Auth: Cloud Monitor authenticates the logon information of the external system. If the external system passes the authentication, CloudMonitor sends the alert notification to alert contacts in the alert group.
    Add security word The words that you add to authenticate the content of alert notifications.
    • If you add security words, CloudMonitor checks whether the content of an alert notification contains the specified words. If the content of the alert notification contains the specified words, CloudMonitor sends the alert notification to alert contacts in the alert group.
    • If you do not add security words, CloudMonitor sends the alert notification without authenticating its content.
    If you set the Security setting parameter to Safety words, you must add at least one security word. To add security words, perform the following steps:
    1. Click Add security word.
    2. Click the Add icon.
    3. Enter a security word.
    4. Click Save security words.
    Alert Level The methods that are used to send alert notifications. Valid value:

    Email + DingTalk

    Alarm service call address The URL to call the alert service in CloudMonitor.

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

    Alert Content The information contained in an alert notification. 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 values of the Alert Content and Alarm service call address parameters. 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.