[Solved] Add Dashboard with Grafana


TaiChar

24 posts in this topic Last Reply

Recommended Posts

Hi,

Grafana + InfluxDB + UnTelegraf:

wonderfull Tutorial by panzerschreck, everything works fine. I created a nice Dashboard and everything is working, but

 

how do i replace the unraid Dashboard with the one created in Grafana?

Alternatively, how do i add a second Dashboard with Grafana between "Dashboard" and "Main"?

 

Greets and Thanks

Edited by TaiChar
Link to post
On 10/3/2019 at 2:08 AM, Squid said:

Custom Tab plugin.

I Had to change the "X-Frame-Options=sameorigin" option in grafana from false to true.

And I had to activate the kiosk mode "google for grafana on tv"

After that Custom Tab works fine.


In "Management Access" you can choose that your own Dashboard is shown after Login.

Perfect thanks

 

I added a screenshot.

Dash.png

Edited by TaiChar
Link to post
  • 2 weeks later...

Any hints on how to do this "I Had to change the "X-Frame-Options=sameorigin" option in grafana from false to true."

I found in the security settings

x_content_type_optionsfalse

x_xss_protectionfalse

Which I assume will allow me to get where I need to go but for the life of me cannot find the grafana.ini config file to edit.

Link to post
10 hours ago, MMW said:

Any hints on how to do this "I Had to change the "X-Frame-Options=sameorigin" option in grafana from false to true."

I found in the security settings

x_content_type_optionsfalse

x_xss_protectionfalse

Which I assume will allow me to get where I need to go but for the life of me cannot find the grafana.ini config file to edit.

Change Grafana.ini from:

Quote

# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
;allow_embedding = false

to:

Quote

# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
allow_embedding = true

 

Edited by TaiChar
Link to post

Where to find Grafana.ini?

 

 

 

Quote

goto a folder you can access over the network, this is optional if you edit the file over the commandline, otherwise go to a random temporary folder you can write to

cd /mnt/user/appdata/

 

copy Grafana.ini to the current folder "Grafana" is the name of the docker container. Standart is "Grafana"

docker cp Grafana:/etc/grafana/grafana.ini .
 

make grafana.ini writable

chmod -777 grafana.ini

 

edit grafana.ini over the network with notepad or notepad++ or within the commandline with nano vii, etc.

 

copy grafana.ini back

docker cp grafana.ini Grafana:/etc/grafana/grafana.ini

 

restart Grafana

i did it over the GUI, so i don't know the commandline command

 

 

Link to post
35 minutes ago, MMW said:

Thanks, I have made the changes for "allow_embedding = true" but this still does not allow me to put it in a custom tab.

 

I can see in Grafana that the change is active, any other suggestions?

Does the custom tab show nothing or the Grafana login?

Link to post
20 minutes ago, MMW said:

A Lovely empty screen, totally blank.

 

image.thumb.png.a673d7ed8d27a5bbd055ec34b3808421.png

The default webUI for grafana is http.  A browser enforced security provision is that if you access your server via https, then you cannot have an iframe of http.  Whether or not you can access grafana via https is a different story.  I don't know

Link to post
12 hours ago, MMW said:

Makes sense and leads to a wonderful headache @TaiCharhow did you manage to get past this? You mention X-Frame-Options=sameorigin in one of your post but I am unable to find this in the Grafana config file.

yes, by setting "allow_embedding = true" this won't be send anymore. was the ";" deleted at the beginning of the line?

 

Is the custom tab setting correct?

see screenshot?

I edited three lines in the grafana.ini

the one mentioned for embedding and two for the kiosk mode of grafana.

 

 

[auth.anonymous]
enabled = true

org_name = Main

 

but this is only to see the dashboard without logging in. If not set you should see the login screen.

graf.png

Link to post

Hi,

 

This is the relevant line from the Grafana.ini

image.png.967c8166576c23174dee804d11081601.png

 

And my Custom tab matches yours apart from the Tab Name and Width and Height (which i tried copying just to be on the safe side).

 

Just very odd. I take it that you are running via SSL for the UNRAID box itself?

Link to post
29 minutes ago, TaiChar said:

No, no SSL. I am using Unraid within my own homenetwork only, no need for SSL.

Does it work without SSL?

Which explains why yours is working, I use SSL even though it is on my own network. I have turned off SSL and it works and then back on and it does not, which is exactly what Squid was saying.

21 hours ago, Squid said:

The default webUI for grafana is http.  A browser enforced security provision is that if you access your server via https, then you cannot have an iframe of http.  Whether or not you can access grafana via https is a different story.  I don't know

Now to see if it is possible to get Grafana to use SSL or some other way around it.

Edited by MMW
Link to post

So after looking around I can see it is possible to run Grafana with SSL just a bit of work needed, also I read this as well

 

From the 6.8.0-rc1 release notes:

webgui: If a page is loaded via https, prevent it from loading resources via http (ie, block mixed content)

 

Which I happen to be running so if I read this correctly I would need the SSL on Grafana to load it as a Custom Tab?

 

Link to post
Just now, MMW said:

From the 6.8.0-rc1 release notes:

webgui: If a page is loaded via https, prevent it from loading resources via http (ie, block mixed content)

Actually, nothing to do with it.  What that change is doing is blocking any image as an example being loaded via http if you're on https

 

The issue is that its a browser enforced security system where an iframe cannot be displayed if the frame is HTTP and the main page is HTTPS, and has been in place for years.  There is no way around that* short of

2 minutes ago, MMW said:

need the SSL on Grafana to load it as a Custom Tab?

or disabling SSL on your server.

 

 

* There is one way around it that I experimented with, which is where I run a script to download the appropriate http page, and then display that within the iframe via https.  But, any auxiliary support files referenced within (eg the CSS) don't get loaded, which means that in the end the success rate doing this and having it actually look right is so close to zero percent that it might as well be. 

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.