You can manage clusters, alert groups, and alert instances by using the security management features of E-MapReduce (EMR) Workflow. This topic describes how to associate a cluster, create an alert instance, and create an alert group.
Prerequisites
A cluster is created. For more information, see Create a cluster.
Associate a cluster
You can associate DataLake clusters, Hadoop clusters, and custom clusters.
Go to the Security tab.
Log on to the EMR console.
In the left-side navigation pane, choose EMR Studio > Workflow.
Click the Security tab.
On the Cluster Manage page, click Bind Cluster.
In the Bind Cluster dialog box, configure the Cluster Type, Cluster ID, and vSwitch ID parameters and click Confirm.
You can refresh the Cluster Manage page to view the association progress. If Associated is displayed in the State column, the cluster is associated. You can disassociate a cluster that is being associated, is associated, or fails to be associated.
NoteThe association process takes about 5 to 10 minutes. Wait until the association is complete.
Create an alert instance
Go to the Security tab.
Log on to the EMR console.
In the left-side navigation pane, choose EMR Studio > Workflow.
Click the Security tab.
In the left-side navigation pane, click Alarm Instance Manage.
On the Alarm Instance Manage page, click Create Alarm Instance.
In the Create Alarm Instance dialog box, configure the Alarm instance name parameter and select an alert plug-in from the Select plugin drop-down list.
In the Create Alarm Instance dialog box, configure the parameters based on the type of the alert plug-in that you select.
DingTalk
Parameter
Description
Warning Type
The workflow or node status based on which an alert is triggered. Valid values:
success: An alert is triggered if a workflow or node is run.
failure: An alert is triggered if a workflow or node fails.
all: An alert is triggered regardless of whether a workflow or node is run or fails.
WebHook
The webhook URL of the DingTalk chatbot.
Keyword
The custom keyword for the security settings of the DingTalk chatbot.
Secret
The signature for the security settings of the DingTalk chatbot.
Msg Type
The message type. Valid values: text and markdown.
At User Mobiles
The mobile numbers of the users to which an alert message is sent.
At User Ids
The IDs of the users to which an alert message is sent.
@All
Specifies whether to send an alert message to all users.
Enable Proxy
Specifies whether to enable a proxy.
Http
Parameter
Description
Warning Type
The workflow or node status based on which an alert is triggered. Valid values:
success: An alert is triggered if a workflow or node is run.
failure: An alert is triggered if a workflow or node fails.
all: An alert is triggered regardless of whether a workflow or node is run or fails.
URL
The connection URL of the
HTTP
request. The URL must contain the protocol, host, and path. If you use the GET method, you can add parameters.NoteOnly URLs of Alibaba Cloud services are supported. To create or update a URL, you must submit a ticket to add the URL to the whitelist of a workflow.
Request Type
The HTTP request method. You can specify POST or GET as the request method to send alerts over
HTTP
.Headers
The complete request header of the
HTTP
request, in the JSON format.Body
The complete request body of the
HTTP
request, in the JSON format. You do not need to specify this parameter if you specify GET as the HTTP request method.Content Field
The name of the field that indicates the alert information.
Click Confirm.
You can perform the following operations on the created alert instances:
Modify an alert instance: Click the icon in the Operation column of the alert instance to be modified.
Delete an alert instance: Click the icon in the Operation column of the alert instance to be deleted.
Create an alert group
Go to the Security tab.
Log on to the EMR console.
In the left-side navigation pane, choose EMR Studio > Workflow.
Click the Security tab.
In the left-side navigation pane, click Alarm Group Manage.
On the Alarm Group Manage page, click Create Alarm Group.
In the Create Alarm Group dialog box, configure the Alert Group Name parameter, select an alert plugin instance from the Alarm Plugin Instance drop-down list, and then click Confirm.
You can perform the following operations on the created alert groups:
Modify an alert group: Click the icon in the Operation column of the alert group to be modified.
Delete an alert group: Click the icon in the Operation column of the alert group to be deleted.