Log Service allows you to save query results as charts to a dashboard. This topic describes how to add charts to a dashboard.

Prerequisites

  • Log data is collected. For more information, see Data collection.
  • The indexing feature of a Logstore is enabled, and indexes are created. For more information, see Configure indexes.

Limits

A dashboard can contain a maximum of 50 charts.

Procedure

  1. Log on to the Log Service console.
  2. In the Projects section, click the project in which you want to query and analyze logs.
  3. Query logs.
    1. Choose Log Storage > Logstores. Find the Logstore that you want to manage and choose Management icon > Search & Analysis..
    2. On the page that appears, enter a query statement in the search box and click Search & Analyze.
  4. On the Graph tab, select a chart type.
  5. On the Properties tab, configure the properties of the chart.
    The properties that can be configured vary based on the chart types. For more information, see Charts.
  6. Optional:Configure a placeholder variable.
    Before you perform drill-down and filter data, you must configure a placeholder variable for the chart. For example, you can configure a placeholder variable for a chart, such as Chart A, and save the chart to a dashboard, such as Dashboard A. Then, you can configure a drill-down event for another chart, such as Chart B, to link with Dashboard A. If the name of the placeholder variable that you specify for Chart B is the same as that for Chart A, you are redirected to Dashboard A when you click a value in Chart B. In addition, the value of the placeholder variable in Chart A is replaced with the chart value that you click, and the new query statement is executed in Chart A. For more information, see Configure a drill-down event.
    1. On the Data Source tab, select the keyword in the query statement and click Generate Variable.
      You can configure multiple placeholder variables.
    2. Configure the parameters of a placeholder variable.
      Generate Variable
      Parameter Description
      Variable Name The name of the placeholder variable.
      Default Value The default value of the placeholder variable in the current chart.
      Matching Mode Valid values:
      • Global Match: replaces all keywords that are the same as the keyword that you select in the query statement with the name of the placeholder variable.
      • Exact Match: replaces only the keyword that you select in the query statement with the name of the placeholder variable.
      Result The query statement that contains the configured placeholder variable.
  7. Optional:Configure a drill-down event.
    After you configure a drill-down event for the chart, you can click a value on the chart to view more details and perform analysis.
    On the Interactive Behavior tab, configure a drill-down event. For more information, see Configure a drill-down event. Interactive Behavior
  8. Click Add to New Dashboard.
  9. In the dialog box that appears, specify the dashboard and chart name and click OK.
    Parameter Description
    Operation Valid values:
    • Add to Existing Dashboard: adds the chart to an existing dashboard.
    • Create Dashboard: creates a dashboard and adds the chart to the dashboard.
    Dashboards Select an existing dashboard.

    This parameter is required only when you set the Operation parameter to Add to Existing Dashboard.

    Dashboard Name Enter a name for the new dashboard.

    This parameter is required only when you set the Operation parameter to Create Dashboard.

    Chart Name Enter a name for the chart. The chart name is displayed as the chart title on the dashboard.

You can add multiple charts to a dashboard. You can add a chart to the dashboard at a time.