smarthomeserver icon indicating copy to clipboard operation
smarthomeserver copied to clipboard

Preparing Grafana for sharing

Open donparlor opened this issue 2 years ago • 6 comments

I did every configuration you suggested for Grafana: Capture d’écran, le 2022-08-07 à 10 50 36 I also included those in the documentation of the add-on.

But I keep getting 401 Unauthorized view when trying to access my embedded graphs:

297045271_386144540324650_6605440398211777314_n

If I want to solve this, I must access the Web User Interface once, and now I get the graphs showing: 296066502_1010007173021253_7697519921430684608_n

But this solution s temporary as long as my server is running. When rebooting HA, I will need to access Grafana Web User Interface again to display my graphs.

Your help would be much appreciated

donparlor avatar Aug 07 '22 14:08 donparlor

Hi, where did you add those configurations? You need to simply uncomment them here to fix that issue

OliverHi avatar Aug 07 '22 18:08 OliverHi

I added these configurations here: Capture d’écran, le 2022-08-07 à 10 50 36

Directly in the config tab of the add-on. Should I remove it and add Granada in my configurations.yaml?

donparlor avatar Aug 07 '22 20:08 donparlor

I don't know what add-on you are talking about. This is a setup for running HA in a container and Grafana separately. If you are running HA OS with the supervisor you should check here or in the forums

OliverHi avatar Aug 07 '22 20:08 OliverHi

You are right Oliver, I'm not running HA in a container. I should have been more careful. I've been through documentation for HA Supervised / OS and I could find the solution. I hope it stands. Thank you for pointing me in the good direction. Wish you the best!

donparlor avatar Aug 08 '22 14:08 donparlor

Glad to help! Could you maybe also share that solution here? Might help someone else fighting the same problem

OliverHi avatar Aug 13 '22 12:08 OliverHi

Following the online recommandations, I added the following env_vars in the Grafana add-on configuration

- name: GF_AUTH_ANONYMOUS_ENABLED
  value: "true"
- name: GF_AUTH_DISABLE_LOGIN_FORM
  value: "false"
- name: GF_AUTH_ANONYMOUS_ORG_NAME
  value: Main Org.
- name: GF_AUTH_ANONYMOUS_ORG_ROLE
  value: Viewer

But it doesn't seem to work from a mobile access.... I'm still looking for a definitive solution for complete access with both local and remote access.

Capture d’écran, le 2022-08-14 à 00 17 03

donparlor avatar Aug 14 '22 04:08 donparlor

For now I will close this, if you ever find a solution for this please let me know

OliverHi avatar Dec 27 '22 13:12 OliverHi

I guess it's a "What the heck" type of problem... It's not working, I always need to access Grafana web interface to access my graphs from within HA.... It's sad....

donparlor avatar Dec 27 '22 17:12 donparlor