Alert settings

Updated at:

Add an alert item

Go to the home page of the Node.js Performance Platform console. On the interface for your application, click the Alert button to set an alert policy, as shown in the following figure:

This opens the alert policy settings interface. The following example shows how to set a policy to trigger an alert when heap memory usage exceeds 60%:

Note the following points:

  • The type must match the log type of your alert policy. For example, memory calculation belongs to the `node_log` type.

  • The priority level determines the notification method when an alert is triggered:

    • p1: Phone call. This feature is not yet available.

    • p2: Text message and email. Notifications are sent to the mobile phone number and email address configured in your Alibaba Cloud account.

    • p3: Email only. Notifications are sent to the email address configured in your Alibaba Cloud account.

    • p4: Data record only. No notifications are sent.

  • For better notifications, you can use a webhook to push alerts to a communication tool. Currently, only DingTalk is supported. For more information, see How to create a DingTalk robot.

  • The threshold expression defines the alert policy. For more information, see Writing Guide.

  • The alert notification includes the description that you enter in the alert description field.

After you configure these settings, click the Add Alert Item button to add the alert rule.

Quickly add alert rules

You can use the provided templates for common alert rule expressions to quickly monitor the stability of your Node.js project, as shown in the following figure:

When you select a template, a threshold expression and an alert description are automatically generated. You can modify these templates as needed for your project. For example, to monitor the heap memory of a Node.js process, select the Memory Alert option, as shown in the following figure:

The generated template triggers an alert when the used heap memory exceeds 80% of the heap limit. In the threshold expression, you can change the value 0.8 as needed for your project.

Modify an alert item

The alert items that you add appear in the Existing Alert Items section at the bottom of the alert settings page. To modify an item, hover over the More button and click Edit from the drop-down list, as shown in the following figure:

Disable an alert item

Similarly, click Disable in the drop-down list to disable the alert item.

Delete an alert item

Similarly, click Delete in the drop-down list to delete the alert item.