From e4a9a5eff2847da7212b0a1109ab36c14e928c06 Mon Sep 17 00:00:00 2001 From: zyy17 Date: Thu, 31 Oct 2024 22:41:24 +0800 Subject: [PATCH] refactor: code review --- .../deploy-on-kubernetes/getting-started.md | 10 +++++++--- .../deploy-on-kubernetes/getting-started.md | 12 ++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/user-guide/deployments/deploy-on-kubernetes/getting-started.md b/docs/user-guide/deployments/deploy-on-kubernetes/getting-started.md index 37d1fc8fc..f089d921a 100644 --- a/docs/user-guide/deployments/deploy-on-kubernetes/getting-started.md +++ b/docs/user-guide/deployments/deploy-on-kubernetes/getting-started.md @@ -300,9 +300,7 @@ The greptimedb-cluster is starting, use `kubectl get pods -n default` to check i ``` -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: @@ -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 `` and `` with your desired values and install the GreptimeDB cluster using the following command (please note that `` and `` in the command also need to be replaced): ```bash diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments/deploy-on-kubernetes/getting-started.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments/deploy-on-kubernetes/getting-started.md index a778771d8..1110376c7 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments/deploy-on-kubernetes/getting-started.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments/deploy-on-kubernetes/getting-started.md @@ -63,7 +63,7 @@ To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. :::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 @@ -357,9 +357,7 @@ The greptimedb-cluster is starting, use `kubectl get pods -n default` to check i ``` -在启用 `monitoring` 选项时,Helm chart 的配置会默认分别使用 `mycluster` 和 `default` 作为集群名和命名空间。 - -如果你想修改默认的集群名和命名空间,可以创建如下的 `values.yaml` 文件: +当启用 `monitoring` 选项时,Helm chart 配置将在 grafana 数据源配置中使用 `mycluster` 和 `default` 作为默认的集群名称和命名空间。如果你想要监控具有不同名称或不同命名空间的集群,可以创建一个如下所示的 `values.yaml` 文件: ```yaml grafana: @@ -379,6 +377,12 @@ grafana: database: public ``` +上述配置将在 Grafana dashboard 中为 GreptimeDB 集群的指标和日志创建默认的数据源: + +- `greptimedb-metrics`:集群的指标存储在独立的监控数据库中,并对外暴露为 Prometheus 协议(`type: prometheus`); + +- `greptimedb-logs`:集群的日志存储在独立的监控数据库中,并对外暴露为 MySQL 协议(`type: mysql`)。默认使用 `public` 数据库; + 然后将上面的 `values.yaml` 中的 `` 和 `` 替换为你想要的值,并使用以下命令安装 GreptimeDB 集群(请注意命令中的 `` 和 `` 同样需要替换): ```bash