You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Use dashboard
Export dashboards in Grafana format
Copy page
Download PDF
Export dashboards in Grafana format
This section describes how to export the JSON script of a dashboard in Grafana format.​
Background information​
TLS supports quick integration with Grafana, making it easy to visualize and analyze log data from TLS in Grafana:​
​
Integration methods​
Description​
Log topic method​
Install the data source plugin provided by TLS, import log topic data into Grafana, then import the dashboard or manually create a dashboard and add relevant charts. For details, see .​
Dashboard method​
Export the JSON script of the dashboard in Grafana format from TLS, then import the dashboard into the Grafana platform.​
​
Limits​
​
Items​
Description​
Version limitations​
Grafana supports versions 8.0.x to 12.x.​
Version 8.3.x is not recommended, as mixed data sources may experience lag.​
Time limitations​
Dashboards in TLS support specifying a query time range, but Grafana dashboards share a single time range.​
The time range of the exported dashboard in Grafana format will default to Last 15 minutes.​
Syntax limitations​
To ensure compatibility with the query syntax in TLS dashboards, the TLS data source plugin must be installed in Grafana in advance.​
Chart limitations​
The following chart types are currently supported for export. For chart types not listed below, compatibility issues may occur when importing into Grafana:​
  • Table​
  • Line chart​
  • Bar chart​
  • Stream chart (converted to Grafana time series chart)​
  • Stat chart​
  • Measurement chart​
  • Pie chart​
  • Text (supports Markdown/HTML/Code)​
​
Prerequisites​
  • A dashboard has been prepared, and the chart types in the dashboard must comply with the chart types listed in the usage restrictions. For details on creating a dashboard, see Create a blank dashboard.​
  • The TLS data source plugin has been installed in Grafana, and the corresponding data source UID (Datasource UID) has been obtained. For details, see Visualize and analyze logs via Grafana.​
Export dashboards in Grafana format​
  1. Log in to TLS console.​
  1. Select the region where log service is located from the top navigation bar.​
  1. In the left navigation pane, choose Common functions > Dashboard.​
  1. In the dashboard list, click the dashboard under the target project.​
  1. At the top of the dashboard, click the settings icon.​
  1. Click Convert to Grafana format dashboard and configure the dashboard parameters.​
  • ​
    Parameters​
    Description​
    Select your Grafana version​
    Select the version of Grafana.​
    Account mode​
    Choose whether to enable Account mode based on the method used to add the TLS data source plugin in Grafana.​
    • Enable: Enable this option if the data source plugin has AccountMode enabled. This configures the data source plugin using a specified access key, allowing you to view data for all log topics under the current account.​
    • If new log topics are added under the current account, they will be automatically synchronized to the corresponding data source.​
    • After enabling, the target will automatically populate the region, topicId, and topicLabel fields.​
    • Disable: Disable this option if the data source plugin does not have AccountMode enabled. This configures the data source plugin for a specified log topic, allowing you to view only the data for the currently specified log topic.​
    Datasource Type​
    Set the Grafana data source type to distinguish between data sources.​
    You can set it to the name of the data source plugin, such as tls-grafana-datasource.​
    Datasource UID​
    Set the obtained Grafana data source UID.​
    Processing time SQL​
    Choose whether to enable processing time SQL.​
    • Enable (recommended): When enabled, the date_trunc function in SQL will be automatically converted to adapt to the Grafana timeline (millisecond level).​
    • Supports converting the date_trunc function to (field - field % interval) * 1000.​
    • If Grafana prompts that a time field is required or the data lacks a time field, please enable this option.​
    • Disable: Unable to automatically adapt to the Grafana timeline.​
    Aggregation interval (seconds)​
    After enabling processing time SQL, set a mandatory aggregation interval (in seconds).​
    • If left blank or set to 0, the interval will be automatically inferred based on the date_trunc unit (day = 86400, and so on).​
    • For example, entering 300 means aggregation by 5 minutes.​
    ​
  1. Obtain the JSON script of the dashboard in Grafana format.​
  • Copy: Click Copy Grafana format JSON to copy the JSON content to the clipboard.​
  • Download: Click Download Grafana format JSON to download the JSON file locally.​
Notice​
To import the dashboard into Grafana, see Import TLS dashboard for details.​
​
​
Last updated: 2026.04.27 14:26:45