Use built-in alert rule templates to monitor your MaxCompute data shipping job in real time and receive alert notifications through channels such as DingTalk.
Prerequisites
You have created a MaxCompute data shipping job. For more information, see Create a MaxCompute data shipping job (new version).
Step 1: Enable job operational logs
Log on to the Simple Log Service console.
-
In the Projects section, click the target Project.
This is the Project containing your MaxCompute data shipping job.
-
In the upper-left corner, click the
icon. -
Go to the page for enabling job operational logs.
-
If you have not yet enabled detailed logs for this Project, on the Service Log tab, click Enable Detailed Logs.
-
If you have enabled detailed logs for the Project, on the Service Log tab, click the
icon.
-
-
Set the following parameters, and then click OK.
Parameter
Description
Job Operational Logs
When enabled, the system creates a Logstore named internal-diagnostic_log in the specified Project to store operational and error logs for scheduled SQL, MaxCompute shipping, OSS shipping, and data import tasks. For descriptions of the log fields, see Job operational logs for data transformation (new version), import, and shipping (new version).
Log Storage Location
Specify a Project to store the logs. Select one of the following options:
-
Automatic Creation (Recommended).
-
Current Project.
-
Other projects in the same region as the current Project.
After you enable job operational logs, the operational and error logs of your MaxCompute data shipping job are stored in the internal-diagnostic_log Logstore of the specified Project. The log topic (__topic__) is
etl_metrics. You can query the logs of a specific data shipping job by using a query statement in the formatjob_name:job_name, for example,job_name:job-1646****946. -
Step 2: Configure an action policy
Log on to the Simple Log Service console.
-
Go to the Action Policy management page.
-
In the Projects section, click any Project.
-
In the left navigation bar, click Alerts.
-
Select .
-
-
Find the target action policy (sls.app.export.builtin), and click Modify.
You can also create a new action policy for alert notifications. For more information, see Action policies.
-
In the Edit Action Policy dialog box, on the First Action List tab, change the Request URL to the webhook URL of your DingTalk group chatbot. Keep the default settings for the other options.
For more information about how to obtain the webhook URL for a DingTalk group chatbot, see DingTalk - Custom. You can also use other notification channels based on your business requirements. For more information, see Notification channels.
-
Click Confirm.
Step 3: Create an alert rule
Simple Log Service provides five built-in alert rule templates. Create an alert rule from a template based on your business needs. The following example uses the Data Export Delay Monitor template.
Log on to the Simple Log Service console.
-
In the Projects section, click the target Project.
This is the Project where your internal-diagnostic_log Logstore is located.
-
In the left navigation bar, click Alerts.
-
On the Alert Rules tab, click Create from Template.
-
In the Create from Template pane, click SLS Data Shipping.
-
Click Data Export Delay Monitor.
-
Configure the parameters of the alert rule.
-
To monitor a specific project or adjust the trigger threshold, configure parameters as described in Create an alert rule. Otherwise, keep the default settings.
-
If you created a new action policy in Step 2, you need to configure it in .
-
-
After you complete the configuration, the Data Export Delay Monitor alert rule appears on the Alert Rules tab with a status of Enabled.
Related operations
After you set up alerts for your MaxCompute data shipping job, you can manage alert rules with the following operations.
|
Actions |
Description |
|
Disable an alert rule |
After an alert rule is disabled, it no longer triggers alerts, and its Status changes to Disabled. This operation preserves the rule's configuration, so you can re-enable it later without reconfiguration. |
|
Pause an alert rule |
This action prevents an alert rule from triggering alerts for a specified period. |
|
Resume an alert rule |
A paused alert rule can be resumed at any time. |
|
Delete an alert rule |
This operation permanently deletes the alert rule and its configuration. To use the rule again, you must recreate it. |
|
Reconfigure an alert rule |
Modify the configuration parameters of the alert rule. |