All Products
Search
Document Center

Simple Log Service:Use a dashboard to quickly identify abnormal metrics

Last Updated:Jul 17, 2026

Configure chart thresholds and alert rules on a dashboard to quickly spot abnormal metrics and navigate to alert details.

Overview

You can set thresholds in a chart's field configuration to highlight metrics that cross a predefined limit. For example, configure a request success rate chart to show a green background when the rate exceeds 70% and a red background when it drops below 70%. You can also trigger an alert notification when the rate drops.

  1. Highlight chart values based on a threshold: Add a request success rate chart to a sample dashboard. Configure a threshold and background color for the success_rate field — green when the rate exceeds 70%, red otherwise.

  2. Integrate alerting: Add an alert rule to the request success rate chart to send a DingTalk notification when the rate drops below 70%.

  3. Add an interaction event to the chart: Configure a custom HTTP link interaction event for the request success rate. Click the success_rate value to open the alert details page directly.

1. Highlight chart values based on a threshold

1.1 Add a dashboard and a chart

  1. Add a dashboard: Log on to the Simple Log Service console and select your target Project. In the left-side navigation pane, choose Dashboard > Dashboards to add a dashboard named sample.

    In the upper-right corner, click the + icon and select Add Dashboard from the drop-down menu.

  2. Add a chart: Click Add Chart to add a chart to the dashboard that shows the request success rate.

1.2 Configure the chart

  1. Configure general settings: On the right side of the page, configure the Chart Type and Title. On the left, configure the time range, Logstore, and query statement. Then, click Apply at the top of the page to preview the chart.

    Select Single Value Chart Pro as the chart type, set the title to Request Success Rate, select The Day Before Yesterday for the time range, and select nginx for the Logstore.

    Query statement:

    (*)|select round(sum(if(status < 300, 1, 0)) * 100.0 / count(1), 2) as success_rate
  2. Configure field settings: Set a threshold of 70 for the success_rate field. If the value is above the threshold, the background is green; otherwise, it is red.

    1. On the right side of the page, click the Field Configuration tab. For Add Field, select A > success_rate.

    2. Configure the following parameters for the success_rate field, including unit, font size, threshold, color, and background color.

      • Standard Configurations > Unit: Set the unit for success_rate to %.

      • Chart Style > Value Font Size: Set the font size for success_rate to 70.

      • Threshold > Threshold: Set the threshold for success_rate in Query Analysis A to 70.

      • Standard Configurations > Color Scheme: Set the color scheme. Based on the threshold, the background turns red when success_rate is below 70, and green otherwise.

      • Chart Style > Color Mode: Choose how color is applied. None displays no color. Value colors the font. Background colors the background.

      • Chart Style > Font Color: Set the font color for success_rate to white.

      • For more information about other parameters, see Chart properties.

1.3 Save the chart and dashboard

  1. In the upper-right corner of the chart editing page, click OK.

  2. In the upper-right corner of the dashboard editing page, click Save.

2. Integrate alerting

2.1 Add an alert rule

In the upper-right corner of the chart, click image > Save as Alert > A to add an alert rule.

2.2 Set the alert condition

In the alert monitoring rule panel, set the Trigger Condition to When data is found, success_rate < 70. Leave the other parameters at their default values.

2.3 Configure the alert policy

Configure DingTalk group notifications as described below. Leave the other parameters at their default values.

In the Notification Target section, select the SLS Notification checkbox. For Alert Policy, select Simple Mode. In the Action Group section, add a DingTalk channel. Set Select Webhook to sample, Remind Method to Do not remind, Content Template to SLS built-in content template, and Notification Period to Any.

2.4 View triggered alerts

View the triggered alert details and copy the alert details page URL. You will need this URL later to configure a chart interaction event.

  1. In the left-side navigation pane, click Alerts. On the Alert Center > Alert Monitoring Rule page, click the name of your target rule.

  2. In the Alert History section, view the alert records and copy the URL from your browser's address bar.

    In the Alert History table, check the Trigger Condition column (for example, Count:[1] > 0; Condition: [62.93] < 70) and the Alert Triggered column (with a value of true) to confirm that the alert was triggered. The top of the page also shows the Alert Count, the Execution Success Rate dashboard, and the Alert Trigger Trend line chart.

3. Add an interaction event

3.1 Enter chart edit mode

  1. Enter the dashboard's edit mode: From the Dashboards page, click the sample dashboard. Then, in the upper-right corner of the dashboard page, click Edit.

  2. Enter the chart's edit mode: In the upper-right corner of the request success rate chart, click image > Edit.

3.2 Configure field interaction

On the right side of the page, on the Interaction Occurrences tab, click Add Field, then select A > success_rate from the drop-down list.

3.3 Configure the interaction event

Click Add Event and select Create Custom HTTP URL from the drop-down list. In the dialog box that appears, use the following settings, then click Confirm.

Set Custom Name to Alert Details. For Protocol, select https. In the URL field, paste the Simple Log Service alert details page URL that you copied (for example, https://sls.console.alibabacloud.com/lognext/project/xxx?slsRegion=cn-hangzhou). Turn on the Open in new window toggle.

3.4 Save the chart and dashboard

  1. In the upper-right corner of the chart editing page, click OK.

  2. In the upper-right corner of the dashboard editing page, click Save.

3.5 Verify the interaction event

In the chart, click the success_rate value. The alert details page opens in a new window.