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).

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.
- Log in to the management console.
- Click Service List. Under Management & Governance, click Simple Message Notification.
- In the navigation pane, choose Topic Management > Topics.
- 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
- 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.
- 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
- 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
- Log in to the MRS console.
- Click the name of a cluster to go to the cluster details page.
- Click the Alarms tab, and choose Notification Rules > Add Notification Rule.
Figure 4 Adding a notification rule
- 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.
- Click
next to Suggestion.
- Click
next to Manager.
- Select events related to job running, for example, Job Running Succeeded and Job Running Failed.
Job Running Failed
- Click
- After message notifications are configured for jobs, if a job fails to run, the relevant endpoint can receive the detailed notification.
Helpful Links
- SMN can push cloud service notifications based on your requirements. For more information about SMN, see Simple Message Notification.
- Alarms and events of the MRS cluster can be pushed using SMN. For details, see Configuring Notifications for MRS Cluster Alarms and Events.
- For details about how to submit and configure jobs on the MRS console, see Submitting a Job in an MRS Cluster.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot