gocrane / crane

Crane is a FinOps Platform for Cloud Resource Analytics and Economics in Kubernetes clusters. The goal is not only to help users to manage cloud cost easier but also ensure the quality of applications.
https://gocrane.io
Apache License 2.0
1.83k stars 377 forks source link

no grafana panel show in Overview tab #862

Closed GoneLikeAir closed 10 months ago

GoneLikeAir commented 10 months ago

Describe the bug 集群总览页面无法展示grafana图表,从后端请求来看,是能拿到数据的

image

Environment (please complete the following information):

qmhu commented 10 months ago

检查grafana内嵌的相关配置 :https://gocrane.io/zh-cn/docs/getting-started/installation/installation/#%E4%BD%BF%E7%94%A8%E5%A4%96%E9%83%A8%E7%9A%84-grafana%E5%8F%AF%E9%80%89

GoneLikeAir commented 10 months ago

看起来并不是内嵌的问题,在访问集群总量标签那时,我使用返回的url通过nginx代理访问grafana是正常的

image image
GoneLikeAir commented 10 months ago

is there any update for this issue?

qmhu commented 10 months ago

is there any update for this issue?

@zsnmwy any thought about it ?

zsnmwy commented 10 months ago

麻烦留意一下这个前端的这个接口

/grafana/api/dashboards/uid/cluster-overview
image

这边在遍历渲染iframe嵌入的时候,是根据上面的API接口进行判断的。(如果我没记错的话 =.=)

https://github.com/gocrane/crane/blob/6c6b7c96864a02fafdb90e35e84ff260d615609c/pkg/web/src/pages/Cost/ClusterOverview/PanelWrapper.tsx#L12-L36

iframe 实际嵌入地址示例

/grafana/d-solo/cluster-overview/costs-by-dimension?from=1695572439000&orgId=1&panelId=136&theme=light&to=1695658839000&var-Discount=100

在接口正常和Grafana版本正常的情况下,是可以正常渲染出iframe的板块。

image

麻烦留意下接口以及对应的Grafana版本。因为高版本的Grafana是有兼容性问题的。

我刚刚也是更新了文档,锁定了Grafana版本。你可以留意下对应的PR #865

GoneLikeAir commented 10 months ago

麻烦留意一下这个前端的这个接口

/grafana/api/dashboards/uid/cluster-overview
image

这边在遍历渲染iframe嵌入的时候,是根据上面的API接口进行判断的。(如果我没记错的话 =.=)

https://github.com/gocrane/crane/blob/6c6b7c96864a02fafdb90e35e84ff260d615609c/pkg/web/src/pages/Cost/ClusterOverview/PanelWrapper.tsx#L12-L36

iframe 实际嵌入地址示例

/grafana/d-solo/cluster-overview/costs-by-dimension?from=1695572439000&orgId=1&panelId=136&theme=light&to=1695658839000&var-Discount=100

在接口正常和Grafana版本正常的情况下,是可以正常渲染出iframe的板块。

image

麻烦留意下接口以及对应的Grafana版本。因为高版本的Grafana是有兼容性问题的。

我刚刚也是更新了文档,锁定了Grafana版本。你可以留意下对应的PR #865

多谢,我知道啥原因了,我升级了crane的版本,但是没有把最新的dashboard配置好。。谢谢谢谢