When monitoring the service load on the dashboard, a high number of requests or long response time indicates a need for optimization. You can set table thresholds to identify areas for improvement.
Prerequisites
Log data is collected. For more information, see Collect text logs from servers.
Indexes are created. For more information, see Create indexes.
Step 1: Query and analyze data
Log on to the Simple Log Service console. In the Projects section, click the project you want.
In the left-side navigation pane, click Log Storage. In the Logstores list, click the logstore you want.
Enter the query and analysis statement, and then click Last 15 Minutes to set the time range for your query and analysis.
Example
* | select request_url,count(*) as pv group by request_url order by pv
Step 2: Add a table
In the left-side navigation pane, choose Dashboard > Dashboards. In the dashboard list, click the dashboard you want. In the upper-right corner of the dashboard page, click Edit. In edit mode, click Add > Add Chart.
On the General Configurations tab, click the Table Pro icon in the Chart Types section. On the Search & Analysis tab, select Logstore (SQL) and choose the logstore you want, and enter the query statement. Select a time range, such as Last 15 Minutes, and click OK.
Step 3: Set a table threshold
On the Field Configuration tab, click Add Field, and then select the column name from the drop-down list.
Click Add Configuration, select Standard Configurations > Color Scheme, and then select Threshold.
Click Add Configuration, select Field/Column Settings > Cell Display Mode, and then select Full LineBackground Highlight.
Click Add Configuration, select Threshold > Threshold, click Add Threshold, and set the threshold to your desired value.
The settings and results are shown in the figure below.