首页 > 解决方案 > Grafana 仪表板的物理位置

问题描述

在我的项目中,我们使用 influx dB 和 Grafana 进行日志和其他在 Ubuntu 机器上运行的分析。现在最近由于迁移过程,端口被阻止,如 3000(用于 Grafana)和 8086(用于流入 dB),出于某种安全原因,这些端口仍将被阻止。所以,我无法通过浏览器和邮递员连接它们。

因此,作为一种解决方法,我们计划将这些(至少是仪表板)移动到本地设置。我检查了该过程是否已启动并正在运行。

但无法定位仪表板文件的物理位置。

我有一个默认设置,grafana 没有任何单独的数据库配置。

[database]
# You can configure the database connection by specifying type, host, name, user and password
# as separate properties or as on string using the url properties.

# Either "mysql", "postgres" or "sqlite3", it's your choice
;type = sqlite3
;host = 127.0.0.1:3306
;name = grafana
;user = root
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
;password =

# Use either URL or the previous fields to configure the database
# Example: mysql://user:secret@host:port/database
;url =

# For "postgres" only, either "disable", "require" or "verify-full"
;ssl_mode = disable

;ca_cert_path =
;client_key_path =
;client_cert_path =
;server_cert_name =

有没有可以找到这些 JSON 文件的位置?

标签: grafanagrafana-api

解决方案


我通过一些研究弄清楚了,如果有人在寻找答案,我认为我可以帮助社区。

仪表板的默认文件夹是/var/lib/grafana. 如果您导航到该文件夹​​,您将找到一个文件名grafana.db

将此文件下载到您的本地计算机或您想要的任何计算机。请sqlitebrowser这里下载。

现在sqlitebrowser单击open database并选择grafana.db文件。然后右键单击dashboard表格并选择Browse Table。并选择该data部分,您将找到仪表板。

在此处输入图像描述

在此处输入图像描述


推荐阅读