diff --git a/docs/user_docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md b/docs/user_docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md index a17429109bc..c8718764ce1 100644 --- a/docs/user_docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md +++ b/docs/user_docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md @@ -595,108 +595,6 @@ kbcli cluster logs myproxy --instance myproxy-mysql-0 -c vttablet -## Monitoring - -:::note - -In the production environment, all monitoring Addons are disabled by default when installing KubeBlocks. You can enable these Addons but it is highly recommended to build your monitoring system or purchase a third-party monitoring service. For details, refer to [Monitoring](./../../observability/monitor-database.md). - -::: - - - - - -1. Enable the monitoring Addons. - - For the testing/demo environment, run the commands below to enable the monitoring Addons provided by KubeBlocks. - - ```bash - helm install prometheus kubeblocks/prometheus --namespace kb-system --create-namespace - helm install prometheus kubeblocks/prometheus --namespace kb-system --create-namespace - helm install prometheus kubeblocks/prometheus --namespace kb-system --create-namespace - ``` - - For the production environment, you can integrate the monitoring components. For details, you can refer to the relevant docs provided by the monitoring tools. - -2. Check whether the monitoring function of this proxy cluster is enabled. - - ```bash - kubectl get cluster myproxy -o yaml - ``` - - If the output YAML file shows `disableExporter: false`, the monitoring function of this proxy cluster is enabled. - - If the monitoring function is not enabled, run the command below to enable it first. - - ```bash - kubectl patch cluster mycluster -n demo --type "json" -p '[{"op":"add","path":"/spec/componentSpecs/0/disableExporter","value":false}]' - ``` - -3. View the dashboard. - - For the testing/demo environment, run the commands below to view the Grafana dashboard. - - ```bash - # 1. Get the username and password - kubectl get secret grafana -n kb-system -o jsonpath='{.data.admin-user}' |base64 -d - - kubectl get secret grafana -n kb-system -o jsonpath='{.data.admin-password}' |base64 -d - - # 2. Connect to the Grafana dashboard - kubectl port-forward svc/grafana -n kb-system 3000:8 - - # 3. Open the web browser and enter the address 127.0.0.1:3000 to visit the dashboard. - - # 4. Enter the username and password obtained from step 1. - ``` - - For the production environment, you can view the dashboard of the corresponding cluster via Grafana Web Console. For more detailed information, see [the Grafana dashboard documentation](https://grafana.com/docs/grafana/latest/dashboards/). - -:::note - -1. If there is no data in the dashboard, you can check whether the job is `kubeblocks-service`. Enter `kubeblocks-service` in the job field and press the enter button. - - ![Monitoring dashboard](./../../../img/api-monitoring.png) - -2. For more details on the monitoring function, you can refer to [Monitoring](./../../observability/monitor-database.md). - -::: - - - - - -1. Enable the monitoring function. - - ```bash - kbcli cluster update myproxy --disable-exporter=false - ``` - -2. View the Addon list and enable the Grafana Addon. - - ```bash - kbcli addon list - - kbcli addon enable grafana - ``` - -3. View the dashboard list. - - ```bash - kbcli dashboard list - ``` - -4. Open the Grafana dashboard. - - ```bash - kbcli dashboard open kubeblocks-grafana - ``` - - - - - ## Read-write splitting You can enable the read-write splitting function. @@ -767,7 +665,7 @@ You can also set the ratio for read-write splitting and here is an example of di kbcli cluster configure myproxy --components vtgate --set=read_write_splitting_ratio=70 ``` -Moreover, you can [use Grafana](#monitoring) or run `show workload` in the VTGate terminal to view the flow distribution. +Moreover, you can run `show workload` in the VTGate terminal to view the flow distribution. ```bash show workload; diff --git a/docs/user_docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md b/docs/user_docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md index 362b7b328a6..5d3e307a689 100644 --- a/docs/user_docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md +++ b/docs/user_docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md @@ -157,10 +157,6 @@ Elasticsearch provides the HTTP protocol for client access on port 9200. You can curl http://127.0.0.1:9200/_cat/nodes?v ``` -## Monitor the Elasticsearch cluster - -The monitoring function of Elasticsearch is the same as other engines. For details, refer to [the monitoring tutorial](./../observability/monitor-database.md). - ## Scale KubeBlocks supports horizontally and vertially scaling an Elasticsearch cluster. diff --git a/docs/user_docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kubeblocks.md b/docs/user_docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kubeblocks.md index 76f26146c26..d69106df377 100644 --- a/docs/user_docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kubeblocks.md +++ b/docs/user_docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kubeblocks.md @@ -13,7 +13,7 @@ import TabItem from '@theme/TabItem'; KubeBlocks can quickly integrate new engines through good abstraction. The functions tested in KubeBlocks include Pulsar cluster creation and deletion, vertical and horizontal scaling of Pulsar cluster components, storage expansion, restart, and configuration changes. -KubeBlocks supports Pulsar's daily operations, including basic lifecycle operations such as cluster creation, deletion, and restart, as well as advanced operations such as horizontal and vertical scaling, storage expansion, configuration changes, and monitoring. +KubeBlocks supports Pulsar's daily operations, including basic lifecycle operations such as cluster creation, deletion, and restart, as well as advanced operations such as horizontal and vertical scaling, storage expansion, and configuration changes. ## Environment Recommendation @@ -129,7 +129,7 @@ Refer to the [Pulsar official document](https://pulsar.apache.org/docs/3.1.x/) f 2. Create a cluster. - - **Option 1**: (**Recommended**) Create pulsar cluster by `values-production.yaml` and enable monitor. + - **Option 1**: (**Recommended**) Create pulsar cluster by `values-production.yaml`. Configuration: - broker: 3 replicas @@ -137,7 +137,7 @@ Refer to the [Pulsar official document](https://pulsar.apache.org/docs/3.1.x/) f - zookeeper: 3 replicas ```bash - helm install mycluster kubeblocks/pulsar-cluster --version "x.y.z" -f values-production.yaml --set monitor.enabled=true --namespace=demo + helm install mycluster kubeblocks/pulsar-cluster --version "x.y.z" -f values-production.yaml --namespace=demo ``` - **Option 2**: Create pulsar cluster with proxy. @@ -149,7 +149,7 @@ Refer to the [Pulsar official document](https://pulsar.apache.org/docs/3.1.x/) f - zookeeper: 3 replicas ```bash - helm install mycluster kubeblocks/pulsar-cluster --version "x.y.z" -f values-production.yaml --set proxy.enable=true --set monitor.enabled=true --namespace=demo + helm install mycluster kubeblocks/pulsar-cluster --version "x.y.z" -f values-production.yaml --set proxy.enable=true --namespace=demo ``` - **Option 3**: Create pulsar cluster with proxy and deploy `bookies-recovery` component. @@ -162,7 +162,7 @@ Refer to the [Pulsar official document](https://pulsar.apache.org/docs/3.1.x/) f - bookies-recovery: 3 replicas ```bash - helm install mycluster kubeblocks/pulsar-cluster --version "x.y.z" -f values-production.yaml --set proxy.enable=true --set bookiesRecovery.enable=true --set monitor.enabled=true --namespace=demo + helm install mycluster kubeblocks/pulsar-cluster --version "x.y.z" -f values-production.yaml --set proxy.enable=true --set bookiesRecovery.enable=true --namespace=demo ``` - **Option 4**: Create pulsar cluster and specify bookies and zookeeper storage parameters. @@ -173,7 +173,7 @@ Refer to the [Pulsar official document](https://pulsar.apache.org/docs/3.1.x/) f - zookeeper: 3 replicas ```bash - helm install mycluster kubeblocks/pulsar-cluster --version "x.y.z" -f values-production.yaml --set bookies.persistence.data.storageClassName=,bookies.persistence.log.storageClassName=,zookeeper.persistence.data.storageClassName=,zookeeper.persistence.log.storageClassName= --set monitor.enabled=true --namespace=demo + helm install mycluster kubeblocks/pulsar-cluster --version "x.y.z" -f values-production.yaml --set bookies.persistence.data.storageClassName=,bookies.persistence.log.storageClassName=,zookeeper.persistence.data.storageClassName=,zookeeper.persistence.log.storageClassName= --namespace=demo ``` You can specify the storage name ``. diff --git a/docs/user_docs/kubeblocks-for-qdrant/manage-qdrant.md b/docs/user_docs/kubeblocks-for-qdrant/manage-qdrant.md index e93cf00e031..11b76d2ce83 100644 --- a/docs/user_docs/kubeblocks-for-qdrant/manage-qdrant.md +++ b/docs/user_docs/kubeblocks-for-qdrant/manage-qdrant.md @@ -214,10 +214,6 @@ If your cluster is on AWS, install the AWS Load Balancer Controller first. -## Monitor the database - -The monitoring function of Qdrant is the same as other engines. For details, refer to [the monitoring tutorial](./../observability/monitor-database.md). - ## Scale The scaling function for Qdrant is also supported. diff --git a/docs/user_docs/observability/monitor-database.md b/docs/user_docs/observability/monitor-database.md index d5e6f6e6123..718d9b1db4e 100644 --- a/docs/user_docs/observability/monitor-database.md +++ b/docs/user_docs/observability/monitor-database.md @@ -10,223 +10,190 @@ import TabItem from '@theme/TabItem'; # Monitor a database -With the built-in database observability, you can observe the database health status and track and measure your database in real-time to optimize database performance. This section shows you how database monitoring tools work with KubeBlocks and how to use the function. +This tutorial demonstrates how to configure the monitoring function for a PostgreSQL cluster, using Prometheus and Grafana. -## For Playground/demo environment +## Step 1. Install the Prometheus Operator and Grafana -KubeBlocks integrates open-source monitoring components, such as Prometheus, AlertManager, and Grafana, by Addons and adopts the custom `apecloud-otel-collector` to collect the monitoring indicators of databases and host machines. You can use these Addons for the test or demo environment. +Install the Promethus Operator and Grafana to monitor the performance of a database. Skip this step if a Prometheus Operator is already installed in your environment. -* `prometheus`: it includes Prometheus and AlertManager addons. -* `grafana`: it includes Grafana monitoring addons. -* `victoria-metrics`: it collects metrics from various sources and stores them to VictoriaMetrics. -* `victoria-metrics-agent`: it collects metrics from various sources, relabel and filter the collected metrics and store them in VictoriaMetrics or any other storage systems via Prometheus `remote_write` protocol or via VictoriaMetrics `remote_write` protocol. -* `alertmanager-webhook-adaptor`: it includes the notification extension and is used to extend the notification capability of AlertManager. Currently, the custom bots of Feishu, DingTalk, and Wechat Enterprise are supported. -* `apecloud-otel-collector`: it is used to collect the indicators of databases and the host machine. - -If you are using KubeBlocks Playground, these addons are enabled by default. - -### Steps - - - - - -#### Enable monitoring addons - -:::note - -Here is an example of enabling the `prometheus` Addon. You can enable other monitoring addons by replacing `prometheus` in the example with the name of other Addons. - -::: - -1. (Optional) Add the KubeBlocks repo. If you install KubeBlocks with Helm, just run `helm repo update`. +1. Create a new namespace for Prometheus Operator. ```bash - helm repo add kubeblocks https://apecloud.github.io/helm-charts - helm repo update + kubectl create namespace monitoring ``` -2. View the addon versions. +2. Add the Prometheus Operator Helm repository. ```bash - helm search repo kubeblocks/prometheus --devel --versions + helm repo add prometheus-community https://prometheus-community.github.io/helm-charts ``` -3. Install the addon. +3. Install the Prometheus Operator. ```bash - helm install prometheus kubeblocks/prometheus --namespace kb-system --create-namespace + helm install prometheus-operator prometheus-community/kube-prometheus-stack --namespace monitoring ``` -4. Verify whether this addon is installed. - - The STATUS is deployed and this addon is installed successfully. +4. Verify the deployment of the Prometheus Operator. Make sure all pods are in the Ready state. ```bash - helm list -A - > - NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION - ... - prometheus kb-system 1 2024-05-31 12:01:52.872584 +0800 CST deployed prometheus-15.16.1 2.39.1 + kubectl get pods -n monitoring ``` -#### Enable the monitoring function for a database +5. Access the Prometheus and Grafana dashboards. -The open-source or customized Exporter is injected after the monitoring function is enabled. This Exporter can be found by the Prometheus server automatically and scrape monitoring indicators at regular intervals. + 1. Check the service endpoints of Prometheus and Grafana. -If you disable the monitoring function when creating a cluster, run the command below to enable it. - -```bash -kubectl patch cluster mycluster -n demo --type "json" -p '[{"op":"add","path":"/spec/componentSpecs/0/disableExporter","value":false}]' -``` + ```bash + kubectl get svc -n monitoring + ``` -If you want to disable the monitoring function, run the command below to disable it. + 2. Use port forwarding to access the Prometheus dashboard locally. -```bash -kubectl patch cluster mycluster -n namespace --type "json" -p '[{"op":"add","path":"/spec/componentSpecs/0/disableExporter","value":true}]' -``` + ```bash + kubectl port-forward svc/prometheus-operator-kube-p-prometheus -n monitoring 9090:9090 + ``` -You can also edit the `cluster.yaml` to enable/disable the monitoring function. + You can also access the Prometheus dashboard by opening "http://localhost:9090" in your browser. -```bash -kubectl edit cluster mycluster -n demo -``` + 3. Retrieve the Grafana's login credential from the secret. -Edit the value of `spec.componentSpecs.disableExporter`. + ```bash + kubectl get secrets prometheus-operator-grafana -n monitoring -o yaml + ``` -```yaml -... -componentSpecs: - - name: mysql - componentDefRef: mysql - enabledLogs: - - error - - general - - slow - disableExporter: false # Change this value -``` + 4. Use port forwarding to access the Grafana dashboard locally. -#### View the dashboard + ```bash + kubectl port-forward svc/prometheus-operator-grafana -n monitoring 3000:80 + ``` -Use the `grafana` addon provided by KubeBlocks to view the dashboard. + You can also access the Grafana dashboard by opening "http://localhost:3000" in your browser. -1. Get the username and password of the `grafana` addon. +6. Configure the selectors for PodMonitor and ServiceMonitor to match your monitoring requirements. - ```bash - kubectl get secret grafana -n kb-system -o jsonpath='{.data.admin-user}' |base64 -d + Prometheus Operator uses Prometheus CRD to set up a Prometheus instance and to customize configurations of replicas, PVCs, etc. - kubectl get secret grafana -n kb-system -o jsonpath='{.data.admin-password}' |base64 -d - ``` + To update the configuration on PodMonitor and ServiceMonitor, modify the Prometheus CR according to your needs: -2. Run the command below to connect to the Grafana dashboard. - - ```bash - kubectl port-forward svc/grafana -n kb-system 3000:80 - > - Forwarding from 127.0.0.1:3000 -> 3000 - Forwarding from [::1]:3000 -> 3000 - Handling connection for 3000 - ``` - -3. Open the web browser and enter the address `127.0.0.1:3000` to visit the dashboard. -4. Enter the username and password obtained from step 1. - -:::note - -If there is no data in the dashboard, you can check whether the job is `kubeblocks-service`. Enter `kubeblocks-service` in the job field and press the enter button. - -![monitoring](./../../img/api-monitoring.png) - -::: - - - - - -1. View all built-in Addons and make sure the monitoring Addons are enabled. If the monitoring Addons are not enabled, [enable these addons](./../installation/install-addons.md) first. - - ```bash - # View all addons supported - kbcli addon list - ... - grafana Helm Enabled true - alertmanager-webhook-adaptor Helm Enabled true - prometheus Helm Enabled alertmanager true - ... - ``` - -2. Check whether the monitoring function of the cluster is enabled. If the monitoring function is enabled, the output shows `disableExporter: false`. - - ```bash - kubectl get cluster mycluster -o yaml - > - apiVersion: apps.kubeblocks.io/v1alpha1 - kind: Cluster + ```yaml + apiVersion: monitoring.coreos.com/v1 + kind: Prometheus metadata: - ... spec: - ... - componentSpecs: - ... - disableExporter: false + podMonitorNamespaceSelector: {} # Namespaces to match for PodMonitors discovery + # PodMonitors to be selected for target discovery. An empty label selector + # matches all objects. + podMonitorSelector: + matchLabels: + release: prometheus # Make sure your PodMonitor CR labels matches the selector + serviceMonitorNamespaceSelector: {} # Namespaces to match for ServiceMonitors discovery + # ServiceMonitors to be selected for target discovery. An empty label selector + # matches all objects. + serviceMonitorSelector: + matchLabels: + release: prometheus # Make sure your ServiceMonitor CR labels matches the selector ``` - If `disableExporter: false` is not shown in the output, it means the monitoring function of this cluster is not enabled and you need to enable it first. +## Step 2. Monitor a database cluster - ```bash - kbcli cluster update mycluster --disable-exporter=false - ``` +This section demonstrates how to use Prometheus and Grafana for monitoring a database cluster. -3. View the dashboard list. +### Enable the monitoring function for a database cluster - ```bash - kbcli dashboard list - > - NAME NAMESPACE PORT CREATED-TIME - kubeblocks-grafana kb-system 13000 Jul 24,2023 11:38 UTC+0800 - kubeblocks-prometheus-alertmanager kb-system 19093 Jul 24,2023 11:38 UTC+0800 - kubeblocks-prometheus-server kb-system 19090 Jul 24,2023 11:38 UTC+0800 - ``` +#### For a new cluster -4. Open and view the web console of a monitoring dashboard. For example, +Create a new cluster with the following command, ensuring the monitoring exporter is enabled. - ```bash - kbcli dashboard open kubeblocks-grafana - ``` +:::note - +Make sure `spec.componentSpecs.disableExporter` is set to `false` when creating a cluster. - +::: + +```yaml +cat < - - -If you disable the monitoring function when creating a cluster, run the command below to enable it. + ```bash kubectl patch cluster mycluster -n demo --type "json" -p '[{"op":"add","path":"/spec/componentSpecs/0/disableExporter","value":false}]' ``` -If you want to disable the monitoring function, run the command below to disable it. + -```bash -kubectl patch cluster mycluster -n namespace --type "json" -p '[{"op":"add","path":"/spec/componentSpecs/0/disableExporter","value":true}]' -``` + You can also edit the `cluster.yaml` to enable/disable the monitoring function. @@ -234,7 +201,7 @@ You can also edit the `cluster.yaml` to enable/disable the monitoring function. kubectl edit cluster mycluster -n demo ``` -Edit the value of `spec.componentSpecs.disableExporter`. +Edit the value of `disableExporter`. ```yaml ... @@ -245,100 +212,83 @@ componentSpecs: - error - general - slow - disableExporter: true # Change this value -``` - - - - - -```bash -kubectl get cluster mycluster -o yaml -> -apiVersion: apps.kubeblocks.io/v1alpha1 -kind: Cluster -metadata: + disableExporter: true # Set to `false` to enable exporter ... -spec: - ... - componentSpecs: - ... - disableExporter: false -``` - -If `disableExporter: false` is not shown in the output, it means the monitoring function of this cluster is not enabled and you need to enable it first. - -```bash -kbcli cluster update mycluster --disable-exporter=false ``` -### View the dashboard - -You can view the dashboard of the corresponding cluster via Grafana Web Console. For more detailed information, see the [Grafana dashboard documentation](https://grafana.com/docs/grafana/latest/dashboards/). - -### (Optional) Enable remote write +When the cluster is running, each Pod should have a sidecar container, named `exporter` running the postgres-exporter. -Remote write is an optional step and you can enable it based on your actual needs. KubeBlocks provides an Addon, `victoria-metrics-agent`, to push the monitoring data to a third-party monitoring system compatible with the Prometheus Remote Write protocol. Compared with the native Prometheus, [vmgent](https://docs.victoriametrics.com/vmagent.html) is lighter and supports the horizontal extension. For detailed settings, you can refer to [Victoria Metrics docs](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-agent). - - - - - -Install the `victoria-metrics-agent` Addon. - -```bash -helm install vm kubeblocks/victoria-metrics-agent --set remoteWriteUrls={http://:/} -``` - - +### Create PodMonitor - +1. Query `scrapePath` and `scrapePort`. -1. Enable data push. - - You just need to provide the endpoint which supports the Prometheus Remote Write protocol and multiple endpoints can be supported. Refer to the tutorials of your third-party monitoring system for how to get an endpoint. - - The following examples show how to enable data push by different options. + Retrieve the `scrapePath` and `scrapePort` from the Pod's exporter container. ```bash - # The default option. You only need to provide an endpoint with no verification. - # Endpoint example: http://localhost:8428/api/v1/write - kbcli addon enable victoria-metrics-agent --set remoteWriteUrls={http://:/} + kubectl get po mycluster-postgresql-0 -oyaml | yq '.spec.containers[] | select(.name=="exporter") | .ports ' ``` - ```bash - # Basic Auth - kbcli addon enable victoria-metrics-agent --set "extraArgs.remoteWrite\.basicAuth\.username=,extraArgs.remoteWrite\.basicAuth\.password=,remoteWriteUrls={http://:/}" - ``` +
- ```bash - # TLS - kbcli addon enable victoria-metrics-agent --set "extraArgs.tls=true,extraArgs.tlsCertFile=,extraArgs.tlsKeyFile=,remoteWriteUrls={http://:/}" - ``` + Expected Output ```bash - # AWS SigV4 - kbcli addon enable victoria-metrics-agent --set "extraArgs.remoteWrite\.aws\.region=,extraArgs.remoteWrite\.aws\.accessKey=,extraArgs.remoteWrite\.aws\.secretKey=,remoteWriteUrls={http://:/}" + - containerPort: 9187 + name: http-metrics + protocol: TCP ``` -2. (Optional) Horizontally scale the `victoria-metrics-agent` addon. +
- When the amount of database instances continues to increase, a single-node vmagent becomes the bottleneck. This problem can be solved by scaling vmagent. The multiple-node vmagent automatically divides the task of data collection according to the Hash strategy. +2. Create `PodMonitor`. - ```bash - kbcli addon enable victoria-metrics-agent --replicas --set remoteWriteUrls={http://:/} + Apply the `PodMonitor` file to monitor the cluster. You can also find the latest example YAML file in the [KubeBlocks Addons repo](https://github.com/apecloud/kubeblocks-addons/blob/main/examples/postgresql/pod-monitor.yml). + + ```yaml + kubectl apply -f - < + There is a pre-configured dashboard for PostgreSQL under the `APPS / PostgreSQL` folder in the Grafana dashboard. And more dashboards can be found in the [Grafana dashboard store](https://grafana.com/grafana/dashboards/). -
+::::note + +Make sure the labels (such as the values of path and port in endpoint) are set correctly in the `PodMonitor` file to match your dashboard. + +::: diff --git a/docs/user_docs/try-out-on-playground/try-kubeblocks-on-cloud.md b/docs/user_docs/try-out-on-playground/try-kubeblocks-on-cloud.md index 694b6ee5cdc..3af72778a82 100644 --- a/docs/user_docs/try-out-on-playground/try-kubeblocks-on-cloud.md +++ b/docs/user_docs/try-out-on-playground/try-kubeblocks-on-cloud.md @@ -345,27 +345,6 @@ kbcli cluster connect mycluster 5 rows in set (0.02 sec) ``` -### Observe a MySQL cluster - -KubeBlocks has complete observability capabilities. This section demonstrates the monitoring function of KubeBlocks. - -***Steps:*** - -1. Open the grafana dashboard. - - ```bash - kbcli dashboard open kubeblocks-grafana - ``` - - ***Result*** - - A monitoring page on Grafana website is loaded automatically after the command is executed. - -2. Click the Dashboard icon on the left bar and two monitoring panels show on the page. - ![Dashboards](./../../img/quick_start_dashboards.png) -3. Click **General** -> **MySQL** to monitor the status of the MySQL cluster created by Playground. - ![MySQL_panel](./../../img/quick_start_mysql_panel.png) - ### High availability of MySQL This guide shows a simple failure simulation to show you the failure recovery capability of MySQL. diff --git a/docs/user_docs/try-out-on-playground/try-kubeblocks-on-your-laptop.md b/docs/user_docs/try-out-on-playground/try-kubeblocks-on-your-laptop.md index 201383eafb3..3c7dfbc1514 100644 --- a/docs/user_docs/try-out-on-playground/try-kubeblocks-on-your-laptop.md +++ b/docs/user_docs/try-out-on-playground/try-kubeblocks-on-your-laptop.md @@ -133,27 +133,6 @@ kbcli cluster connect mycluster 5 rows in set (0.02 sec) ``` -### Observe a MySQL cluster - -KubeBlocks supports complete observability capabilities. This section demonstrates the monitoring function of KubeBlocks. - -***Steps:*** - -1. Open the grafana dashboard. - - ```bash - kbcli dashboard open kubeblocks-grafana - ``` - - **Result:** - - A monitoring page on Grafana website is loaded automatically after the command is executed. - -2. Click the Dashboard icon on the left bar and monitoring panels show on the page. - ![Dashboards](./../../img/quick_start_dashboards.png) -3. Click **General** -> **MySQL** to monitor the status of the MySQL cluster. - ![MySQL_panel](./../../img/quick_start_mysql_panel.png) - ### High availability of MySQL This guide shows a simple failure simulation to show you the failure recovery capability of MySQL. diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md b/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md index 906b3d8f32a..dacfe178c39 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-apecloud-mysql/proxy/apecloud-mysql-proxy.md @@ -603,107 +603,6 @@ kbcli cluster logs myproxy --instance myproxy-mysql-0 -c vttablet -## 监控 - -:::note - -在生产环境安装 KubeBlocks 时,所有监控插件默认处于禁用状态。你可以自行启用这些插件,但强烈建议你构建自己的监控系统或购买第三方监控服务。详情请参考[监控](./../../observability/monitor-database.md)。 - -::: - - - - - -1. 启用监控引擎。 - - 对于测试或演示环境,可执行以下命令,启用 KubeBlocks 提供的监控引擎。您可将 `prometheus` 替换为其他需要开启的监控引擎名称。 - - ```bash - helm install prometheus kubeblocks/prometheus --namespace kb-system --create-namespace - helm install grafana kubeblocks/grafana --namespace kb-system --create-namespace - ``` - - 对于生产环境,您可以集成监控组件。可参考监控工具提供的相关文档查看集成细节。 - -2. 检查当前代理集群的监控功能是否启用。 - - ```bash - kubectl get cluster myproxy -o yaml - ``` - - 如果输出的 YAML 文件中显示 `disableExporter: false`,则表示该集群的监控功能已开启。 - - 如果监控功能未开启,可执行以下命令启用监控功能。 - - ```bash - kubectl patch cluster mycluster -n demo --type "json" -p '[{"op":"add","path":"/spec/componentSpecs/0/disableExporter","value":false}]' - ``` - -3. 查看监控大盘。 - - 对于测试或演示环境,可执行以下命令查看 Grafana 大盘。 - - ```bash - # 1. 获取用户名及密码 - kubectl get secret grafana -n kb-system -o jsonpath='{.data.admin-user}' |base64 -d - - kubectl get secret grafana -n kb-system -o jsonpath='{.data.admin-password}' |base64 -d - - # 2. 连接至 Grafana 大盘 - kubectl port-forward svc/grafana -n kb-system 3000:8 - - # 3. 打开浏览器,输入地址 127.0.0.1:3000,查看大盘 - - # 4. 输入步骤 1 中获取的用户名及密码 - ``` - - 对于生产环境,您可以通过 Grafana Web 控制台查看对应集群的大盘。可查看 [Grafana 大盘文档](https://grafana.com/docs/grafana/latest/dashboards/) 查看配置细节。 - -:::note - -1. 如果大盘中无数据,您可检查 job 是否为 `kubeblocks-service`。如果不是,可在 job 字段中输入 `kubeblocks-service` 并按回车键跳转。 - - ![Monitoring dashboard](./../../../img/api-monitoring.png) - -2. 更多关于监控功能的细节,可查看 [监控](./../../observability/monitor-database.md) 文档。 - -::: - - - - - -1. 启用监控功能。 - - ```bash - kbcli cluster update myproxy --monitor=true - ``` - -2. 查看插件列表并启用 Grafana 插件。 - - ```bash - kbcli addon list - - kbcli addon enable grafana - ``` - -3. 查看仪表盘列表。 - - ```bash - kbcli dashboard list - ``` - -4. 打开 Grafana 仪表盘。 - - ```bash - kbcli dashboard open kubeblocks-grafana - ``` - - - - - ## 读写分离 你可以启用读写分离功能。 @@ -774,7 +673,7 @@ kbcli cluster configure myproxy --components vtgate --set=read_write_splitting_p kbcli cluster configure myproxy --components vtgate --set=read_write_splitting_ratio=70 ``` -此外,你还可以[使用 Grafana](#监控) 或在 VTGate 终端中执行 `show workload` 来查看流量分布。 +此外,你还可以在 VTGate 终端中执行 `show workload` 来查看流量分布。 ```bash show workload; diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md b/i18n/zh-cn/user-docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md index 9b585989448..419c85c03e0 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md @@ -153,10 +153,6 @@ Elasticsearch 提供 HTTP 访问协议,使用端口 9200 进行通信。您可 curl http://127.0.0.1:9200/_cat/nodes?v ``` -## 监控集群 - -Elasticsearch 的监控功能与其他引擎相同,可参考[监控文档](./../observability/monitor-database.md),了解功能细节。 - ## 扩缩容 ### 水平扩缩容 diff --git a/i18n/zh-cn/user-docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kb.md b/i18n/zh-cn/user-docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kb.md index b7122fed3b9..42869116574 100644 --- a/i18n/zh-cn/user-docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kb.md +++ b/i18n/zh-cn/user-docs/kubeblocks-for-pulsar/cluster-management/create-pulsar-cluster-on-kb.md @@ -13,7 +13,7 @@ import TabItem from '@theme/TabItem'; KubeBlocks 可以通过良好的抽象快速集成新引擎,并支持 Pulsar 集群的创建和删除、集群组件的垂直扩缩容和水平扩缩容、存储扩容、重启和配置更改等。 -本系列文档重点展示 KubeBlocks 对 Pulsar 日常运维能力的支持,包括集群创建、删除、重启等基本生命周期操作,以及水平扩容、垂直扩容、存储扩容、配置变更、监控等高阶操作。 +本系列文档重点展示 KubeBlocks 对 Pulsar 日常运维能力的支持,包括集群创建、删除、重启等基本生命周期操作,以及水平扩容、垂直扩容、存储扩容、配置变更等高阶操作。 ## 环境推荐 diff --git a/i18n/zh-cn/user-docs/observability/monitor-database.md b/i18n/zh-cn/user-docs/observability/monitor-database.md index 3a60ab4b18c..00c3b3f984f 100644 --- a/i18n/zh-cn/user-docs/observability/monitor-database.md +++ b/i18n/zh-cn/user-docs/observability/monitor-database.md @@ -1,7 +1,7 @@ --- -title: 监控数据库 -description: 如何监控数据库 -keywords: [监控数据库, 监控集群, 监控] +title: 监控 +description: 如何监控数据库集群 +keywords: [监控, 监控数据库集群] sidebar_position: 1 --- @@ -10,221 +10,166 @@ import TabItem from '@theme/TabItem'; # 监控数据库 -KubeBlocks 提供了强大的可观测性能力。您可以实时观察数据库的健康状态,及时跟踪数据库,并优化数据库性能。本文档将展示 KubeBlocks 中的数据库监控工具以及它们该如何使用。 +您可按需通过不同的监控工具监控集群状态,本教程使用 Prometheus 和 Grafana 作为监控工作,以配置 PostgreSQL 集群的监控功能为例进行说明。 -## Playground/演示场景 +## 步骤 1. 安装 Prometheus Operator 和 Grafana -KubeBlocks 以插件(Addon)形式集成了许多开源监控组件,如 Prometheus、AlertManager 和 Grafana,并采用定制的 `apecloud-otel-collector` 组件收集数据库和宿主机的监控指标。您可以在测试或演示环境中使用以下监控引擎。 +安装 Prometheus Operator 和 Grafana, 监控数据库性能指标。如果您的环境中已有 Prometheus Operator,可跳过本节。 -- `prometheus`:包括 Prometheus 和 AlertManager 两个监控组件。 -- `grafana`:包括 Grafana 的监控组件。 -- `victoria-metrics`:从多个源收集指标并将其存储到 VictoriaMetrics 中。 -- `victoria-metrics-agent`:从多个源收集指标,重新标记和过滤收集到的指标,并通过 Prometheus `remote_write` 协议或 VictoriaMetrics `remote_write` 协议将其存储到 VictoriaMetrics 或其他存储系统中。 -- `alertmanager-webhook-adaptor`:包括消息通知扩展组件,用于扩展 AlertManager 的通知能力。目前已经支持飞书、钉钉和企业微信的自定义机器人。 -- `apecloud-otel-collector`:用于采集数据库和宿主机的指标。 - -如果您使用的是 KubeBlocks Playground,上述监控引擎默认启用。如需在测试环境中使用,可按照以下步骤操作。 - -### 步骤 - - - - - -1. 查看所有支持的引擎,确保监控引擎已启用。可参考[此文档](./../installation/install-addons.md),查看安装或启用引擎的详细说明。 - - ```bash - # 查看内置支持的所有引擎 - kbcli addon list - ... - grafana Helm Enabled true - alertmanager-webhook-adaptor Helm Enabled true - ... - - # 如果监控引擎未列出,则表明该引擎未安装,可按照以下步骤安装引擎 - # 1. 检索引擎 - kbcli addon search prometheus - - # 2. 安装引擎 - kbcli addon install prometheus --index kubeblocks - - # 如果列表中有该引擎但显示为 Disabled,说明引擎未启用,可按照以下步骤启用引擎 - kbcli addon enable apecloud-otel-collector - ``` - -2. 查看集群监控功能是否已开启。如果输出结果显示 `disableExporter: false`,则说明监控功能已开启。 - - ```bash - kubectl get cluster mycluster -o yaml - > - apiVersion: apps.kubeblocks.io/v1alpha1 - kind: Cluster - metadata: - ... - spec: - ... - componentSpecs: - ... - disableExporter: false - ``` - - 如果输出结果中未显示 `disableExporter: false`,则说明集群监控功能未开启,可执行以下命令,开启监控功能。 - - ```bash - kbcli cluster update mycluster --disable-exporter=false - ``` - -3. 查看仪表盘列表。 - - ```bash - kbcli dashboard list - > - NAME NAMESPACE PORT CREATED-TIME - kubeblocks-grafana kb-system 13000 Jul 24,2023 11:38 UTC+0800 - kubeblocks-prometheus-alertmanager kb-system 19093 Jul 24,2023 11:38 UTC+0800 - kubeblocks-prometheus-server kb-system 19090 Jul 24,2023 11:38 UTC+0800 - ``` - -4. 打开网页控制台并查看。例如: - - ```bash - kbcli dashboard open kubeblocks-grafana - ``` - - - - - -:::note - -以下示例展示了启用 `prometheus` 引擎。您可以将 `prometheus` 替换为其他监控引擎的名称,以开启对应的引擎。 - -::: - -### 1. 启用监控引擎 - -1. (可选)添加 KubeBlocks 仓库。如果您通过 Helm 安装 KubeBlocks,可直接执行 `helm repo update`。 +1. 为监控 Operator 创建新的命名空间。 ```bash - helm repo add kubeblocks https://apecloud.github.io/helm-charts - helm repo update + kubectl create namespace monitoring ``` -2. 查看引擎版本。 +2. 添加 Prometheus Operator Helm 仓库。 ```bash - helm search repo kubeblocks/prometheus --devel --versions + helm repo add prometheus-community https://prometheus-community.github.io/helm-charts ``` -3. 安装引擎。 +3. 安装 Prometheus Operator。 ```bash - helm install prometheus kubeblocks/prometheus --namespace kb-system --create-namespace + helm install prometheus-operator prometheus-community/kube-prometheus-stack --namespace monitoring ``` -4. 验证该引擎是否安装成功。 - - 状态显示为 deployed 表明该引擎安装成功。 +4. 验证 Prometheus Operator 是否安装成功。 ```bash - helm list -A - > - NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION - ... - prometheus kb-system 1 2024-05-31 12:01:52.872584 +0800 CST deployed prometheus-15.16.1 2.39.1 + kubectl get pods -n monitoring ``` -### 2. 开启集群监控功能 +5. 连接 Prometheus 和 Grafana 大盘。 -监控功能开启后,开源或自定义 Exporter 将会注入,Prometheus 服务器将自动发现该 Exporter,并定时抓取监控指标。 + 1. 查看 Prometheus 和 Grafana 的服务端口。 -如果您在创建集群是关闭了监控功能,可执行以下命令再次开启。 + ```bash + kubectl get svc -n monitoring + ``` -```bash -kubectl patch cluster mycluster -n demo --type "json" -p '[{"op":"add","path":"/spec/componentSpecs/0/disableExporter","value":false}]' -``` + 2. 使用 port forward 从本地连接 Prometheus 大盘。 -您也可通过编辑 `cluster.yaml` 文件开启/停用监控功能。 + ```bash + kubectl port-forward svc/prometheus-operator-kube-p-prometheus -n monitoring 9090:9090 + ``` -```bash -kubectl edit cluster mycluster -n demo -``` + 您也可通过在浏览器中打开 "http://localhost:9090" 地址,连接 Prometheus 大盘。 -在编辑器中修改 `disableExporter` 的参数值。 + 3. 从 secret 中获取 Grafana 的连接凭证。 -```yaml -... -componentSpecs: - - name: mysql - componentDefRef: mysql - enabledLogs: - - error - - general - - slow - disableExporter: false # 修改该参数值 -... -``` + ```bash + kubectl get secrets prometheus-operator-grafana -n monitoring -oyaml + ``` -(可选)如果您想要在使用后关闭监控功能,可执行以下命令停用该功能。 + 4. 使用 port forward 从本地连接 Grafana 大盘。 -```bash -kubectl patch cluster mycluster -n namespace --type "json" -p '[{"op":"add","path":"/spec/componentSpecs/0/disableExporter","value":true}]' -``` + ```bash + kubectl port-forward svc/prometheus-operator-grafana -n monitoring 3000:80 + ``` -### 3. 查看监控大盘 + 您也可通过在浏览器中打开 "http://localhost:3000" 地址,连接 Grafana 大盘。 -使用 KubeBlocks 提供的 Grafana 引擎查看监控大盘。 - -1. 获取 Grafana 引擎的用户名和密码。 - - ```bash - kubectl get secret grafana -n kb-system -o jsonpath='{.data.admin-user}' |base64 -d +6. (可选)配置 `PodMonitor` 及 `ServiceMonitor` 选择器。 - kubectl get secret grafana -n kb-system -o jsonpath='{.data.admin-password}' |base64 -d - ``` + Prometheus Operator 使用 Prometheus CRD 创建实例,自定义配置 replica、PVC 等其他参数。 -2. 执行以下命令连接 Grafana 大盘。 + 如需更新 `PodMonitor` 及 `ServiceMonitor` 的配置,您可按需更新 Prometheus CR 文件。 - ```bash - kubectl port-forward svc/grafana -n kb-system 3000:80 - > - Forwarding from 127.0.0.1:3000 -> 3000 - Forwarding from [::1]:3000 -> 3000 - Handling connection for 3000 + ```yaml + apiVersion: monitoring.coreos.com/v1 + kind: Prometheus + metadata: + spec: + podMonitorNamespaceSelector: {} # 匹配 PodMonitor 的命名空间 + # 选择用于目标发现的 PodMonitors。空的标签选择器 + # 会匹配所有对象 + podMonitorSelector: + matchLabels: + release: prometheus # 确保您的 PodMonitor CR 的标签与此选择器匹配 + serviceMonitorNamespaceSelector: {} # 匹配 ServiceMonitor 的命名空间 + # 选择用于目标发现的 ServiceMonitors。空的标签选择器 + # 会匹配所有对象 + serviceMonitorSelector: + matchLabels: + release: prometheus # 确保您的 ServiceMonitor CR 的标签与此选择器匹配 ``` -3. 打开浏览器,输入 `127.0.0.1:3000`,跳转至大盘界面。 -4. 输入第 1 步中获取的用户名和密码,即可访问。 +## 步骤 2. 监控数据库集群 -:::note +监控集群的方式多种多样,本文档中我们使用 Promethus 和 Grafana 演示如何监控集群。 -如果大盘中无数据,您可以检查界面中的 job 是否为 `kubeblocks-service`。如果不是,可在 job 框中输入 `kubeblocks-service`,回车后再次查看。 +### 开启集群的监控 exporter -![monitoring](./../../img/api-monitoring.png) +#### 创建新集群并开启监控 exporter -::: +使用以下命令创建集群,并开启监控 exporter。 - +:::Note - +创建集群时,请确保 `spec.componentSpecs.disableExporter` 设为 `false`。 -## 生产环境 +::: -在生产环境中,强烈建议搭建独立的监控系统或购买第三方监控服务。 +```yaml +cat < -查看集群监控功能是否已开启。如果输出结果显示 `disableExporter: false`,则说明监控功能已开启。 +输出 -```bash -kubectl get cluster mycluster -o yaml -> +```yaml apiVersion: apps.kubeblocks.io/v1alpha1 kind: Cluster metadata: @@ -236,31 +181,31 @@ spec: disableExporter: false ``` -如果输出结果中未显示 `disableExporter: false`,则说明集群监控功能未开启,可执行以下命令,开启监控功能。 + + +将 `disableExporter` 设置为 `false` 或使用隐式设置(使用默认值),即表示监控 exporter 已启用,这是监控功能正常运行的前提条件。如果输出结果显示 `disableExporter: true`,您需要将其修改为 `false`,开启监控 exporter。 + +请注意更新 `disableExporter` 字段会导致集群中的所有 Pod 重启。 - + ```bash -kbcli cluster update mycluster --disable-exporter=false +kubectl patch cluster mycluster -n demo --type "json" -p '[{"op":"add","path":"/spec/componentSpecs/0/disableExporter","value":false}]' ``` - + -```bash -kubectl patch cluster mycluster -n demo --type "json" -p '[{"op":"add","path":"/spec/componentSpecs/0/disableExporter","value":false}]' -``` - -您也可通过编辑 `cluster.yaml` 文件开启/停用监控功能。 +您也可通过编辑 `cluster.yaml` 文件开启监控功能。 ```bash kubectl edit cluster mycluster -n demo ``` -在编辑器中修改 `disableExporter` 的参数值。 +修改 `disableExporter` 的参数值。 ```yaml ... @@ -271,89 +216,82 @@ componentSpecs: - error - general - slow - disableExporter: false # 修改该参数值 -... -``` - -(可选)如果您想要在使用后关闭监控功能,可执行以下命令停用该功能。 - -```bash -kubectl patch cluster mycluster -n namespace --type "json" -p '[{"op":"add","path":"/spec/componentSpecs/0/disableExporter","value":true}]' + disableExporter: true # 将参数值设为 `false`,开启 exporter ``` -### 3. 查看大盘 +集群运行时,每个 Pod 都拥有一个名为 `exporter` 的 sidecar 容器,用于运行 postgres-exporter。 -您可通过 Grafana 网页控制台查看对应集群的大盘。具体信息,可查看 [Grafana 大盘文档](https://grafana.com/docs/grafana/latest/dashboards/)。 +### 创建 PodMonitor -### 4. (可选)开启远程写(Remote Write) - -远程写为可选操作,您可根据实际需要开启。 - -KubeBlocks 支持 victoria-metrics-agent 引擎,支持用户将数据远程写入 VictoriaMetrics 中,相较于 Prometheus 原生应用,[vmagent](https://docs.victoriametrics.com/vmagent.html) 更轻量。 - - +1. 获取 `scrapePath` 及 `scrapePort`。 - - -1. 开启数据推送。 - - 你只需要提供支持 Prometheus Remote Write 协议的终端节点(可以支持多个终端节点)。关于获取方式,请参考第三方监控系统的文档。 - - 下面展示如何通过不同的方法启用数据推送: + 您可从 Pod 的 exporter 容器中获取 `scrapePath` 及 `scrapePort`。 ```bash - # 默认选项:只需提供一个无需验证的终端节点。 - # 示例:http://localhost:8428/api/v1/write - kbcli addon enable victoria-metrics-agent --set remoteWriteUrls={http://:/} + kubectl get po mycluster-postgresql-0 -oyaml | yq '.spec.containers[] | select(.name=="exporter") | .ports ' ``` - ```bash - # Basic Auth 方式 - kbcli addon enable victoria-metrics-agent --set "extraArgs.remoteWrite\.basicAuth\.username=,extraArgs.remoteWrite\.basicAuth\.password=,remoteWriteUrls={http://:/}" - ``` +
- ```bash - # TLS 方式 - kbcli addon enable victoria-metrics-agent --set "extraArgs.tls=true,extraArgs.tlsCertFile=,extraArgs.tlsKeyFile=,remoteWriteUrls={http://:/}" - ``` + 输出 ```bash - # AWS SigV4 方式 - kbcli addon enable victoria-metrics-agent --set "extraArgs.remoteWrite\.aws\.region=,extraArgs.remoteWrite\.aws\.accessKey=,extraArgs.remoteWrite\.aws\.secretKey=,remoteWriteUrls={http://:/}" + - containerPort: 9187 + name: http-metrics + protocol: TCP ``` -2. (可选)水平扩容 `victoria-metrics-agent`。 +
- 当数据库实例不断增多时,单节点 vmagent 会成为瓶颈。此时可以选择通过扩容 vmagent 来解决这个问题。多节点 vmagent 内部会根据哈希策略自动划分数据采集的任务。 +2. 创建 `PodMonitor`。 - ```bash - kbcli addon enable victoria-metrics-agent --replicas --set remoteWriteUrls={http://:/} - ``` + 应用 `PodMonitor` 文件,监控集群。您也可以在 [KubeBlocks Addons 仓库](https://github.com/apecloud/kubeblocks-addons/blob/main/examples/postgresql/pod-monitor.yml)中查看最新版本示例 YAML 文件。 -3. (可选)关闭 `victoria-metrics-agent` 引擎。 - - ```bash - kbcli addon disable victoria-metrics-agent + ```yaml + kubectl apply -f - < - - +3. 连接 Grafana 大盘. -KubeBlocks 支持 `victoria-metrics-agent` 引擎,使您可以将数据远程写入您的 VM。与原生 Prometheus 相比,[vmgent](https://docs.victoriametrics.com/vmagent.html) 更轻量并且支持水平扩展。 + 登录 Grafana 大盘,并导入大盘。 -执行以下命令,安装 `victoria-metrics-agent` 引擎。 + Grafana 大盘的 `APPS / PostgreSQL` 文件夹下有预设的大盘模板。您也可以在 [Grafana 大盘商店](https://grafana.com/grafana/dashboards/)获取更多大盘模板。 -```bash -helm install vm kubeblocks/victoria-metrics-agent --set remoteWriteUrls={http://:/} -``` +::::note -有关详细设置,您可以参考 [Victoria Metrics 文档](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-agent)。 +请确保 `PodMonitor` 文件中的标签(如 endpoint 中的 path 和 port 值)设置正确,与您使用的大盘匹配。 - - -
+::: diff --git a/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-cloud.md b/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-cloud.md index 1645c293805..1c7845ad8f3 100644 --- a/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-cloud.md +++ b/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-cloud.md @@ -342,29 +342,6 @@ kbcli cluster connect mycluster 5 rows in set (0.02 sec) ``` -### 观测 MySQL 集群 - -KubeBlocks 具备完整的可观测性能力,下面主要演示其中的监控功能。 - -***步骤:*** - -1. 打开 Grafana 仪表盘。 - - ```bash - kbcli dashboard open kubeblocks-grafana - ``` - - ***结果*** - - 命令执行后,将自动加载出 Grafana 网站的监控页面。 - - -2. 点击左侧栏的仪表盘图标,页面上会显示两个监控面板。 - ![Dashboards](../../img/try-kb-on-cloud-dashboard.png) - -3. 点击 **General** -> **MySQL**,监控 Playground 创建的 MySQL 集群的状态。 - ![MySQL_panel](../../img/try-kb-on-cloud-mysql-panel.png) - ### MySQL 的高可用性 下面通过简单的故障模拟,展示 MySQL 的故障恢复能力。 diff --git a/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-local-host.md b/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-local-host.md index 73e297da52e..7f0de2fe3ac 100644 --- a/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-local-host.md +++ b/i18n/zh-cn/user-docs/try-out-on-playground/try-kubeblocks-on-local-host.md @@ -134,27 +134,6 @@ kbcli cluster connect mycluster 5 rows in set (0.02 sec) ``` -### 观测 MySQL 集群 - -KubeBlocks 具备完整的可观测性能力,下面主要演示其中的监控功能。 - -***步骤:*** - -1. 打开 Grafana 仪表盘。 - - ```bash - kbcli dashboard open kubeblocks-grafana - ``` - - **结果:** - - 命令执行后,将自动加载出 Grafana 网站的监控页面。 - -2. 点击左侧栏的仪表盘图标,页面上会显示两个监控面板。 - ![Dashboards](../../img/try-kb-on-local-dashboard.png) -3. 点击 **General** -> **MySQL**,监控 MySQL 集群的状态。 - ![MySQL_panel](../../img/try-kb-on-local-mysql-panel.png) - ### MySQL 的高可用性 下面通过简单的故障模拟,展示 MySQL 的故障恢复能力。