All Products
Search
Document Center

Simple Log Service:Interaction occurrences

最終更新日:Jul 23, 2024

When you create a chart (Pro) in a dashboard, you can configure an interaction occurrence. This topic describes the interaction occurrences that you can configure.

Introduction

Interaction occurrences are important for data analysis. You can use interaction occurrences to switch between the levels of data dimensions and the analysis granularities to obtain more detailed information. If you use a chart (Pro), you can configure an interaction occurrence for the results of a single query statement or for a single column of data in the results. Simple Log Service supports the following types of interaction occurrences: Open Logstore, Open Saved Search, Open Dashboard, Open Trace Analysis, Open Trace Details, and Create Custom HTTP URL.

For more information about the entry point to configure an interaction occurrence, see Add a chart (Pro) to a dashboard.

Open Logstore

You can select Open Logstore from the Add Event drop-down list to configure an interaction occurrence. When the interaction occurrence is triggered, you are navigated to the page of the Logstore that is created.

  • Prerequisites

    A Logstore is created. For more information, see Create a Logstore.

  • Parameters

    Parameter

    Description

    Custom Name

    The name of the interaction occurrence.

    Select Project

    The project to which the Logstore belongs.

    Select Logstore

    The Logstore that is created. When the interaction occurrence is triggered, you are navigated to the page of the Logstore.

    Open New Window

    If you turn on Open New Window, a new page is displayed when you click Open Logstore to trigger the interaction occurrence.

    Time Range

    The time range of the data to query in the Logstore.

    Inherit Filter Condition

    If you turn on Inherit Filter Condition, the filter conditions that are added to the current dashboard are synchronized to the Logstore. Then, you can enter a query statement after the filter conditions. The query statement and the filter conditions are evaluated by using a logical AND.

    Filter Statement

    The filter statement, which can be synchronized to the Logstore. Then, you can enter a query statement after the filter statement. The two statements are evaluated by using a logical AND.

    You can click Add Variable to add variables to the filter statement. The following list describes important system variables:

    • ${{__start_time__}}: the query start time.

    • ${{__end_time__}}: the query end time.

    • ${{__interval__}}: the interval between two query requests. Unit: seconds.

    • ${{__project__}}: the name of the project to query.

    After you add a variable, the value of the variable is used as a filter condition.

Open Dashboard

You can select Open Dashboard from the Add Event drop-down list to configure an interaction occurrence. When the interaction occurrence is triggered, you are navigated to the page of the destination dashboard.

  • Prerequisites

    A destination dashboard is created and a chart is created in the destination dashboard. For more information, see Add a chart (Pro) to a dashboard.

    If you want to configure a variable for the interaction occurrence, make sure that the variable is configured in the query statement for the chart that you create in the destination dashboard. For more information, see Variables.

  • Parameters

    Parameter

    Description

    Custom Name

    The name of the interaction occurrence.

    Select Project

    The project to which the destination dashboard belongs.

    Select Dashboard

    The destination dashboard. When the interaction occurrence is triggered, you are navigated to the page of the destination dashboard.

    Open New Window

    If you turn on Open New Window, a new page is displayed when you click Open Dashboard to trigger the interaction occurrence.

    Time Range

    The time range of the data to query in the destination dashboard.

    Inherit Filter Condition

    If you turn on Inherit Filter Condition, the filter conditions that are added to the current dashboard are synchronized to the destination dashboard.

    Inherit Variable

    If you turn on Inherit Variable, the variables that are configured for the current dashboard are synchronized to the destination dashboard.

    Filter Statement

    The filter statement, which can be synchronized to the destination dashboard.

    You can add a variable to the filter statement.

    You can click Add Variable to add variables to the filter statement. The following list describes important system variables:

    • ${{__start_time__}}: the query start time.

    • ${{__end_time__}}: the query end time.

    • ${{__interval__}}: the interval between two query requests. Unit: seconds.

    • ${{__project__}}: the name of the project to query.

    After you add the variable, the value of the variable is used as a filter condition.

    Dynamic Variables

    Simple Log Service allows you to synchronize the variable that you specify to the destination dashboard.

    • Dynamic variable name: the name of the variable.

    • Dynamic variable value-related column: the column from which the system dynamically retrieves a value for the dynamic variable. The value is then synchronized to the destination dashboard.

    Note

    You can add up to five dynamic variables.

    Static Variables

    Simple Log Service allows you to synchronize the variable that you specify to the destination dashboard.

    • Static variable name: the name of the variable.

    • Static variable value: the fixed value of the static variable. The value is directly synchronized to the destination dashboard.

    Note

    You can add up to five static variables.

Create Custom HTTP URL

You can select Create Custom HTTP URL from the Add Event drop-down list to configure an interaction occurrence. When the interaction occurrence is triggered, you are navigated to the page that you specify.

  • Prerequisites

    An HTTP URL is available.

  • Parameters

    Parameter

    Description

    Custom Name

    The name of the interaction occurrence.

    Protocol

    The protocol for the URL.

    URL

    The URL of the page to which you want to be navigated.

    You can add the following system variables of Simple Log Service to the URL. Example: https://sls.console.aliyun.com/lognext/project/${{__project__}}/logsearch/test.

    • ${{__start_time__}}: the query start time.

    • ${{__end_time__}}: the query end time.

    • ${{__interval__}}: the interval between two query requests. Unit: seconds.

    • ${{__project__}}: the name of the project to query.

    Transcode

    If you turn on Transcode, the URL is encoded.

    Open New Window

    If you turn on Open New Window, a new page is displayed when you click Create Custom HTTP URL to trigger the interaction occurrence.

Open Saved Search

You can select Open Saved Search from the Add Event drop-down list to configure an interaction occurrence. When the interaction occurrence is triggered, you are navigated to the page of the saved search that is created.

  • Prerequisites

    A saved search is created. For more information, see Saved search.

    If you want to configure a variable for the interaction occurrence, make sure that the variable is configured in the query statement of the saved search. For more information, see Variables.

  • Parameters

    Parameter

    Description

    Custom Name

    The name of the interaction occurrence.

    Select Project

    The project to which the saved search belongs.

    Select Saved Query

    The saved search that is created. When the interaction occurrence is triggered, you are navigated to the page of the saved search.

    Open New Window

    If you turn on Open New Window, a new page is displayed when you click Open Saved Search to trigger the interaction occurrence.

    Time Range

    The time range of the data to query on the page of the saved search.

    Inherit Filter Condition

    If you turn on Inherit Filter Condition, the filter conditions that are added to the current dashboard are synchronized to the saved search. Then, you can enter a query statement after the filter conditions. The query statement and the filter conditions are evaluated by using a logical AND.

    Filter Statement

    The filter statement, which can be synchronized to the saved search. Then, you can enter a query statement after the filter statement. The two statements are evaluated by using a logical AND.

    You can add a variable to the filter statement. After you add the variable, the value of the variable is used as a filter condition.

    Dynamic Variables

    Simple Log Service allows you to modify the query statement of the saved search by using variables. If the variable that you specify for Dynamic Variables is the same as a variable in the query statement of the saved search, the variable in the query statement is replaced with a value of the column that you specify for Dynamic Variables.

    • Dynamic variable name: the name of the variable.

    • Dynamic variable value-related column: the column from which the system dynamically retrieves a value for the dynamic variable. The value is used to replace the variable in the query statement of the saved search.

    Note

    You can add up to five dynamic variables.

    Static Variables

    Simple Log Service allows you to modify the query statement of the saved search by using variables. If the variable that you specify for Static Variables is the same as a variable in the query statement of the saved search, the variable in the query statement is replaced with the value that you specify for Static Variables.

    • Static variable name: the name of the variable.

    • Static value: the fixed value of the static variable. The value is used to replace the variable in the query statement of the saved search.

    Note

    You can add up to five static variables.

Open Trace Analysis

You can select Open Trace Analysis from the Add Event drop-down list to configure an interaction occurrence. When the interaction occurrence is triggered, you are navigated to the analysis page of the trace instance that is created.

  • Prerequisites

    A trace instance is created and traces are collected to Simple Log Service. For more information, see Overview.

  • Parameters

    Parameter

    Description

    Custom Name

    The name of the interaction occurrence.

    Open New Window

    After you turn on Open New Window, a new page is displayed when you click Open Trace Analysis to trigger the interaction occurrence.

    Time Range

    The time range of the data to query on the analysis page of the trace instance that is created.

    Trace Instance

    The trace instance that is created. When the interaction occurrence is triggered, you are navigated to the analysis page of the trace instance.

    Filter Statement

    The filter statement, which can be synchronized to the analysis page of the trace instance.

    You can add a variable to the filter statement. After you add the variable, the value of the variable is used as a filter condition.

Open Trace Details

You can select Open Trace Details from the Add Event drop-down list to configure an interaction occurrence. When the interaction occurrence is triggered, you are navigated to the details page of the trace instance that is created.

  • Prerequisites

    A trace instance is created and traces are collected to Simple Log Service. For more information, see Overview.

  • Parameters

    Parameter

    Description

    Custom Name

    The name of the interaction occurrence.

    Open New Window

    After you turn on Open New Window, a new page is displayed when you click Open Trace Details to trigger the interaction occurrence.

    Time Range

    The time range of the data to query on the details page of the trace instance that is created.

    Trace Instance

    The trace instance that is created. When the interaction occurrence is triggered, you are navigated to the details page of the trace instance.

    Trace ID

    The ID of the trace instance.

    Span ID

    The ID of the span.

Open Full-stack Observability Trace Analysis

You can select Open Full-stack Observability Trace Analysis from the Add Event drop-down list to configure an interaction occurrence. When the interaction occurrence is triggered, you are navigated to the trace analysis page of the Full-stack Observability instance that is created.

  • Prerequisites

    A Full-stack Observability instance is created. For more information, see Create an instance.

  • Parameters

    Parameter

    Description

    Custom Name

    The name of the interaction occurrence.

    Open New Window

    If you turn on Open New Window, a new page is displayed when you click Open Full-stack Observability Trace Analysis to trigger the interaction occurrence.

    Time Range

    The time range of the data to query on the trace analysis page of the Full-stack Observability instance.

    Full-stack Observability Instance

    The Full-stack Observability instance that is created. When the interaction occurrence is triggered, you are navigated to the trace analysis page of the Full-stack Observability instance.

    Filter Statement

    The filter statement, which can be synchronized to the trace analysis page of the Full-stack Observability instance.

    You can add a variable to the filter statement. After you add the variable, the value of the variable is used as a filter condition.

    You can click Add Variable to add variables to the filter statement. The following list describes important system variables:

    • ${{__start_time__}}: the query start time.

    • ${{__end_time__}}: the query end time.

    • ${{__interval__}}: the interval between two query requests. Unit: seconds.

    • ${{__project__}}: the name of the project to query.

    After you add the variable, the value of the variable is used as a filter condition.

Open Full-stack Observability Trace Details

You can select Open Full-stack Observability Trace Details from the Add Event drop-down list to configure an interaction occurrence. When the interaction occurrence is triggered, you are navigated to the trace details page of the Full-stack Observability instance that is created.

  • Prerequisites

    A Full-stack Observability instance is created. A trace instance is created and traces are collected to Simple Log Service. For more information, see Create an instance and Overview.

  • Parameters

    Parameter

    Description

    Custom Name

    The name of the interaction occurrence.

    Open New Window

    If you turn on Open New Window, a new page is displayed when you click Open Full-stack Observability Trace Details to trigger the interaction occurrence.

    Time Range

    The time range of the data to query on the trace details page of the Full-stack Observability instance.

    Full-stack Observability Instance

    The Full-stack Observability instance that is created. When the interaction occurrence is triggered, you are navigated to the trace details page of the Full-stack Observability instance.

    Trace ID

    The ID of the trace.

    Span ID

    The ID of the span.

Configuration example

This section provides an example on how to configure an interaction occurrence by using a Logstore named website_log that stores NGINX access logs and two dashboards named RequestMethod and destination_drilldown.

  • Add a table of request methods to the RequestMethod dashboard and configure an interaction occurrence for the table to open the destination_drilldown dashboard.

  • Add a line chart that displays the trend of page views (PVs) over time to the destination_drilldown dashboard.

After the configurations are complete, you can click a request method on the RequestMethod dashboard to access the destination_drilldown dashboard. Then, you can view the trend of PVs over time on the destination_drilldown dashboard. You can perform the following operations to configure the interaction occurrence:

  1. Add a line chart that displays the trend of PVs over time to the destination_drilldown dashboard.

    Enter the following query statement. ${{method|PUT}} specifies a variable. For more information, see Add a chart (Pro) to a dashboard.

    request_method: ${{method|PUT}} | SELECT __time__ - __time__ %60 AS time, COUNT(1) AS PV GROUP BY time ORDER BY time

    交互事件

  2. Add a table of request methods to the RequestMethod dashboard and configure an interaction occurrence for the table.

    Enter the query statement shown in the following figure. For more information, see Add a chart (Pro) to a dashboard.

    交互事件

    Configure the interaction occurrence based on the following figure.

    • Set Select Dashboard to destination_drilldown.

    • Add a dynamic variable named method and select the request_method column.

    交互事件

  3. Verify the interaction occurrence.

    On the RequestMethod dashboard, click GET and click Open Dashboard. You are navigated to the destination_drilldown dashboard.

    请求方法

    The trend of PVs for GET requests over time is displayed in a line chart.

    跳转后仪表盘