Log Service allows you save query results as charts to a dashboard. This topic describes how to add an analysis chart to a dashboard.
- Log data is collected. For more information, see Data collection.
- The indexing feature of the Logstore is enabled and indexes are configured. For more information, see Enable and configure the index feature for a Logstore.
Each dashboard can contain a maximum of 50 analysis charts.
- Log on to the Log Service console.
- In the Projects section, click a project.
- Query logs.
- Choose . Find the target Logstore, and then choose .
- On the page that appears, enter a query statement in the search box, and click Search & Analyze.
- On the Graph tab, select a chart type, such as the line chart.
- On the Properties tab, configure the properties of the chart.The properties vary depending on the chart types. For more information, see Charts.
- Optional:Set a placeholder variable. Set a placeholder variable for the chart. Then you can perform drill-down analysis and filter data. For example, you configure a placeholder variable for the current chart and then save the chart to Dashboard A. Then you configure a drill-down event for another chart. The variable name that you configure for the chart is the same as the placeholder variable. When you click a value on the chart, you are redirected to Dashboard A. At the same time, the placeholder variable is replaced with the chart value that you click, and the new query statement of the current chart is executed. For more information, see Configure drill-down analysis for a chart of a Logstore.
- On the Data Source tab, select the keyword in the query statement and click Generate Variable.You can configure multiple variables.
- Set the parameters. The following table describes the parameters.
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: matches all words that are the same as the selected keyword in the query statement as variables.
- Exact Match: matches the selected keyword in the query statement as a variable.
Result The query statement that contains the specified variable.
- On the Data Source tab, select the keyword in the query statement and click Generate Variable.
- 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 implement a more fine-grained analysis.On the Interactive Behavior tab, specify the fields for which you need to enable drill-down analysis. For more information, see Configure drill-down analysis for a chart of a Logstore.
- Click Add to New Dashboard.
- In the dialog box that appears, specify the dashboard and chart name, and then click
Parameter Description Operation Valid values:
- Add to Existing Dashboard: adds the chart to an existing dashboard.
- Create Dashboard: creates a dashboard and then add 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 The name of the chart. The chart name is displayed as the chart title on the dashboard.
You can add up to 50 analysis charts to the dashboard.