Skip to content

Commit 3e1d87b

Browse files
zqr10159LiuTianyou
andauthored
Grafana doc (apache#2647)
Co-authored-by: liutianyou <[email protected]>
1 parent 2076693 commit 3e1d87b

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

home/docs/help/grafana_dashboard.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,30 @@ keywords: [Grafana, Historical Dashboard]
99
1010
### Prerequisites
1111

12+
- The `Grafana` version 8.1.0 or later is installed and running.
1213
- The `Grafana` service is started and the account password is configured.
13-
- The `HertzBeat` service is started and the `VictoriaMetrics` timeseries database is configured (note: the `VictoriaMetrics` data source is required).
14+
- The `HertzBeat` service is started and the `VictoriaMetrics` time-series database is configured (note: the `VictoriaMetrics` data source is required).
1415

1516
:::caution Caution.
1617
`Grafana` can only show historical data for `Prometheus` type of monitoring, currently it does not support monitoring data defined by `yml` in `HertzBeat`.
1718
:::
1819

20+
### enable Grafana embedded url
21+
22+
ref: <https://grafana.com/blog/2023/10/10/how-to-embed-grafana-dashboards-into-web-applications/>
23+
In the `Grafana` configuration file `grafana.ini`, set the `allow_embedding = true`.
24+
In the `Grafana` configuration file `grafana.ini`, set the `[auth.anonymous]` option to `true`.
25+
26+
```ini
27+
allow_embedding = true
28+
[auth.anonymous]
29+
# enable anonymous access
30+
enabled = true
31+
```
32+
1933
### Configuring Grafana in HertzBeat
2034

21-
In the configuration file `hertzbeat.yml` in `HertzBeat`, configure the `Grafana` data source.
35+
In the configuration file `application.yml` in `HertzBeat`, configure the `Grafana` data source.
2236

2337
```yaml
2438
grafana:

home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/grafana_dashboard.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,30 @@ keywords: [Grafana, 历史图表]
99
1010
### 前提条件
1111

12+
- `Grafana`版本为8.1.0或以上。
1213
- `Grafana`服务已经启动,并配置好了账号密码。
1314
- `HertzBeat`服务已经启动,并配置好了`VictoriaMetrics`时序数据库(注意: `VictoriaMetrics`数据源是必须的)。
1415

1516
:::caution 注意
1617
`Grafana`只能展示`Prometheus`类型监控的历史数据,目前并不支持`HertzBeat``yml`定义的监控数据。
1718
:::
1819

20+
### 启用Grafana 可嵌入功能, 并开启匿名访问
21+
22+
参考: <https://grafana.com/blog/2023/10/10/how-to-embed-grafana-dashboards-into-web-applications/>
23+
修改配置文件`grafana.ini`中的`allow_embedding = true`
24+
修改配置文件`grafana.ini`中的`[auth.anonymous]``true`
25+
26+
```ini
27+
allow_embedding = true
28+
[auth.anonymous]
29+
# enable anonymous access
30+
enabled = true
31+
```
32+
1933
### 在HertzBeat中配置Grafana
2034

21-
`HertzBeat`的配置文件`hertzbeat.yml`中,配置`Grafana`数据源:
35+
`HertzBeat`的配置文件`application.yml`中,配置`Grafana`数据源:
2236

2337
```yaml
2438
grafana:

0 commit comments

Comments
 (0)