This is an automated email from the ASF dual-hosted git repository.
liutianyou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
The following commit(s) were added to refs/heads/master by this push:
new 3e1d87b59 Grafana doc (#2647)
3e1d87b59 is described below
commit 3e1d87b59fd497f01e4e8eee7a29cbb77ecde45e
Author: Logic <[email protected]>
AuthorDate: Sun Sep 1 18:38:28 2024 +0800
Grafana doc (#2647)
Co-authored-by: liutianyou <[email protected]>
---
home/docs/help/grafana_dashboard.md | 18 ++++++++++++++++--
.../current/help/grafana_dashboard.md | 16 +++++++++++++++-
2 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/home/docs/help/grafana_dashboard.md
b/home/docs/help/grafana_dashboard.md
index b3953d8c0..7c4b9cfbc 100644
--- a/home/docs/help/grafana_dashboard.md
+++ b/home/docs/help/grafana_dashboard.md
@@ -9,16 +9,30 @@ keywords: [Grafana, Historical Dashboard]
### Prerequisites
+- The `Grafana` version 8.1.0 or later is installed and running.
- The `Grafana` service is started and the account password is configured.
-- The `HertzBeat` service is started and the `VictoriaMetrics` timeseries
database is configured (note: the `VictoriaMetrics` data source is required).
+- The `HertzBeat` service is started and the `VictoriaMetrics` time-series
database is configured (note: the `VictoriaMetrics` data source is required).
:::caution Caution.
`Grafana` can only show historical data for `Prometheus` type of monitoring,
currently it does not support monitoring data defined by `yml` in `HertzBeat`.
:::
+### enable Grafana embedded url
+
+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`.
+
+```ini
+allow_embedding = true
+[auth.anonymous]
+# enable anonymous access
+enabled = true
+```
+
### Configuring Grafana in HertzBeat
-In the configuration file `hertzbeat.yml` in `HertzBeat`, configure the
`Grafana` data source.
+In the configuration file `application.yml` in `HertzBeat`, configure the
`Grafana` data source.
```yaml
grafana:
diff --git
a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/grafana_dashboard.md
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/grafana_dashboard.md
index 9e91b0e95..6126f0db9 100644
---
a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/grafana_dashboard.md
+++
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/grafana_dashboard.md
@@ -9,6 +9,7 @@ keywords: [Grafana, 历史图表]
### 前提条件
+- `Grafana`版本为8.1.0或以上。
- `Grafana`服务已经启动,并配置好了账号密码。
- `HertzBeat`服务已经启动,并配置好了`VictoriaMetrics`时序数据库(注意: `VictoriaMetrics`数据源是必须的)。
@@ -16,9 +17,22 @@ keywords: [Grafana, 历史图表]
`Grafana`只能展示`Prometheus`类型监控的历史数据,目前并不支持`HertzBeat`中`yml`定义的监控数据。
:::
+### 启用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`
+
+```ini
+allow_embedding = true
+[auth.anonymous]
+# enable anonymous access
+enabled = true
+```
+
### 在HertzBeat中配置Grafana
-在`HertzBeat`的配置文件`hertzbeat.yml`中,配置`Grafana`数据源:
+在`HertzBeat`的配置文件`application.yml`中,配置`Grafana`数据源:
```yaml
grafana:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]