K-Phoen / backstage-plugin-grafana

Grafana plugin for Backstage
Apache License 2.0
57 stars 33 forks source link

EntityOverviewDashboardViewer #81

Open kerenbenzion opened 10 months ago

kerenbenzion commented 10 months ago

I am trying to use EntityOverviewDashboardViewer in order to view in my component a graph from grafana. I managed to view the page of grafana after enabling allow_embedding = true in my grafana, but when I try to login to grafana it keeps sending me again to the login page even though the login was successful .

Important things to know: I tried also to use port-forwarding for grafana and when I used it it worked but when I use the endpoint configured in the ingress it does not work. Also., I have noticed that when I use the ingress I get reposnse 302 from grafana. It is only happening when I try to use the backstage plugin. when I use it from browser everything is working as usual Can you please assist ?

KyryloKarpenko commented 10 months ago

Hi @kerenbenzion, I am having the same issue. Have you found a solution?

kerenbenzion commented 10 months ago

@KyryloKarpenko unfortunately not yet

JulienKleinmann commented 2 months ago

Hello @kerenbenzion @KyryloKarpenko, same issue on my side, any news ? also I do not see any error on dev tools network of my browser.. @K-Phoen any idea ? kind regards,

KyryloKarpenko commented 2 months ago

Hi @JulienKleinmann, I didn't find any solution and still use EntityGrafanaDashboardsCard 😢

JulienKleinmann commented 2 months ago

Hello @KyryloKarpenko, did some test on an isolated docker environment, seems to work if you have in your env or equivalent in grafana.ini : GF_SECURITY_ALLOW_EMBEDDING=true GF_SECURITY_COOKIE_SAMESITE=none GF_SECURITY_COOKIE_SECURE=true can you test on your side and confirm ? i used chrome, seems that if you are using edge it might be different settings. kind regards,

KyryloKarpenko commented 2 months ago

Hi @JulienKleinmann, if I remember correctly, I initially did the same, but in grafana.ini:

        security:
          allow_embedding: true
          cookie_samesite: none
          cookie_secure: true

For me, there was the same problem as it is described in the issue.

JulienKleinmann commented 1 month ago

@KyryloKarpenko definitely work on my side.. I guess you can try to align version with what I have, I have read somewhere that some grafana version might have this issue.

chrome version : Version 127.0.6533.89 (Official Build) (64-bit) grafana version : Grafana v7.3.1 (6668161a88)

grafana config :

seems to be default of the image : docker-hub.pictet.com/grafana/grafana:7.3.1

also find that in my grafana.ini : [auth.anonymous] enabled = true

so did not pay to much attention but it actually does not ask me to login in the iframe and i see my dashboard but when i click login i am able to login.