# NR+influxdb+grafana

**URL:** <https://discourse.nodered.org/t/nr-influxdb-grafana/31667>\
**Category:** General\
**Created:** [17 August 2020 16:43 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667 "2020-08-17T16:43:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [17 August 2020 16:43 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/1 "2020-08-17T16:43:23Z")

</div>

Hi, i try to connect NR+influxdb+grafana (in order to store sensor data), but when i get to grafana dashboard I can't get any data from my sensors to the dashboard, what this error could mean ?  
I think i completed all requirements, like URL, user, pass, etc...  
Any help?

 ![2020-08-17-164012_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/8695d23dd25ec6b39d45c93fcd52dc5cd1ff0198.png)  
 ![2020-08-17-194153_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/6/56a74ad90631dabbec6689b1d471aa10fff51985.png)

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [17 August 2020 17:02 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/2 "2020-08-17T17:02:04Z")

</div>

Can you show us your flow?

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [17 August 2020 17:09 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/3 "2020-08-17T17:09:27Z")

</div>

![2020-08-17-200323_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/a/6aad32b6e7f8dfdcc3938a3339502ab32b4fa4e5.png)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [17 August 2020 19:34 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/4 "2020-08-17T19:34:37Z")

</div>

You will need to show us the structure of your data and the actual grafana query as well.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [18 August 2020 10:55 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/5 "2020-08-18T10:55:56Z")

</div>

Is this the info you ask for?  
 ![2020-08-18-134337_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/1/71a692d6d72a3ac2c37c85aa7f28e59179b8c4c2.png)

 ![2020-08-18-135049_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/f/cfc38859c63031c7e1178e10b0efda864a7e6fc8.png)  
 ![2020-08-18-135054_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/9/d996129a975cfe172f436d8677a1bd29d5e87267.png) ![2020-08-18-135100_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/f/0f0e1f1a27ce034241018dfd7543b10235cc32ca.png) ![2020-08-18-135115_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/6/669f2820ce0fdf2b0bbed048810154bef0ff6cf1.png)

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [18 August 2020 11:21 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/6 "2020-08-18T11:21:59Z")

</div>

It looks like your Grafana queries are not returning any data.

Can you from the command line do the following and show the results as in you first photo:

```auto
influx
>use TEMPERATURES
>show MEASUREMENTS
>use HUMIDITY
>show MEASUREMENTS

```

And then show the details of your Grafana queries.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [18 August 2020 11:55 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/7 "2020-08-18T11:55:36Z")

</div>

![2020-08-18-144745_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/4/c4bab4df4ab3951d75de046bd906b478012c52ba.png)

Did i not already shown the Grafana queries, or i have to show something else?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [18 August 2020 12:03 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/8 "2020-08-18T12:03:56Z")

</div>

Martin, your measurement structure is confusing, is this the first time you have used NR + InfluxDB + Grafana?

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [18 August 2020 12:11 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/9 "2020-08-18T12:11:12Z")

</div>

Yes, this the first time i use NR + InfluxDB + Grafana.

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [18 August 2020 12:30 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/10 "2020-08-18T12:30:46Z")

</div>

I suggest yo have a look at some InfluxDB tutorials, to get a better understanding of the structure, here is a good start:

> **[Influxdb Tutorial](https://csetutorials.com/influxdb-tutorial.html)**
>
> A Simple tutorial for influx time series database.

You will need an understanding of the SELECT statement to write your Grafana queries properly.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [18 August 2020 17:57 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/11 "2020-08-18T17:57:21Z")

</div>

I thought that influxdb have to use DB from NR, is it correct or not?  
Did exist any GUI platform, by which we can create DB for influxdb?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 August 2020 18:19 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/12 "2020-08-18T18:19:09Z")

</div>

That is correct, but it is up to you to decide on the design of the database. So you have to decide what are the Databases, Measurements, Fields and Tags that you want to use. If you don't know what those are or how to use them then you need to do some research.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [18 August 2020 18:30 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/13 "2020-08-18T18:30:05Z")

</div>

Can i create them with NR?  
Can something like this help?  
[https://flows.nodered.org/flow/56e2df61fbab7bb9c8b20b114ce1ccd3](https://flows.nodered.org/flow/56e2df61fbab7bb9c8b20b114ce1ccd3)

Did exist any GUI platform, by which we can create DB for influxdb?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [18 August 2020 18:39 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/14 "2020-08-18T18:39:04Z")

</div>

The tutorial I posted above shows you how to create a database. It is easy to do from the command prompt using influx:

```auto
create database mydb

```

Also the InfluxDB node documentation has examples showing how to write to the database:

> **[node-red-contrib-influxdb](https://flows.nodered.org/node/node-red-contrib-influxdb)**
>
> Node-RED nodes to save and query data from an influxdb 1.x time series database

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [18 August 2020 18:45 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/15 "2020-08-18T18:45:43Z")

</div>

I have some problem:

```auto
pi@raspberrypi:~ $ sudo service influxdb start
pi@raspberrypi:~ $ influx
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp [::1]:8086: connect: connection refused
Please check your connection settings and ensure 'influxd' is running.
pi@raspberrypi:~ $ 

```

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [18 August 2020 18:51 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/16 "2020-08-18T18:51:52Z")

</div>

How did you install InfluxDB? Previously you were connecting using influx!

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [18 August 2020 18:55 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/17 "2020-08-18T18:55:12Z")

</div>

I don't have problem until i delete one of the DBs

```auto
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/os-release
echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" | 
sudo tee /etc/apt/sources.list.d/influxdb.list

```

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [18 August 2020 19:24 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/18 "2020-08-18T19:24:03Z")

</div>

just to put a small note on this topic,

you should check if the problems you have with Graphana dashboard are because you are using Chromium browser direcly on the Raspberry pi .. there are several other posts of people having issues with Chromium and Internet explorer.

Can you check your Graphana dashboard from another computer (using you Pi ip) running latest versions of Chrome or Firefox ?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [18 August 2020 20:14 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/19 "2020-08-18T20:14:08Z")

</div>

Martin, we are now way off topic here. This is not really a node-red problem.

You need to read up on the links I posted and also get your InfluxDB installation sorted out, I would suggest starting out from the beginning if possible. A clean install of everything.

Then you should do the following:

1. Understand the principles of InfluxDB and how to create a database that meets your needs.

2. Learn how to query the database to access the data. This is important for setting up Grafana to display the data.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [23 August 2020 13:36 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/20 "2020-08-23T13:36:14Z")

</div>

I can see my DB, i just can't do the connection with grafana

 ![2020-08-23-163452_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/d/2d63580d1889ee52420ed7ad9a37f1fb318ebce3.png)  
 ![2020-08-22-204052_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/a/ba1b4d32ae034736b91a7a1ac0fec3d3d0e39f20.png)

[Next page](https://discourse.nodered.org/t/nr-influxdb-grafana/31667.md?page=2)
