Time-series data is everywhere, from monitoring industrial sensors and tracking financial markets to logging system performance and analyzing user behavior. However, raw data alone isn’t always useful. Effective visualization helps uncover patterns, detect anomalies, and drive better decisions. This is where Grafana, an open-source analytics and monitoring tool, shines. In this article, we’ll explore how to use Grafana to visualize time-series data and make the most of its powerful features.
Video
Why Grafana for Time-Series Data?
Grafana is one of the most popular visualization tools for time-series data, thanks to its versatility, real-time monitoring capabilities, and compatibility with various databases. The following are key advantages of Grafana:
- Supports Multiple Data Sources: Works seamlessly with time-series databases like TDengine, InfluxDB, Prometheus, and TimescaleDB, as well as relational databases like PostgreSQL and MySQL.
- Customizable Dashboards: Provides a flexible dashboard interface with multiple visualization options, such as line charts, heatmaps, and histograms.
- Real-Time and Historical Data Analysis: Allows users to explore both real-time streaming data and historical trends for deeper insights.
- Alerting System: Enables setting up alerts based on specific conditions, ensuring timely responses to critical events.
- Plugins and Extensibility: Offers a wide range of plugins for additional features and integrations.
Integrate TDengine with Grafana
TDengine can be easily added as a data source to existing Grafana deployments as described in our documentation. If you would like to test TDengine’s integration with Grafana for yourself, we also provide a Docker Compose setup that includes a sample data generator for solar farms. This setup is described in the following diagram.

The following procedure describes how to use this setup.
Prerequisites
- Install Git on your local machine. For instructions, see the Git website.
- Install Docker on your local machine. For instructions, see the Docker website.
Procedure
-
Clone the repository to your local machine.
git clone https://github.com/taosdata/timeseries-essentials
-
Open the
grafana
directory and run Docker Compose to create the containers:cd grafana docker-compose up -d
-
In a web browser, open
http://localhost:6060
to access the Grafana web interface. -
Enter
admin
as your username andpasswerd
as your password to log in. -
Add the TDengine data source to your Grafana instance.
-
In the main menu on the left, select Add New Connection.
-
Enter
tdengine
in the search box and click TDengine Datasource under Data Sources. -
In the upper right corner, click Install. Once the installation has completed, click Add new data source.
-
-
Configure the TDengine data source as follows.
-
Name: Retain the default value of
tdengine-datasource
. -
Host: Enter
http://tdengine:6041
. -
User: Enter
root
. -
Password: Enter
taosdata
.
Then click Save & Test.
-
-
Install the sample solar farm monitoring dashboard in Grafana.
-
In the main menu on the left, click Dashboards.
-
In the upper right corner, select New > Import.
-
Click Upload dashboard JSON file and select the
solarfarm_dashboard.json
file included in thetimeseries-essentials
repository. -
Under renewables, select
tdengine-datasource
as your data source.
Then click Import.
-
TDengine has now been connected to Grafana, and you can see data start to be displayed on the sample dashboard.
