Skip to content

Commit

Permalink
polish the content
Browse files Browse the repository at this point in the history
  • Loading branch information
nicecui committed Jun 25, 2024
1 parent 51dedcb commit 4c97aef
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 25 deletions.
30 changes: 18 additions & 12 deletions docs/nightly/en/db-cloud-shared/clients/grafana-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ GreptimeDB can be configured as a [Grafana data source](https://grafana.com/docs

### Installation

Grab the latest release from [release
The GreptimeDB Data source plugin can currently only installed on a local Grafana instance.
Make sure Grafana is installed and running before installing the plugin.

You can choose one of the following installation methods:
- Download the installation package and unzip it to the relevant directory: Grab the latest release from [release
page](https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/latest/),
Unzip the file to your [grafana plugin
directory](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#plugins).

You can also use grafana cli to download and install

```
grafana cli --pluginUrl https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/latest/download/info8fcc-greptimedb-datasource.zip plugins install info8fcc
```
- Use grafana cli to download and install:
```shell
grafana cli --pluginUrl https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/latest/download/info8fcc-greptimedb-datasource.zip plugins install info8fcc
```

Note that you may need to restart your grafana server after installing the plugin.

Expand All @@ -23,7 +25,11 @@ Note that you may need to restart your grafana server after installing the plugi

{template greptimecloud-configurations%%}

Click the Add data source button and select GreptimeDB as the type. Fill in the following URL in the GreptimeDB server URL:
Click the Add data source button and select GreptimeDB as the type.

![grafana-add-greptimedb-data-source](/grafana-add-greptimedb-data-source.png)

Fill in the following URL in the GreptimeDB server URL:

{template greptime-data-source-connection-url%%}

Expand All @@ -41,10 +47,10 @@ Then click the Save & Test button to test the connection.
Create a new dashboard in Grafana by clicking the `Create your first dashboard` button.
Then click `Add visualization`, select `GreptimeDB` as the data source.

Select a metric from the `Metric` dropdown list, then click `Run query` to view the metric data.
Select a metric from the `Metric` dropdown list, then click `Run queries` to view the metric data.
When you see the data and confirm it is correct, click `Save` to save the panel.

![grafana-create-panel-with-selecting-metric](/create-panel-with-selecting-metric-greptimedb.jpg)
![grafana-create-panel-with-selecting-metric](/create-panel-with-selecting-metric-greptimedb.png)

You can also create a panel using PromQL.
Click the `code` button on the right side of the `Query` tab to switch to the PromQL editor.
Expand All @@ -54,7 +60,7 @@ Then enter a PromQL statement, such as `system_memory_usage{state="used"}`, clic


:::tip NOTE
GreptimeDB is compatible with most PromQL, but there are some limitations. Please refer to the [PromQL limitations](/user-guide/query-data/promql#局限) document for more information.
GreptimeDB is compatible with most PromQL, but there are some limitations. Please refer to the [PromQL limitations](/user-guide/query-data/promql#limitations) document for more information.
:::

## Prometheus data source
Expand All @@ -77,7 +83,7 @@ Click Custom HTTP Headers and add one header:

Then click Save & Test button to test the connection.

## MySQL 数据源
## MySQL data source

Click the Add data source button and select MySQL as the type. Fill in the following information in MySQL Connection:

Expand Down
3 changes: 1 addition & 2 deletions docs/nightly/en/user-guide/clients/grafana.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ http://<host>:4000/v1/prometheus

### Quick Preview using Docker

We built a docker compose file that integrated GreptimeDB, Prometheus,
Prometheus Node Exporter, Grafana and this plugin together.
Greptime provides a docker compose file that integrates GreptimeDB, Prometheus, Prometheus Node Exporter, Grafana, and this plugin together so you can quickly experience the GreptimeDB data source plugin.

```bash
git clone https://github.com/GreptimeTeam/greptimedb-grafana-datasource.git
Expand Down
24 changes: 15 additions & 9 deletions docs/nightly/zh/db-cloud-shared/clients/grafana-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ GreptimeDB 服务可以配置为 [Grafana 数据源](https://grafana.com/docs/gr

### 安装

[发布页面](https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/latest/)获取最新版本,解压文件到你的 [grafana 插件目录](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#plugins)
GreptimeDB 数据源插件目前仅支持在本地 Grafana 中的安装,
在安装插件前请确保 Grafana 已经安装并运行。

你也可以使用 Grafana Cli 下载并安装
你可以任选以下一种安装方式

```shell
grafana cli --pluginUrl https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/latest/download/info8fcc-greptimedb-datasource.zip plugins install info8fcc
```
- 下载安装包并解压到相关目录:从[发布页面](https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/latest/)获取最新版本,解压文件到你的 [grafana 插件目录](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#plugins)
- 使用 Grafana Cli 下载并安装:
```shell
grafana cli --pluginUrl https://github.com/GreptimeTeam/greptimedb-grafana-datasource/releases/latest/download/info8fcc-greptimedb-datasource.zip plugins install info8fcc
```

注意,安装插件后可能需要重新启动 Grafana 服务器。

Expand All @@ -21,7 +24,10 @@ grafana cli --pluginUrl https://github.com/GreptimeTeam/greptimedb-grafana-datas

{template greptimecloud-configurations%%}

在 Grafana 中单击 Add data source 按钮,然后选择 GreptimeDB 作为类型。
在 Grafana 中单击 Add data source 按钮,选择 GreptimeDB 作为类型。

![grafana-add-greptimedb-data-source](/grafana-add-greptimedb-data-source.png)

在 GreptimeDB server URL 中填写以下地址:

{template greptime-data-source-connection-url%%}
Expand All @@ -44,16 +50,16 @@ grafana cli --pluginUrl https://github.com/GreptimeTeam/greptimedb-grafana-datas
`Metric` 下拉列表中选择一个指标,然后点击 `Run query` 查看指标数据。
当你查看数据并确认无误后,点击 `Save` 保存面板。

![grafana-create-panel-with-selecting-metric](/create-panel-with-selecting-metric-greptimedb.jpg)
![grafana-create-panel-with-selecting-metric](/create-panel-with-selecting-metric-greptimedb.png)

你还可以使用 PromQL 创建面板。
点击 `Query` 标签页右侧的 `code` 按钮,切换到 PromQL 编辑器。
然后输入一个 PromQL 语句,例如 `system_memory_usage{state="used"}`,点击 `Run query` 查看指标数据。
然后输入一个 PromQL 语句,例如 `system_memory_usage{state="used"}`,点击 `Run queries` 查看指标数据。

![grafana-create-panel-with-promql](/grafana-create-panel-with-promql.png)

:::tip 注意
GreptimeDB 兼容大部分 PromQL,但是有一些限制。请参考 [PromQL 限制](/user-guide/query-data/promql#limitations) 文档获取更多信息。
GreptimeDB 兼容大部分 PromQL,但是有一些限制。请参考 [PromQL 限制](/user-guide/query-data/promql#局限) 文档获取更多信息。
:::

## Prometheus 数据源
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ GreptimeDB 可以作为 Prometheus 数据源配置在 Grafana 中。
![grafana-create-panel-with-promql](/grafana-create-panel-with-promql.png)

:::tip 注意
GreptimeDB 兼容大部分 PromQL,但是有一些限制。请参考 [PromQL 限制](/user-guide/query-data/promql#limitations) 文档获取更多信息。
GreptimeDB 兼容大部分 PromQL,但是有一些限制。请参考 [PromQL 限制](/user-guide/query-data/promql#局限) 文档获取更多信息。
:::
4 changes: 3 additions & 1 deletion docs/nightly/zh/user-guide/clients/grafana.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ http://<host>:4000/v1/prometheus

### 使用 Docker 快速预览

我们构建了一个 docker compose 文件,将 GreptimeDB、Prometheus、Prometheus Node Exporter、Grafana 和该插件集成在一起。
Greptime 提供了一个 docker compose 文件,
将 GreptimeDB、Prometheus、Prometheus Node Exporter、Grafana 和该插件集成在一起,
以便你能够快速体验 GreptimeDB 数据源插件。

```shell
git clone https://github.com/GreptimeTeam/greptimedb-grafana-datasource.git
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file removed docs/public/greptimedb-connection.jpg
Binary file not shown.

0 comments on commit 4c97aef

Please sign in to comment.