All Products
Search
Document Center

Lindorm:Access LindormTSDB by using Grafana

Last Updated:Jun 21, 2026

Grafana is an open-source tool for visualizing large-scale metric data. It is widely used for internet application analysis and is popular in fields such as industrial monitoring, weather monitoring, home automation, and process management.Lindorm provides an Alibaba Cloud Lindorm data source plugin that allows you to add Lindorm as a data source in Grafana. This topic describes how to connect to LindormTSDB for visual data analysis.

Using Managed Service for Grafana

Prerequisites

Procedure

This section uses Grafana 10.0.x as an example.

  1. Log on to the Managed Service for Grafana console. In the left-side navigation pane, click Workspace Management.

  2. In the Basic Information section, click the public or private address to open the Grafana UI. Enter your username and password to log in. The username is admin, and the password is the one you set when creating the workspace.

  3. Add a Lindorm data source in Grafana.

    1. Click the image.png icon in the upper-left corner and select Manage. Then, click Data sources.

    2. On the Data sources page, click Add data source.

    3. This opens the page for adding a new data source.

    4. On the Add data source page, search for Alibaba Cloud Lindorm and click it.

    5. On the Settings tab, configure the following parameters. Leave other parameters at their default values.

      Setting

      Parameter

      Required

      Description

      Name

      Yes

      A custom name for the data source.

      HTTP

      URL

      Yes

      The HTTP endpoint of LindormTSDB. For more information, see View the connection information of LindormTSDB.

      Important

      Use the public address of LindormTSDB and add the public IP address of Grafana to the Lindorm whitelist.

      Auth

      Basic auth

      No

      If user authentication is enabled for LindormTSDB, enable Basic auth and enter the username and password for LindormTSDB in the Basic Auth Details section. For more information about user authentication, see Manage users and permissions.

      Basic auth details

      User

      No

      The username for LindormTSDB. Required only if Basic auth is enabled.

      Password

      No

      The password for LindormTSDB. Required only if Basic auth is enabled.

      Lindorm TSDB details

      Database

      No

      The LindormTSDB database that you want to access.

    6. Click Save & test.

      A "test success" message indicates that the connection is successful.

  4. Click Build a dashboard.

  5. On the New Dashboard page, click Add visualization.

  6. Select the Lindorm data source that you added in Step 3.

  7. On the Query tab, configure your query.

    1. From the Data source list, select your data source.

    2. Grafana provides two query editor modes: the template-based query editor and the SQL statement editor.

      SQL statement editor

      Click the 切换 icon in the upper-right corner of section A to switch to the raw query editor. You can then enter Lindorm SQL statements to perform complex queries. For example:

      SELECT region,time,avg(temperature) FROM sensor WHERE time >= $from AND time <= $to SAMPLE BY $interval
      Note

      For more information about Lindorm SQL syntax, see SELECT syntax.

      • The time condition time >= $from AND time <= $to is mandatory; otherwise, the query will fail. The parameter values are automatically replaced with the time range selected on the dashboard.

      • Under Query options, use the Min interval and Max data points settings to adjust the Interval.

      • Use ALIAS BY to rename a time series label. The format is $tag_<tag_name>. For example, if you use $tag_host, the time series label displays the value of the host tag.

      • Use OFFSET to set a time offset, which helps you compare data from different time periods.

      Template-based query editor

      You can perform simple queries by using a template to select the table, fields, and query conditions. The following table describes the keywords.

      Keyword

      Description

      SELECT

      Select the field names to query.

      FROM

      Select the table name to query.

      WHERE

      Add query conditions.

      GROUP BY

      Add aggregation conditions.

      SAMPLE BY

      Select the time interval for downsampling. For more information, see Downsampling queries.

      Click Query options to adjust the Interval parameter by using the Min interval and Max data points settings.

      ORDER BY TIME

      Sort the query results by time.

      LIMIT

      Specify the number of rows to return in the result set.

      ALIAS BY

      Rename a time series label. The format is $tag_<tag_name>. For example, if you use $tag_host, the time series label displays the value of the host tag.

      OFFSET

      Set a time offset, which helps you compare data from different time periods.

Using a self-managed Grafana on ECS

Deployment requirements

  • The ECS instance must use CentOS 7.3 64-bit or later.

  • The ECS instance must have at least 1 vCPU, 2 GB of memory, and 10 GB of available disk space.

Prerequisites

Before you begin, make sure you have completed the following:

  • Add an inbound rule to the security group of the ECS instance to allow traffic on port 3000. For more information, see Add a security group rule.

  • Add the IP address of the ECS instance to the Lindorm whitelist.

    If the ECS instance and the Lindorm instance are in the same VPC: Add the primary private IP address of the ECS instance to the Lindorm instance whitelist. For more information, see Configure a whitelist.

    If the ECS instance and the Lindorm instance are not in the same VPC:

  • If you access the Grafana web UI over the internet, make sure the ECS instance has a public IP address. If it does not, associate an EIP with a cloud resource or change the bandwidth configuration. A public IP address is not required if you access the Grafana web UI over a VPC.

Procedure

  1. Install Grafana. If Grafana is already installed, skip this step.

    1. Log on to the ECS instance. For more information, see Connect to an ECS instance.

    2. Run the following command to download Grafana:

      wget https://dl.grafana.com/enterprise/release/grafana-enterprise-8.2.2-1.x86_64.rpm
      Note

      This example uses Grafana Enterprise Edition 8.2.2-1. You can install other versions. For more download addresses, see the official Grafana website.

    3. Run the following command to install Grafana:

      sudo yum install grafana-enterprise-8.2.2-1.x86_64.rpm
    4. Run the following command to start the Grafana service:

      sudo service grafana-server start
  2. Install the Alibaba Cloud Lindorm data source plugin.

    1. Run the following command to download the Lindorm data source plugin package. Select the correct download link for your Grafana version.

      • For Grafana 11.0 and later:

      wget https://hbaseuepublic.oss-cn-beijing.aliyuncs.com/grafana-alibabacloud-lindorm-datasource-11.0.1.zip
      • For Grafana 10.x and earlier:

      wget https://tsdbtools.oss-cn-hangzhou.aliyuncs.com/grafana-alibabacloud-lindorm-datasource-latest.zip
    2. Run the following command to extract the plugin to the default directory. In Linux, the default directory is /var/lib/grafana/plugins/.

      unzip grafana-alibabacloud-lindorm-datasource-latest.zip -d /var/lib/grafana/plugins/
    3. Run the following command to edit the grafana.ini file. In Linux, the default file path is /etc/grafana/grafana.ini.

      sudo nano -w  /etc/grafana/grafana.ini
    4. In the [plugins] section, change ;allow_loading_unsigned_plugins= to allow_loading_unsigned_plugins = alibabacloud-lindorm-datasource. After the modification, press CTRL+O to save the file and press Enter to exit the editor.

      Important

      When you edit the grafana.ini file, you must remove the semicolon (;) from the beginning of ;allow_loading_unsigned_plugins.

    5. Run the following command to restart the Grafana service:

      sudo service grafana-server restart
  3. Add a Lindorm data source in Grafana.

    1. In a web browser, go to http://IP:3000/, where IP is the public IP or primary private IP address of your ECS instance. Enter your username and password. The default username and password for the first login are both admin. We recommend changing your password immediately after logging in. For more details, see Sign in to Grafana.

    2. Click the 设置 icon in the left-side navigation pane and select Data Sources.

    3. On the Configuration page, click Add data source.

    4. On the Add data source page, search for Alibaba Cloud Lindorm and click Select.

    5. On the Settings tab, configure the following parameters. Leave other parameters at their default values.

      Setting

      Parameter

      Required

      Description

      Name

      Yes

      A custom name for the data source.

      HTTP

      URL

      Yes

      The HTTP endpoint of LindormTSDB. For more information, see View the connection information of LindormTSDB.

      Important
      • If your ECS instance is in the same VPC as the Lindorm instance, use the VPC endpoint of LindormTSDB. Otherwise, use the public address.

      • If you use the VPC endpoint, add the primary private IP address of the ECS instance to the Lindorm whitelist. If you use the public address, add the public IP address of the ECS instance to the Lindorm whitelist.

      Auth

      Basic auth

      No

      If user authentication is enabled for LindormTSDB, enable Basic auth and enter the username and password for LindormTSDB in the Basic Auth Details section. For more information about user authentication, see Manage users and permissions.

      Basic auth details

      User

      No

      The username for LindormTSDB. Required only if Basic auth is enabled.

      Password

      No

      The password for LindormTSDB. Required only if Basic auth is enabled.

      Lindorm TSDB details

      Database

      No

      The LindormTSDB database that you want to access.

    6. Click Save & test.

      A "test success" message indicates that the connection is successful.

  4. Create and use a dashboard in Grafana. For more information, see Create a dashboard.

  5. On the Query tab, configure your query.

    1. From the Data source list, select your data source.

    2. Grafana provides two query editor modes: the template-based query editor and the SQL statement editor.

      SQL statement editor

      Click the 切换 icon in the upper-right corner of section A to switch to the raw query editor. You can then enter Lindorm SQL statements to perform complex queries. For example:

      SELECT region,time,avg(temperature) FROM sensor WHERE time >= $from AND time <= $to SAMPLE BY $interval
      Note

      For more information about Lindorm SQL syntax, see SELECT syntax.

      • The time condition time >= $from AND time <= $to is mandatory; otherwise, the query will fail. The parameter values are automatically replaced with the time range selected on the dashboard.

      • Under Query options, use the Min interval and Max data points settings to adjust the Interval.

      • Use ALIAS BY to rename a time series label. The format is $tag_<tag_name>. For example, if you use $tag_host, the time series label displays the value of the host tag.

      • Use OFFSET to set a time offset, which helps you compare data from different time periods.

      Template-based query editor

      You can perform simple queries by using a template to select the table, fields, and query conditions. The following table describes the keywords.

      Keyword

      Description

      SELECT

      Select the field names to query.

      FROM

      Select the table name to query.

      WHERE

      Add query conditions.

      GROUP BY

      Add aggregation conditions.

      SAMPLE BY

      Select the time interval for downsampling. For more information, see Downsampling queries.

      Click Query options to adjust the Interval parameter by using the Min interval and Max data points settings.

      ORDER BY TIME

      Sort the query results by time.

      LIMIT

      Specify the number of rows to return in the result set.

      ALIAS BY

      Rename a time series label. The format is $tag_<tag_name>. For example, if you use $tag_host, the time series label displays the value of the host tag.

      OFFSET

      Set a time offset, which helps you compare data from different time periods.