You can import contacts from CloudMonitor to the alerting system of Log Service.

Prerequisites

If you use a RAM user, make sure that the RAM user is granted the required permissions to read contacts from CloudMonitor. You can authorize a RAM user by using one of the following modes:

In simple mode, you can use a system policy to grant full access permissions on CloudMonitor to the RAM user. You do not need to modify the related parameters. To authorize the RAM user in simple mode, perform the following steps:

  1. Log on to the RAM console.
  2. In the left-side navigation pane, choose Identities > Users.
  3. On the Users page, find the RAM user to which you want to grant permissions and click Add Permissions in the Actions column.
  4. In the Add Permissions panel, click System Policy in the Select Policy section, select the AliyunCloudMonitorReadOnlyAccess policy, and then click OK.
  5. Click Complete.

In custom mode, you can create a custom policy. This mode can be used to grant only required permissions to the RAM user. This mode requires complex configurations and provides fine-grained access control. To authorize the RAM user in custom mode, perform the following steps:

  1. Log on to the RAM console.
  2. Create a custom policy.
    1. In the left-side navigation pane, choose Permissions > Policies.
    2. On the Policies page, click Create Policy.
    3. On the Create Custom Policy page, set the parameters and click OK. The following table describes the parameters.
      Parameter Description
      Policy Name The name of the policy, for example, CloudMonitorDescribeContacts.
      Configuration Mode Select Script.
      Policy Document The content of the policy. Replace the content in the editor with the following script:
      {   
          "Version": "1",
          "Statement": [{
              "Action": [
                  "cms:DescribeContactList",
                  "cms:DescribeContactGroupList"
              ],
              "Resource": "*",
              "Effect": "Allow"
          }]
      }
  3. Attach the policy to the RAM user.
    1. In the left-side navigation pane, choose Identities > Users.
    2. On the Users page, find the RAM user to which you want to grant permissions and click Add Permissions in the Actions column.
    3. In the Add Permissions panel, click Custom Policy in the Select Policy section, select the CloudMonitorDescribeContacts policy, and then click OK.
    4. Click Complete.

Procedure

  1. Log on to the Log Service console.
  2. Go to the User Management page.
    1. In the Projects section, click the name of a project.
    2. In the left-side navigation pane, click the Alerts icon.
    3. Click Open Alert Center and choose Alert Management > User Management.
  3. On the User Management page, choose Import Contacts > Import from CloudMonitor.
  4. In the Import from CloudMonitor dialog box, click Preview.
  5. Verify contacts and click Import.

    If you select the Import Webhook at the Same Time check box, you can import the webhooks of the contacts from CloudMonitor to the alerting system of Log Service.

    Import contacts