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?
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.
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?
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.
If you don't need a login then setup grafana to not need login for viewing data, as suggested by @TotallyInformation.
What do you mean, they can't be found?
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.
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.
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?
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.
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.
And don't forget to set allow_embedding=true in grafana.ini.
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?
"&from="+ msg.fromdate +
"&to="+ msg.enddate +
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?
# specify role for unauthenticated users org_role = Viewer
Viewer means that an anonymous use can view but not edit the panels
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.
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
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.
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.
I'll get more details and screen shots when I see it again. Thanks for all the help.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.