[doc]update Grafana dashboard setup instructions (#3238)

This commit is contained in:
Logic
2025-04-13 19:40:33 +08:00
committed by GitHub
parent 95654e49c5
commit e1806f856f
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -9,7 +9,7 @@ keywords: [Grafana, Historical Dashboard]
### Prerequisites
- The `Grafana` version 8.1.0 or later is installed and running.
- We recommend using the latest version of Grafana. Earlier versions may not support the exposed API.
- The `Grafana` service is started and the account password is configured.
- The `HertzBeat` service is started and the `VictoriaMetrics` time-series database is configured (note: the `VictoriaMetrics` data source is required).
@@ -22,6 +22,10 @@ keywords: [Grafana, Historical Dashboard]
ref: <https://grafana.com/blog/2023/10/10/how-to-embed-grafana-dashboards-into-web-applications/>
In the `Grafana` configuration file `grafana.ini`, set the `allow_embedding = true`.
In the `Grafana` configuration file `grafana.ini`, set the `[auth.anonymous]` option to `true`.
Or run `Grafana` with the following command via `docker`:
```bash
docker run -itd --name grafana -p 3000:3000 -e "GF_AUTH_PROXY_ENABLED=true" -e "GF_AUTH_ANONYMOUS_ENABLED=true" -e "GF_SECURITY_ALLOW_EMBEDDING=true" grafana/grafana:latest
```ini
allow_embedding = true
@@ -9,7 +9,7 @@ keywords: [Grafana, 历史图表]
### 前提条件
- `Grafana`版本为8.1.0或以上
- 我们推荐使用最新的`Grafana`版本,早期的版本可能不支持暴露 api
- `Grafana`服务已经启动,并配置好了账号密码。
- `HertzBeat`服务已经启动,并配置好了`VictoriaMetrics`时序数据库(注意: `VictoriaMetrics`数据源是必须的)。
@@ -22,6 +22,10 @@ keywords: [Grafana, 历史图表]
参考: <https://grafana.com/blog/2023/10/10/how-to-embed-grafana-dashboards-into-web-applications/>
修改配置文件`grafana.ini`中的`allow_embedding = true`
修改配置文件`grafana.ini`中的`[auth.anonymous]``true`
或者通过`docker`运行`Grafana`,使用以下命令:
```bash
docker run -itd --name grafana -p 3000:3000 -e "GF_AUTH_PROXY_ENABLED=true" -e "GF_AUTH_ANONYMOUS_ENABLED=true" -e "GF_SECURITY_ALLOW_EMBEDDING=true" grafana/grafana:latest
```ini
allow_embedding = true