Log Service allows you to save query results as charts to a dashboard. This topic describes how to add charts to a dashboard.
A dashboard can contain a maximum of 50 charts.
- Log on to the Log Service console.
- In the Projects section, click the project in which you want to query and analyze logs.
- Query logs.
- Choose . Find the Logstore that you want to manage and 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.
- 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.
- 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.
- On the Data Source tab, select the keyword in the query statement and click Generate Variable. You can configure multiple placeholder variables.
- Configure the parameters of a placeholder 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.
- 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 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.
- Click Add to New Dashboard.
- 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.