This topic describes how to export a Simple Log Service dashboard to Grafana.
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.
ImportantIf 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
Log on to the Log Service console.
In the Projects section, click the project that you want to manage.
In the left-side navigation pane, click Dashboard.
In the dashboard list, click the dashboard that you want to manage and choose Edit > Modify.
On the Convert to Grafana Dashboard tab, select the version of Grafana that you use.
Click Copy Grafana JSON or Download Grafana JSON to obtain the JSON-formatted content.
ImportantIf 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
Log on to Grafana.
In the left-side navigation pane, choose > Browse.
On the Browse tab, choose New > Import.
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.
In the Options step, complete the following operations:
Specify a name for the dashboard.
Select a folder in which you want to store the dashboard.
Select a data source for the dashboard.
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 |
|
Data source type |
|
Variable |
|
Statement conversion |
|
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.