-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: shown <[email protected]>
- Loading branch information
Showing
5 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
id: grafana_dashboard | ||
title: Grafana Dashboard | ||
sidebar_label: Grafana Historical Charts | ||
keywords: [Grafana, Historical Dashboard] | ||
--- | ||
|
||
> `Grafana` is an open source visualization and analytics platform that helps you easily create, share and monitor dashboards. In this article, we will cover how to use `Grafana` to display historical data in `HertzBeat`. | ||
### Prerequisites | ||
|
||
- 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). | ||
|
||
:::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`. | ||
::: | ||
|
||
### Configuring Grafana in HertzBeat | ||
|
||
In the configuration file `hertzbeat.yml` in `HertzBeat`, configure the `Grafana` data source. | ||
|
||
```yaml | ||
grafana: | ||
enabled: true | ||
url: http://127.0.0.1:3000 | ||
username: admin | ||
password: admin | ||
``` | ||
### Upload Grafana monitor template json file in HertzBeat monitor | ||
In `HertzBeat`, when creating or editing a `Prometheus` type monitor, click Enable Grafana Templates and select the Grafana template json file to upload. | ||
The monitor template json file can be downloaded at <https://grafana.com/grafana/dashboards/>. | ||
For example, create a new monitor in `HertzBeat` for `VictoriaMetrics` single node, then open <https://grafana.com/grafana/dashboards/10229-victoriametrics-single-node/>, click `Download JSON` button on the right side. `Download JSON` button on the right to download the template json file. Upload the template json file in the `HertzBeat` monitor, save it. | ||
![grafana-1.png](/img/docs/help/grafana-1.png) | ||
|
||
### View Grafana historical charts | ||
|
||
On the `HertzBeat` monitoring page, click the `Grafana` button, select `Grafana` Historical Charts, select a monitoring template, and click the `Query` button to view the `Grafana` historical charts. | ||
![grafana-2.png](/img/docs/help/grafana-2.png) |
41 changes: 41 additions & 0 deletions
41
home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/grafana_dashboard.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
id: grafana_dashboard | ||
title: Grafana Dashboard | ||
sidebar_label: Grafana历史图表 | ||
keywords: [Grafana, 历史图表] | ||
--- | ||
|
||
> `Grafana`是一个开源的可视化和分析平台,它可以帮助你轻松地创建、分享和监控仪表板。本文将介绍如何在`HertzBeat`中使用`Grafana`展示历史数据。 | ||
### 前提条件 | ||
|
||
- `Grafana`服务已经启动,并配置好了账号密码。 | ||
- `HertzBeat`服务已经启动,并配置好了`VictoriaMetrics`时序数据库(注意: `VictoriaMetrics`数据源是必须的)。 | ||
|
||
:::caution 注意 | ||
`Grafana`只能展示`Prometheus`类型监控的历史数据,目前并不支持`HertzBeat`中`yml`定义的监控数据。 | ||
::: | ||
|
||
### 在HertzBeat中配置Grafana | ||
|
||
在`HertzBeat`的配置文件`hertzbeat.yml`中,配置`Grafana`数据源: | ||
|
||
```yaml | ||
grafana: | ||
enabled: true | ||
url: http://127.0.0.1:3000 | ||
username: admin | ||
password: admin | ||
``` | ||
### 在HertzBeat监控中上传Grafana监控模板json文件 | ||
在`HertzBeat`新建或编辑`Prometheus`类型监控时,点击启用Grafana模板,选择Grafana模板json文件上传。 | ||
监控模板json文件可以在 <https://grafana.com/grafana/dashboards/> 下载。 | ||
比如,在`HertzBeat`中新建一个关于`VictoriaMetrics`单节点的监控,然后打开 <https://grafana.com/grafana/dashboards/10229-victoriametrics-single-node/> ,点击右侧 `Download JSON`按钮,下载模板json文件。在`HertzBeat`监控中上传模板json文件,保存。 | ||
![grafana-1.png](/img/docs/help/grafana-1.png) | ||
|
||
### 查看Grafana历史图表 | ||
|
||
在`HertzBeat`监控页面,点击`Grafana`按钮,选择`Grafana`历史图表,选择监控模板,点击`查询`按钮,即可查看`Grafana`历史图表。 | ||
![grafana-2.png](/img/docs/help/grafana-2.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.