# Embedded Grafana Chart requires Grafana login very time the pi reboots

**URL:** <https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009>\
**Category:** Dashboard\
**Created:** [22 July 2023 14:44 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009 "2023-07-22T14:44:27Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhafele](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mhafele](https://discourse.nodered.org/u/mhafele)\
**Post date:** [22 July 2023 14:44 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/1 "2023-07-22T14:44:27Z")

</div>

I'm running an embedded Grafana chart in node red dashboard. I keep having to login to Grafana through the direct Grafana page to get me trends to show in node red dashboard. How do I get node red to automatically sign in the Grafana when my PI is booted?

---

<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:** [22 July 2023 14:56 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/2 "2023-07-22T14:56:31Z")

</div>

That's a Grafana configuration issue. Please read the instructions for Grafana on their web pages. You can configure it not to need a login.

---

<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:** [22 July 2023 14:58 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/3 "2023-07-22T14:58:05Z")

</div>

Welcome to the forum @mhafele

Is grafana running on the same system as node red?

Does grafana need to be configured to require login just to view the data?

---

<div class="post-metadata">

**Author:** ![mhafele](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mhafele](https://discourse.nodered.org/u/mhafele)\
**Post date:** [22 July 2023 15:00 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/4 "2023-07-22T15:00:33Z")

</div>

Yes, they are on the same system. The login requirement for Grafana seems to be sporadic. Sometime my embedded trends populate and sometimes they can't be found and I have to log in to 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:** [22 July 2023 15:02 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/5 "2023-07-22T15:02:45Z")

</div>

If you don't need a login then setup grafana to not need login for viewing data, as suggested by @TotallyInformation.

---

<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:** [22 July 2023 15:03 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/6 "2023-07-22T15:03:44Z")

</div>

> [@mhafele](#):
>
> sometimes they can't be found

What do you mean, they can't be found?

---

<div class="post-metadata">

**Author:** ![mhafele](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mhafele](https://discourse.nodered.org/u/mhafele)\
**Post date:** [22 July 2023 15:04 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/7 "2023-07-22T15:04:32Z")

</div>

I have the auth.anonymous enable set to true in the grafana configuration. It seems sporadic on when In need to log in to get my embedded trends to work.

---

<div class="post-metadata">

**Author:** ![mhafele](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mhafele](https://discourse.nodered.org/u/mhafele)\
**Post date:** [22 July 2023 15:06 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/8 "2023-07-22T15:06:06Z")

</div>

In the trend embded in the dash board I get a error that says something like "panel 1 cannot be found" and an error that says unauthorized user.

---

<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:** [22 July 2023 15:10 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/9 "2023-07-22T15:10:46Z")

</div>

What happens if you run grafana direct in the browser with the same URL you are using in the frame? What URL are you using?

---

<div class="post-metadata">

**Author:** ![mhafele](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mhafele](https://discourse.nodered.org/u/mhafele)\
**Post date:** [22 July 2023 15:22 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/10 "2023-07-22T15:22:21Z")

</div>

I will try that the next time I get the error. This morning I had to log in to grafana but since then I haven't had to even after a couple reboots. It seems sporadic.

---

<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:** [22 July 2023 15:33 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/11 "2023-07-22T15:33:38Z")

</div>

Have you configured grafana to require login to edit the dashboards? If so are you editing the dashboards in the same browser in the same session as running node-red?

You haven't told us what URL you are using in the frame.

---

<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:** [22 July 2023 17:22 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/12 "2023-07-22T17:22:56Z")

</div>

And don't forget to set **allow\_embedding=true** in grafana.ini.

---

<div class="post-metadata">

**Author:** ![mhafele](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mhafele](https://discourse.nodered.org/u/mhafele)\
**Post date:** [22 July 2023 19:51 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/13 "2023-07-22T19:51:45Z")

</div>

I do have allow\_embedding=true.

Below is my script for calling my panels.  
I have buttons to change the time span of the trends is that considered editing?  
What configuration point allows the user to require login to edit?

var panelid=1

msg.payload = "[http://pi3:3000/d-solo/f1bb27ff-accd-45c9-97de-6c76676f9bc4/hafele-sugar-shack?orgId=1&refresh=5s](http://pi3:3000/d-solo/f1bb27ff-accd-45c9-97de-6c76676f9bc4/hafele-sugar-shack?orgId=1&refresh=5s)"+

"&refresh=1m"+

"&theme=light"+

"&from="+ msg.fromdate +

"&to="+ msg.enddate +

"&panelId="+panelid

return msg;

---

<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:** [22 July 2023 20:43 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/14 "2023-07-22T20:43:17Z")

</div>

> [@mhafele](#):
>
> I have buttons to change the time span of the trends is that considered editing?

I meant editing the grafana dashboards, where you setup the panels and queries and so on. That is the section where often grafana is configured to require a logon. So anonymous users can look at the charts, but not change what is shown.  
What have you got in the ini file for org\_role?

```auto
# specify role for unauthenticated users
org_role = Viewer

```

Viewer means that an anonymous use can view but not edit the panels

> [@mhafele](#):
>
> [&refresh=5s](http://pi3:3000/d-solo/f1bb27ff-accd-45c9-97de-6c76676f9bc4/hafele-sugar-shack?orgId=1&refresh=5s)"+
> 
> "&refresh=1m"+

It is a bit unusual to specify refresh=5 seconds and also refresh=1 minute, but I would not expect that to give the problem you are seeing.

> [@mhafele](#):
>
> "&panelId="+panelid

I suggest removing that and seeing what happens, since you say that the error says it cannot find the panel.

Also feed the url into a debug node so that when it fails you can check that the url looks correct

---

<div class="post-metadata">

**Author:** ![mhafele](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mhafele](https://discourse.nodered.org/u/mhafele)\
**Post date:** [22 July 2023 22:27 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/15 "2023-07-22T22:27:30Z")

</div>

I have org\_role= Viewer. I deleted the 1m referest line.

I'll see if the requirement to log in comes back. I almost wonder if it is some time based setting.

---

<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:** [23 July 2023 07:31 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/16 "2023-07-23T07:31:42Z")

</div>

In that case it should never ask for login for viewing the charts. I suspect you maybe misinterpreting the messages. Please record exactly what it says next time.

**[Edit]** Also tell us _exactly_ what you do to recover the situation, it is not clear to me.

---

<div class="post-metadata">

**Author:** ![mhafele](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mhafele](https://discourse.nodered.org/u/mhafele)\
**Post date:** [23 July 2023 13:05 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/17 "2023-07-23T13:05:33Z")

</div>

I'll get more details and screen shots when I see it again. Thanks for all the help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 August 2023 13:05 UTC](https://discourse.nodered.org/t/embedded-grafana-chart-requires-grafana-login-very-time-the-pi-reboots/80009/18 "2023-08-22T13:05:44Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
