Bboysoul's Blog

首页 公告 RSS

更新到grafana10的几个小问题

June 26, 2023 本文有 357 个字 需要花费 1 分钟阅读

简介

更新到 grafana 10 之后碰到了几个小问题,记录下

操作

首先是不能使用 gitea 登录了,这个其实在更新日志里面有说到

https://grafana.com/docs/grafana/latest/breaking-changes/breaking-changes-v10-0/#grafana-oauth-integrations-do-not-work-anymore-with-email-lookups

同时你可以看下面这个 issue

https://github.com/grafana/grafana/issues/54688

报错类似于下面

logger=oauth.generic_oauth t=2023-06-25T05:30:50.45102119Z level=warn msg="No valid role found. Skipping role sync. In Grafana 10, this will result in the user being assigned the default role and overriding manual assignment. If role sync is not desired, set skip_org_role_sync for your provider to true"

logger=context userId=0 orgId=1 uname= t=2023-06-25T05:57:59.15388986Z level=warn msg="user already exists"

解决办法就是在auth 下面添加

[auth]
oauth_allow_insecure_email_lookup = true

就好了

还有一个问题是会提示

If you're seeing this Grafana has failed to load its application files

其实这个和 grafana 10 没有关系,因为我是使用 cloudflare 作为 cdn 的,所以在Cache Rules中把 grafana 相关的域名排除掉就好了

最后就是 grafana 10 带来了 public dashboard 的功能,这个功能可以分享你的 dashboard,不需要登录,你只要在 grafana 的配置中加入

[feature_toggles]
publicDashboards = true

就好了,之后在你的 dashboard 分享按钮中就会多出Public dashboard的标签页,创建分享链接别人就可以不用登录看你的 dashboard 了,比如下面

https://grafana.bboysoul.cn/public-dashboards/58ed2743e1bb467ca9c2890368936dd6?orgId=1&refresh=30m

欢迎关注我的博客www.bboy.app

Have Fun


Tags:

本站总访问量 本站总访客数