{"id":24160,"date":"2025-03-09T18:59:51","date_gmt":"2025-03-10T01:59:51","guid":{"rendered":"https:\/\/tdengine.com\/?p=24160"},"modified":"2025-09-08T16:40:48","modified_gmt":"2025-09-08T23:40:48","slug":"building-real-time-dashboards-with-grafana","status":"publish","type":"post","link":"https:\/\/tdengine.com\/building-real-time-dashboards-with-grafana\/","title":{"rendered":"Building Real-Time Dashboards with Grafana"},"content":{"rendered":"\n<p>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\u2019t 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\u2019ll explore how to use Grafana to visualize time-series data and make the most of its powerful features.<\/p>\n\n\n\n<h2 class=\"gb-text\">Video<\/h2>\n\n\n\n<div class=\"gb-element-d5f0af1e\">\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Building Real-Time Dashboards with Grafana | Time-Series Database Essentials\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/qQPWFzL6rSk?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n<\/div>\n\n\n\n<h2 class=\"gb-text\">Why Grafana for Time-Series Data?<\/h2>\n\n\n\n<p>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:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Supports Multiple Data Sources:<\/strong> Works seamlessly with time-series databases like TDengine, InfluxDB, Prometheus, and TimescaleDB, as well as relational databases like PostgreSQL and MySQL.<\/li>\n\n\n\n<li><strong>Customizable Dashboards:<\/strong> Provides a flexible dashboard interface with multiple visualization options, such as line charts, heatmaps, and histograms.<\/li>\n\n\n\n<li><strong>Real-Time and Historical Data Analysis:<\/strong> Allows users to explore both real-time streaming data and historical trends for deeper insights.<\/li>\n\n\n\n<li><strong>Alerting System:<\/strong> Enables setting up alerts based on specific conditions, ensuring timely responses to critical events.<\/li>\n\n\n\n<li><strong>Plugins and Extensibility:<\/strong> Offers a wide range of plugins for additional features and integrations.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"gb-text\">Integrate TDengine with Grafana<\/h2>\n\n\n\n<p>TDengine can be easily added as a data source to existing Grafana deployments as described in <a href=\"https:\/\/docs.tdengine.com\/third-party-tools\/visualization\/grafana\/\">our documentation<\/a>. If you would like to test TDengine&#8217;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.<\/p>\n\n\n\n<figure class=\"gb-element-3bf1010f\">\n<img decoding=\"async\" width=\"2948\" height=\"898\" class=\"gb-media-39c18256\" src=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch.png?strip=all&sharp=1\" title=\"solarfarm-arch\" srcset=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch.png?strip=all&amp;sharp=1 2948w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch-300x91.png?strip=all&amp;sharp=1 300w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch-1024x312.png?strip=all&amp;sharp=1 1024w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch-768x234.png?strip=all&amp;sharp=1 768w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch-1536x468.png?strip=all&amp;sharp=1 1536w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch-2048x624.png?strip=all&amp;sharp=1 2048w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch.png?strip=all&amp;sharp=1&amp;w=589 589w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch.png?strip=all&amp;sharp=1&amp;w=1179 1179w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch.png?strip=all&amp;sharp=1&amp;w=1768 1768w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch.png?strip=all&amp;sharp=1&amp;w=2358 2358w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch.png?strip=all&amp;sharp=1&amp;w=450 450w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solarfarm-arch.png?strip=all&amp;sharp=1&amp;w=1920 1920w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/>\n<\/figure>\n\n\n\n<p>The following procedure describes how to use this setup.<\/p>\n\n\n\n<h3 class=\"gb-text\">Prerequisites<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Git on your local machine. For instructions, see the <a href=\"https:\/\/git-scm.com\/\" rel=\"noopener\">Git website<\/a>.<\/li>\n\n\n\n<li>Install Docker on your local machine. For instructions, see the <a href=\"https:\/\/www.docker.com\/\" rel=\"noopener\">Docker website<\/a>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"gb-text\">Procedure<\/h3>\n\n\n\n<ol>\n<li>\n<p>Clone the repository to your local machine.<\/p>\n\n\n\n<pre class=\"wp-block-code language-shell\"><code class=\"\" data-line=\"\">git clone https:\/\/github.com\/taosdata\/timeseries-essentials<\/code><\/pre>\n<\/li>\n\n\n\n<li>\n<p>Open the <code class=\"\" data-line=\"\">grafana<\/code> directory and run Docker Compose to create the containers:<\/p>\n\n\n\n<pre class=\"wp-block-code language-shell\"><code class=\"\" data-line=\"\">cd grafana\ndocker-compose up -d<\/code><\/pre>\n<\/li>\n\n\n\n<li>\n<p>In a web browser, open <code class=\"\" data-line=\"\">http:\/\/localhost:6060<\/code> to access the Grafana web interface.<\/p>\n<\/li>\n\n\n\n<li>\n<p>Enter <code class=\"\" data-line=\"\">admin<\/code> as your username and <code class=\"\" data-line=\"\">passwerd<\/code> as your password to log in.<\/p>\n<\/li>\n\n\n\n<li>\n<p>Add the TDengine data source to your Grafana instance.<\/p>\n\n\n\n<ol class=\"gb-element-4298a41d\">\n<li>\n<p>In the main menu on the left, select <strong>Add New Connection<\/strong>.<\/p>\n<\/li>\n\n\n\n<li>\n<p>Enter <code class=\"\" data-line=\"\">tdengine<\/code> in the search box and click <strong>TDengine Datasource<\/strong> under <strong>Data Sources<\/strong>.<\/p>\n<\/li>\n\n\n\n<li>\n<p>In the upper right corner, click <strong>Install<\/strong>. Once the installation has completed, click <strong>Add new data source<\/strong>.<\/p>\n<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>\n<p>Configure the TDengine data source as follows.<\/p>\n\n\n\n<ul class=\"gb-element-8c7f96be\">\n<li>\n<p><strong>Name:<\/strong> Retain the default value of <code class=\"\" data-line=\"\">tdengine-datasource<\/code>.<\/p>\n<\/li>\n\n\n\n<li>\n<p><strong>Host:<\/strong> Enter <code class=\"\" data-line=\"\">http:\/\/tdengine:6041<\/code>.<\/p>\n<\/li>\n\n\n\n<li>\n<p><strong>User:<\/strong> Enter <code class=\"\" data-line=\"\">root<\/code>.<\/p>\n<\/li>\n\n\n\n<li>\n<p><strong>Password:<\/strong> Enter <code class=\"\" data-line=\"\">taosdata<\/code>.<\/p>\n<\/li>\n<\/ul>\n\n\n\n<p>Then click <strong>Save &amp; Test<\/strong>.<\/p>\n<\/li>\n\n\n\n<li>\n<p>Install the sample solar farm monitoring dashboard in Grafana.<\/p>\n\n\n\n<ol class=\"gb-element-6c59d0c8\">\n<li>\n<p>In the main menu on the left, click <strong>Dashboards<\/strong>.<\/p>\n<\/li>\n\n\n\n<li>\n<p>In the upper right corner, select <strong>New<\/strong> &gt; <strong>Import<\/strong>.<\/p>\n<\/li>\n\n\n\n<li>\n<p>Click <strong>Upload dashboard JSON file<\/strong> and select the <code class=\"\" data-line=\"\">solarfarm_dashboard.json<\/code> file included in the <code class=\"\" data-line=\"\">timeseries-essentials<\/code> repository.<\/p>\n<\/li>\n\n\n\n<li>\n<p>Under <strong>renewables<\/strong>, select <code class=\"\" data-line=\"\">tdengine-datasource<\/code> as your data source.<\/p>\n<\/li>\n<\/ol>\n\n\n\n<p>Then click <strong>Import<\/strong>.<\/p>\n<\/li>\n<\/ol>\n\n\n\n<p>TDengine has now been connected to Grafana, and you can see data start to be displayed on the sample dashboard.<\/p>\n\n\n\n<img decoding=\"async\" width=\"1366\" height=\"1064\" class=\"gb-media-609afa23\" src=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solar-dashboard.png?strip=all&sharp=1\" title=\"solar-dashboard\" srcset=\"https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solar-dashboard.png?strip=all&amp;sharp=1 1366w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solar-dashboard-300x234.png?strip=all&amp;sharp=1 300w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solar-dashboard-1024x798.png?strip=all&amp;sharp=1 1024w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solar-dashboard-768x598.png?strip=all&amp;sharp=1 768w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solar-dashboard.png?strip=all&amp;sharp=1&amp;w=546 546w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solar-dashboard.png?strip=all&amp;sharp=1&amp;w=819 819w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solar-dashboard.png?strip=all&amp;sharp=1&amp;w=1092 1092w, https:\/\/eujqw4hwudm.exactdn.com\/wp-content\/uploads\/solar-dashboard.png?strip=all&amp;sharp=1&amp;w=450 450w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we\u2019ll explore how to use Grafana to visualize time-series data and make the most of its powerful features.<\/p>\n","protected":false},"author":102,"featured_media":24164,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[248],"tags":[],"ppma_author":[181],"class_list":["post-24160","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-time-series-database"],"authors":[{"term_id":181,"user_id":102,"is_guest":0,"slug":"tdengine-team","display_name":"TDengine Team","avatar_url":{"url":"https:\/\/tdengine.com\/wp-content\/uploads\/29.03-01-tdengine.png","url2x":"https:\/\/tdengine.com\/wp-content\/uploads\/29.03-01-tdengine.png"},"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts\/24160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/users\/102"}],"replies":[{"embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/comments?post=24160"}],"version-history":[{"count":6,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts\/24160\/revisions"}],"predecessor-version":[{"id":28368,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts\/24160\/revisions\/28368"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/media\/24164"}],"wp:attachment":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/media?parent=24160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/categories?post=24160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/tags?post=24160"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/ppma_author?post=24160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}