Help Center/ MapReduce Service/ User Guide/ Managing Clusters/ Managing MRS Cluster Jobs/ Configuring Notification Rules for MRS Jobs
Updated on 2025-08-09 GMT+08:00

Configuring Notification Rules for MRS Jobs

Simple Message Notification (SMN) is a reliable and flexible large-scale message notification service. It enables you to efficiently send messages to various endpoints, such as email addresses and phone numbers. MRS uses SMN to offer a publish/subscribe model to achieve one-to-multiple message subscriptions and notifications through different subscription endpoints (SMSs and emails).

Figure 1 MRS cluster message notification

You can configure job notification rules to receive notifications immediately upon a job execution success or failure.

Step 1: Creating an SMN Topic and Adding a Subscription

A topic is used to publish messages and subscribe to notifications. It serves as a message sending channel, where publishers and subscribers can interact with each other.

  1. Log in to the management console.
  2. Click Service List. Under Management & Governance, click Simple Message Notification.
  3. In the navigation pane, choose Topic Management > Topics.
  4. Click Create Topic.

    Table 1 Parameters for creating an SMN topic

    Parameter

    Description

    Example Value

    Topic Name

    Topic name, which:

    • Contains only letters, digits, hyphens (-), and underscores (_) and must start with a letter or digit.
    • Contains 1 to 255 characters.
    • Must be unique and cannot be modified after the topic is created.

    mrs-job

    Display name

    Message sender name, which can contain up to 192 bytes.

    After you specify a display name, the sender in email messages will be presented as Display name<username@example.com>. Otherwise, the sender will be username@example.com.

    mrs-job-failed

    Enterprise Project

    Name of an enterprise project. An enterprise project allows you to group cloud resources under specific projects, making it easier to manage cloud resources and users. The default name is default.

    This parameter is for enterprise users.

    default

  5. Click OK.

    After a topic is created, the system generates a topic URN, which uniquely identifies the topic and cannot be changed.

    The created topic is displayed in the topic list. You can click the topic name to view its details.

  6. Locate the topic to which you want to add a subscription, click More in the Operation column, and select Add Subscription.

    Figure 2 Adding a subscription to a topic

    Endpoint indicates the address of the subscription endpoint. You can add multiple SMS and email endpoints at a time, one in each line. You can enter a maximum of 10 endpoints.

    Table 2 Parameters for adding a subscription

    Parameter

    Description

    Example Value

    Protocol

    Protocol supported by the subscription endpoints. For example, you can receive messages through SMS messages or emails.

    Email

    Method

    The following two options are available:

    • Add subscriptions
    • Import subscriptions: Select subscribers whose subscription has been confirmed and import the subscription data.

    Add subscriptions

    Endpoint

    Subscription endpoint. You can enter up to 10 SMS, email, HTTP, or HTTPS endpoints, one in each line.

    username@example.com

  7. Click OK. The new subscription is displayed in the subscription list.

    Once you have added a subscription, SMN will send a confirmation message to the subscription endpoint, which includes a link for confirming the subscription. The subscription confirmation link is valid for 48 hours. Make sure to confirm your subscription on your mobile phone, mailbox, or other endpoints within this time frame.

    The subscription endpoint can receive messages only after the subscription status changes to Confirmed.

    Figure 3 Viewing the subscription status

Step 2: Configuring Job Message Notification for an MRS Cluster

  1. Log in to the MRS console.
  2. Click the name of a cluster to go to the cluster details page.
  3. Click the Alarms tab, and choose Notification Rules > Add Notification Rule.

    Figure 4 Adding a notification rule

  4. Configure a notification rule for sending job execution results to subscribers, and click OK.

    Table 3 Parameters of adding a notification rule

    Parameter

    Description

    Example Value

    Rule Name

    User-defined notification rule name. Only digits, letters, hyphens (-), and underscores (_) are allowed.

    default_alert_rule1

    Message Notification

    If you enable this function, subscription messages will be sent to subscribers.

    Enabled

    Topic Name

    Select the topic created in Step 1: Creating an SMN Topic and Adding a Subscription or click Create Topic to create a topic.

    mrs-job

    Notification Type

    Select the type of messages to be reported to SMN. For job information, select Event.

    Event

    Subscription Items

    Select events you want to subscribe to.

    1. Click next to Suggestion.
    2. Click next to Manager.
    3. Select events related to job running, for example, Job Running Succeeded and Job Running Failed.

    Job Running Failed

  5. After message notifications are configured for jobs, if a job fails to run, the relevant endpoint can receive the detailed notification.

Helpful Links