All Products
Search
Document Center

Simple Log Service:Configure color settings for a table

Last Updated:Nov 12, 2024

After you collect NGINX access logs to Simple Log Service, you can specify a query statement to query all request methods and visualize the request methods on a table of a dashboard. If you want to highlight failed requests on the table, you can configure color settings for the table.

Prerequisites

Overview

image

  1. Query and analyze data: You can query and analyze the collected logs in the Simple Log Service console. For example, you can retrieve logs, aggregate logs, and collect statistics on logs.

  2. Add a chart: Each dashboard consists of multiple charts. Each chart displays the results of one or more query statements.

  3. Configure color settings for a table: Specify colors for table text, table cells, or table rows.

Step 1: Query and analyze data

  1. Log on to the Simple Log Service console. In the Projects section, click the project you want.

  2. In the left-side navigation pane, click Log Storage. In the Logstores list, click the logstore you want.

    image

  3. Enter a query statement in the search box and click Last 15 Minutes to specify a query time range.

    For example, you can specify the following statement to query the request methods and request status of all requests:

    * | SELECT request_method,status

Step 2: Add a table

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

    image

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

    image

Step 3: Configure color settings for a table

Specify colors for table text

  • Standard Configurations > Color Scheme > Threshold: Select Threshold as the color scheme for the table. The color of the table is displayed based on the threshold that you specify.

  • Field/Column Settings > Cell Display Mode > Text Highlight: Select Text Highlight to highlight the values of the status field in the results of Query Statement A.

  • Threshold > Threshold: Set the threshold to 400 for the status field in the results of Query Statement A. If a value of the status field is greater than or equal to 400, the color of the value is red. If a value of the status field is less than 400, the color of the value is green.

image

Specify colors for table cells

  • Standard Configurations > Color Scheme > Threshold: Select Threshold as the color scheme for the table. The color of the table is displayed based on the threshold that you specify.

  • Field/Column Settings > Cell Display Mode > Background Highlight: Select Background Highlight to highlight the cells that accommodate specific values of the status field in the results of Query Statement A.

  • Threshold > Threshold: Set the threshold to 400 for the status field in the results of Query Statement A. If a value of the status field is greater than or equal to 400, the color of the cell that accommodates the value is red. If the value of the status field is less than 400, the color of the cell that accommodates the value is green.

image

Specify colors for table rows

  • Standard Configurations > Color Scheme > Threshold: Select Threshold as the color scheme for the table. The color of the table is displayed based on the threshold that you specify.

  • Field/Column Settings > Cell Display Mode > Full Line Background Highlight: Select Full Line Background Highlight to highlight the rows that accommodate specific values of the status field in the results of Query Statement A.

  • Threshold > Threshold: Set the threshold to 400 for the status field in the results of Query Statement A. If a value of the status field is greater than or equal to 400, the color of the row that accommodates the value is red. If the value of the status field is less than 400, the color of the row that accommodates the value is green.

image