All Products
Search
Document Center

Simple Log Service:Export a Simple Log Service dashboard to Grafana

Last Updated:Aug 29, 2023

This topic describes how to export a Simple Log Service dashboard to Grafana.

Important

The dashboard export feature of Simple Log Service is in public preview. To use this feature, you must submit a ticket.

Prerequisites

  • Grafana 8.0.0 or later is installed. For more information, see the Grafana documentation.

    In this topic, Grafana 9.2.4 is used.

    Important

    If you install Grafana on your computer, you must enable port 3000 in your browser settings.

  • The Simple Log Service for Grafana plug-in of version 2 is installed. For more information, see Connect Simple Log Service to Grafana.

  • If you want to use pie charts, you can run the grafana-cli plugins install grafana-piechart-panel command to install the pie chart plug-in.

Step 1: Generate and export Grafana-compliant JSON-formatted content

  1. Log on to the Log Service console.

  2. In the Projects section, click the project that you want to manage.

  3. In the left-side navigation pane, click Dashboard.

  4. In the dashboard list, click the dashboard that you want to manage and choose Edit > Modify.

  5. On the Convert to Grafana Dashboard tab, select the version of Grafana that you use.

  6. Click Copy Grafana JSON or Download Grafana JSON to obtain the JSON-formatted content.

    Important

    If a message that indicates a conversion error appears, handle the error based on the message. Otherwise, chart elements may not be displayed as expected.

Step 2: Import the Simple Log Service dashboard to Grafana

  1. Log on to Grafana.

  2. In the left-side navigation pane, choose image > Browse.

  3. On the Browse tab, choose New > Import.

  4. Click Upload JSON file to import the JSON file or enter the JSON-formatted content in the Import via panel json field. Then, click Load.

    The JSON-formatted content is obtained in Step 1: Generate and export Grafana-compliant JSON-formatted content.

  5. In the Options step, complete the following operations:

    1. Specify a name for the dashboard.

    2. Select a folder in which you want to store the dashboard.

    3. Select a data source for the dashboard.

    4. Click Import.

After the dashboard is imported, the page of the imported dashboard appears. You can view the information about the dashboard.

Content supported for conversion

When you export a Simple Log Service dashboard to Grafana, only some chart types, data sources, variables, statement conversion, and chart styles can be converted. This is because Grafana and Simple Log Service have different implementation mechanisms and features. The following table describes the content that is supported for conversion.

Category

Content supported for conversion

Chart type

  • Table (Pro)

  • Line chart (Pro)

  • Column chart (Pro)

  • Flow chart (Pro)

  • Single value chart (Pro)

  • Bar gauge (Pro)

  • Pie chart (Pro)

  • Metric Prometheus

  • Table

  • Text

  • Collapsed row

Data source type

  • Logstore (SQL)

  • Metricstore (PromQL)

  • Metricstore (SQL)

  • Builtin

Variable

  • Grafana supports only the filters of the Replace Variable type of Simple Log Service. Grafana does not support the filters of the Filter type.

  • A variable cannot contain dynamic and static list items at the same time. Grafana does not support the coexistence of dynamic variable values that are obtained from query statements and static variable values.

  • If you use a filter of the Replace Variable type, you cannot add multiple variables. You cannot add a custom variable key for a filter of the Replace Variable type in a Grafana dashboard when the filter is being used.

Statement conversion

  • SQL

  • PromQL

  • SQL+PromQL

Chart style

Matching in chart positions, sizes, titles, and legends

Limits

  • Grafana does not support the free layout provided by Simple Log Service. After you convert a free-layout Simple Log Service dashboard to a Grafana dashboard, the dashboard layout is in disorder.

  • If some configurations such as the X-axis or Y-axis configuration are missing, chart display issues may occur. In this case, you must check the parameter settings in the Configure Query and Analysis section. In some cases, you must configure all parameters in the Configure Query and Analysis section to adapt to the Simple Log Service for Grafana plug-in. Due to the limits of Grafana, we recommend that you do not select All Numeric Fields.

  • The configuration of a single value chart of Simple Log Service provides more capabilities. You can compare different field values and configure other custom settings. These operations cannot be performed in Grafana. Only the main value that is compared with can be converted.

  • Grafana does not support all features that can be used to configure a table in Simple Log Service. You can configure more custom settings for tables in Simple Log Service. For example, you can add a mini line chart or mini column chart and configure custom interaction occurrences in a table. You can also configure filters in an interaction occurrence.

  • The details of chart styles such as line types and custom details are not supported for conversion. After you export a Simple Log Service dashboard to Grafana, the details of chart styles are displayed based on the default settings of Grafana.

  • Features such as data conversion, interaction occurrences, and field configurations that are supported in Simple Log Service cannot be implemented in the same manner in Grafana.