# 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:** 3

<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:** [24 August 2020 16:34 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/41 "2020-08-24T16:34:03Z")

</div>

Also, have you not got a PC connected to the network? I assume you only have a small screen on the pi which is why we can't see it all. If you connect to grafana from the PC using the IP address of the pi instead of localhost in the browser it might be easier.

**[Edit]** Also look in syslog as before when you try to refresh the screen, you should see the query there and it may then be more obvious what the problem is.

---

<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:** [24 August 2020 17:25 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/42 "2020-08-24T17:25:32Z")

</div>

I fix the ''default'' problem, but nothing happen.

I can't connect my PC to grafana, because i have this error:

 ![Grafana](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/1/a14c2621e3160b6f2ef13875a1b7018e50762728.jpeg)

Do you mean the query options in grafana?

---

<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:** [24 August 2020 18:10 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/43 "2020-08-24T18:10:25Z")

</div>

> [@Martin10](#):
>
> I can't connect my PC to grafana

Where are you seeing that screen and why are you changing the grafana config? You don't need to touch that, just use the pi IP in the browser URL.

---

<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:** [24 August 2020 18:25 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/44 "2020-08-24T18:25:23Z")

</div>

That screen is fro the PC. I don't change anything, i use the rpi ip in URL

---

<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:** [24 August 2020 18:53 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/46 "2020-08-24T18:53:47Z")

</div>

But you had the data source configured ok, I thought. What have you done to mess that up?

---

<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:** [24 August 2020 19:37 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/47 "2020-08-24T19:37:48Z")

</div>

I wish i knew...

---

<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:** [24 August 2020 19:47 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/48 "2020-08-24T19:47:54Z")

</div>

> [@Martin10](#):
>
> I don't change anything,

You say you haven't changed anything, but in that case why have you blanked out the influxdb url? Last time you showed that screen, when viewed on the pi, it had 127.0.0.1 (which is localhost) there, so why have you blanked it out if you haven't changed it? Remember when viewing that screen from the PC you are looking at grafana running on the pi and the settings there are for grafana. It doesn't make any difference to what you should put for the url if you are viewing it in a browser on the pi or via the internet from the other side of the world. The url that grafana uses to access influx is still localhost.

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [24 August 2020 20:00 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/49 "2020-08-24T20:00:13Z")

</div>

Don't forget you have to change some settings in **/etc/influxdb/influxdb.conf** to get it working with grafana.

In the section _Determines whter http endpoint is enabledDetremines_ you have to enable by removing the **#**

```auto
enabled = true
bind-address= “:8086”
auth-enabled = false

```

---

<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:** [24 August 2020 20:07 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/50 "2020-08-24T20:07:24Z")

</div>

> [@edje11](#):
>
> Don't forget you have to change some settings in **/etc/influxdb/influxdb.conf** to get it working with grafana.

I don't think that is correct. I think it defaults to enabled. Certainly mine is working without that, those lines are commented out on mine. Also he did have the datasource connected ok, and now that seems to be not the case.

---

<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:** [25 August 2020 12:30 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/51 "2020-08-25T12:30:09Z")

</div>

In my previous post/topic i upload screenshot with similar type of data and it was deleted, and that's why i'm more careful with that type of screenshots.

I try two URLs: 127.0.0.1 and 192.168.1.8, but nothing. Can this be the problem?

---

<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:** [25 August 2020 12:46 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/52 "2020-08-25T12:46:57Z")

</div>

What url are you putting in the address bar in the browser when opening it on the PC? Not in the datasource config but in the address bar.

---

<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:** [25 August 2020 13:29 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/53 "2020-08-25T13:29:17Z")

</div>

[https://tom910615.grafana.net](https://tom910615.grafana.net)

---

<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:** [25 August 2020 13:37 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/54 "2020-08-25T13:37:09Z")

</div>

What? I thought you had installed grafana on the pi. Why are you using that address?  
Edit: What url are you using in the address bar of the browser when you view it in the browser on the pi?

---

<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:** [25 August 2020 14:41 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/55 "2020-08-25T14:41:01Z")

</div>

The last pic. is from the PC, when i log in grafana i have to make some address like this,and from there is this address:

 ![Grafana address](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/3/c3ccac0397ba34e71ca646f34b8d340fa1698547.jpeg)

From RPI URL i use this (I thing this is default):

 ![URL](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/52dc022cb77b0e4bb51e64d3012536f761b6b331.jpeg)

---

<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:** [25 August 2020 14:45 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/56 "2020-08-25T14:45:42Z")

</div>

Right, so to connect to grafana installed on the pi, using a browser on the pi, you use `localhost:3000`. localhost is a effectively a shorthand for "my ip address". To connect from the PC you need to use the ip address of the pi, which will probably be something like 192.168.1.101, so in the browser on the PC use `192.168.1.101:3000`. Replace the ip address with whatever is the right address of course.

What you have been doing is looking at an installation of grafana on their own website, not on the pi, so obviously it couldn't connect to your influxdb.

---

<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:** [25 August 2020 17:05 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/57 "2020-08-25T17:05:47Z")

</div>

I can't connect from the PC to grafana via RPI IP, because the RPI security, and i don't see were i can input password.

 ![SSL](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/1/81d794f3063192b15748ff42030887261ec7cf35.jpeg)

So, how i have to install grafana on the RPI, in order to connect grafana with the influxdb i allready created?

---

<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:** [25 August 2020 18:07 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/58 "2020-08-25T18:07:05Z")

</div>

The error is because you have said https, it should be http. You weren't using https with localhost so why use it now?

> [@Martin10](#):
>
> So, how i have to install grafana on the RPI, in order to connect grafana with the influxdb i allready created

You already have installed grafana on the pi haven't you?

---

<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:** [25 August 2020 18:40 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/59 "2020-08-25T18:40:54Z")

</div>

The smallest details are the most important.

 ![Grafana PC](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/dbec149780c76be25a0dc43b69bb9929690b7f99.jpeg)

I don't use https intentionally.

Yes, i think i have installed grafana on the pi, but why i still have that problem?

---

<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:** [25 August 2020 19:19 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/60 "2020-08-25T19:19:02Z")

</div>

What do you see if you you click where it says `temp` in the FROM line, and also what if you click where it says `field(value)`

---

<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:** [25 August 2020 19:28 UTC](https://discourse.nodered.org/t/nr-influxdb-grafana/31667/61 "2020-08-25T19:28:19Z")

</div>

![DS](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/f/7f0199d16d61618f184c78af004ac3176ffc8a44.jpeg)

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

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