Simple Log Service can write alerts to an Eventstore only after Simple Log Service is granted the required permissions. This topic describes how to grant the required permissions by using the default role or a custom role.
When you configure an alert monitoring rule, you must grant the required permissions to Simple Log Service after you select Eventstore for Destination and turn on Enable.
Default role
If you select Default Role for Authorization Method, you must perform the following operations.
Click Authorize. Then, you are navigated to the authorization page. Complete the authorization as prompted.
After the authorization is complete, click After authorization, click Refresh to refresh the page.. The system displays the role information.
Custom role
If you select Custom Role for Authorization Method, you must perform the following operations in the Resource Access Management (RAM) console.
Step 1: Create a policy
Log on to the RAM console.
In the left-side navigation pane, choose Permissions > Policies.
On the Policies page, click Create Policy.
Create a policy.
On the Create Policy page, click the JSON tab and enter the following policy document.
{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": "log:PostLogStoreLogs", "Resource": "*" } ] }
Click Next to edit policy information. On the Create Policy page, configure Name and Description. Then, click OK.
Step 2: Create a custom role
In the left-side navigation pane of the RAM console, choose Identities > Roles.
On the Roles page, click Create Role.
Create a role.
In the Create Role panel, select Alibaba Cloud Service for Select Trusted Entity and click Next.
Select Normal Service Role, configure RAM Role Name and Note, and then select Log Service for Select Trusted Service.
Click OK.
Step 3: Grant permissions to the custom role
In the Finish step of the created role, click Add Permissions to RAM Role. Alternatively, in the role list, find the created role and click Add Permissions in the Actions column.
In the Add Permissions panel, select Custom Policy for Select Policy. Then, search for and select the custom policy that is created in Step 1.
Click OK. Then, click Complete as prompted.
Click the role, copy the Alibaba Cloud Resource Name (ARN) of the role, and then configure an alert monitoring rule.