Skip to content

Commit

Permalink
refactor: code review
Browse files Browse the repository at this point in the history
  • Loading branch information
zyy17 committed Nov 5, 2024
1 parent 00a20e6 commit e4a9a5e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,7 @@ The greptimedb-cluster is starting, use `kubectl get pods -n default` to check i
```
</details>
When the `monitoring` option is enabled, the Helm chart configuration will use `mycluster` and `default` as the default cluster name and namespace.
If you want to modify the default cluster name and namespace, you can create a `values.yaml` file like this:
When the `monitoring` option is enabled, the Helm chart configuration will use `mycluster` and `default` as the default cluster name and namespace in grafana datasources configuration. If you want to monitor clusters with a different name or a different namespace, you can create a `values.yaml` file like this:
```yaml
grafana:
Expand All @@ -322,6 +320,12 @@ grafana:
database: public
```
The above configuration will create the default datasources for the GreptimeDB cluster metrics and logs in the Grafana dashboard:
- `greptimedb-metrics`: The metrics of the cluster are stored in the standalone monitoring database and exposed in Prometheus protocol (`type: prometheus`);
- `greptimedb-logs`: The logs of the cluster are stored in the standalone monitoring database and exposed in MySQL protocol (`type: mysql`). It uses the `public` database by default;
Then replace `<cluster>` and `<namespace>` with your desired values and install the GreptimeDB cluster using the following command (please note that `<cluster>` and `<namespace>` in the command also need to be replaced):
```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
</details>

:::note
中国大陆用户如有网络访问问题,可使用 Greptime 提供的 `kindest/node:v1.27.3` 镜像:
中国大陆用户如有网络访问问题,可使用 Greptime 提供的位于阿里云镜像仓库的 `kindest/node:v1.27.3` 镜像:

```bash
kind create cluster --image greptime-registry.cn-hangzhou.cr.aliyuncs.com/kindest/node:v1.27.3
Expand Down Expand Up @@ -357,9 +357,7 @@ The greptimedb-cluster is starting, use `kubectl get pods -n default` to check i
```
</details>
在启用 `monitoring` 选项时,Helm chart 的配置会默认分别使用 `mycluster``default` 作为集群名和命名空间。
如果你想修改默认的集群名和命名空间,可以创建如下的 `values.yaml` 文件:
当启用 `monitoring` 选项时,Helm chart 配置将在 grafana 数据源配置中使用 `mycluster``default` 作为默认的集群名称和命名空间。如果你想要监控具有不同名称或不同命名空间的集群,可以创建一个如下所示的 `values.yaml` 文件:
```yaml
grafana:
Expand All @@ -379,6 +377,12 @@ grafana:
database: public
```
上述配置将在 Grafana dashboard 中为 GreptimeDB 集群的指标和日志创建默认的数据源:
- `greptimedb-metrics`:集群的指标存储在独立的监控数据库中,并对外暴露为 Prometheus 协议(`type: prometheus`);
- `greptimedb-logs`:集群的日志存储在独立的监控数据库中,并对外暴露为 MySQL 协议(`type: mysql`)。默认使用 `public` 数据库;
然后将上面的 `values.yaml` 中的 `<cluster>``<namespace>` 替换为你想要的值,并使用以下命令安装 GreptimeDB 集群(请注意命令中的 `<cluster>``<namespace>` 同样需要替换):
```bash
Expand Down

0 comments on commit e4a9a5e

Please sign in to comment.