Skip to content

Commit

Permalink
docs: adjust monitoring docs format and doc order (#8668)
Browse files Browse the repository at this point in the history
(cherry picked from commit 274793f)
  • Loading branch information
michelle-0808 committed Dec 19, 2024
1 parent 8ae5a89 commit dd84e69
Show file tree
Hide file tree
Showing 37 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion docs/user_docs/handle-an-exception/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 9
position: 10
label: Handle an Exception
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/kubeblocks-for-elasticsearch/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 18
position: 20
label: KubeBlocks for Elasticsearch
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/kubeblocks-for-kafka/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 16
position: 17
label: KubeBlocks for Kafka
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/kubeblocks-for-milvus/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 15
position: 16
label: KubeBlocks for Milvus
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/kubeblocks-for-mongodb/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 13
position: 14
label: KubeBlocks for MongoDB
collapsible: true
collapsed: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 11
position: 12
label: KubeBlocks for MySQL Community Edition
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/kubeblocks-for-postgresql/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 12
position: 13
label: KubeBlocks for PostgreSQL
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/kubeblocks-for-pulsar/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 16
position: 18
label: KubeBlocks for Pulsar
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/kubeblocks-for-qdrant/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 16
position: 19
label: KubeBlocks for Qdrant
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/kubeblocks-for-rabbitmq/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 21
position: 22
label: KubeBlocks for RabbitMQ
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/kubeblocks-for-redis/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 14
position: 15
label: KubeBlocks for Redis
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/kubeblocks-for-starrocks/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 20
position: 21
label: KubeBlocks for StarRocks
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/maintenance/_category_.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 5
position: 7
label: Maintenance
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion docs/user_docs/observability/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 6
position: 8
label: Observability
collapsible: true
collapsed: true
32 changes: 16 additions & 16 deletions docs/user_docs/observability/monitor-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import TabItem from '@theme/TabItem';

This tutorial demonstrates how to configure the monitoring function for a PostgreSQL cluster, using Prometheus and Grafana.

## Step 1. Install the Prometheus Operator and Grafana
## Step 1. Install Prometheus Operator and Grafana

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.

Expand Down Expand Up @@ -44,31 +44,31 @@ Install the Promethus Operator and Grafana to monitor the performance of a datab

1. Check the service endpoints of Prometheus and Grafana.

```bash
kubectl get svc -n monitoring
```
```bash
kubectl get svc -n monitoring
```

2. Use port forwarding to access the Prometheus dashboard locally.

```bash
kubectl port-forward svc/prometheus-operator-kube-p-prometheus -n monitoring 9090:9090
```
```bash
kubectl port-forward svc/prometheus-operator-kube-p-prometheus -n monitoring 9090:9090
```

You can also access the Prometheus dashboard by opening "http://localhost:9090" in your browser.
You can also access the Prometheus dashboard by opening "http://localhost:9090" in your browser.

3. Retrieve the Grafana's login credential from the secret.
```bash
kubectl get secrets prometheus-operator-grafana -n monitoring -o yaml
```
```bash
kubectl get secrets prometheus-operator-grafana -n monitoring -o yaml
```
4. Use port forwarding to access the Grafana dashboard locally.
```bash
kubectl port-forward svc/prometheus-operator-grafana -n monitoring 3000:80
```
```bash
kubectl port-forward svc/prometheus-operator-grafana -n monitoring 3000:80
```
You can also access the Grafana dashboard by opening "http://localhost:3000" in your browser.
You can also access the Grafana dashboard by opening "http://localhost:3000" in your browser.
6. Configure the selectors for PodMonitor and ServiceMonitor to match your monitoring requirements.
Expand Down Expand Up @@ -287,7 +287,7 @@ When the cluster is running, each Pod should have a sidecar container, named `ex
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
:::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.
Expand Down
2 changes: 1 addition & 1 deletion docs/user_docs/user-management/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 7
position: 9
label: User Management
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion i18n/zh-cn/user-docs/connect-databases/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 4
position: 6
label: 连接数据库
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion i18n/zh-cn/user-docs/handle-an-exception/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 9
position: 10
label: 故障处理
collapsible: true
collapsed: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 10
position: 11
label: 用 KubeBlocks 管理 ApeCloud MySQL
collapsible: true
collapsed: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 18
position: 20
label: 用 KubeBlocks 管理 Elasticsearch
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion i18n/zh-cn/user-docs/kubeblocks-for-kafka/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 15
position: 17
label: 用 KubeBlocks 管理 Kafka
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion i18n/zh-cn/user-docs/kubeblocks-for-milvus/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 17
position: 16
label: 用 KubeBlocks 管理 Milvus
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion i18n/zh-cn/user-docs/kubeblocks-for-mongodb/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 13
position: 14
label: 用 KubeBlocks 管理 MongoDB
collapsible: true
collapsed: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 11
position: 12
label: 用 KubeBlocks 管理 MySQL 社区版
collapsible: true
collapsed: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 11
position: 13
label: 用 KubeBlocks 管理 PostgreSQL
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion i18n/zh-cn/user-docs/kubeblocks-for-pulsar/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 16
position: 18
label: 用 KubeBlocks 管理 Pulsar
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion i18n/zh-cn/user-docs/kubeblocks-for-qdrant/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 14
position: 19
label: 用 KubeBlocks 管理 Qdrant
collapsible: true
collapsed: true
4 changes: 2 additions & 2 deletions i18n/zh-cn/user-docs/kubeblocks-for-rabbitmq/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 21
label: KubeBlocks for RabbitMQ
position: 22
label: KubeBlocks 管理 RabbitMQ
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion i18n/zh-cn/user-docs/kubeblocks-for-redis/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 14
position: 15
label: 用 KubeBlocks 管理 Redis
collapsible: true
collapsed: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 20
position: 21
label: 用 KubeBlocks 管理 StarRocks
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion i18n/zh-cn/user-docs/maintenance/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 5
position: 7
label: 集群维护
collapsible: true
collapsed: true
2 changes: 1 addition & 1 deletion i18n/zh-cn/user-docs/observability/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 6
position: 8
label: 可观测性
collapsible: true
collapsed: true
30 changes: 15 additions & 15 deletions i18n/zh-cn/user-docs/observability/monitor-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,31 @@ import TabItem from '@theme/TabItem';

1. 查看 Prometheus 和 Grafana 的服务端口。

```bash
kubectl get svc -n monitoring
```
```bash
kubectl get svc -n monitoring
```

2. 使用 port forward 从本地连接 Prometheus 大盘。

```bash
kubectl port-forward svc/prometheus-operator-kube-p-prometheus -n monitoring 9090:9090
```
```bash
kubectl port-forward svc/prometheus-operator-kube-p-prometheus -n monitoring 9090:9090
```

您也可通过在浏览器中打开 "http://localhost:9090" 地址,连接 Prometheus 大盘。
您也可通过在浏览器中打开 "http://localhost:9090" 地址,连接 Prometheus 大盘。

3. 从 secret 中获取 Grafana 的连接凭证。

```bash
kubectl get secrets prometheus-operator-grafana -n monitoring -oyaml
```
```bash
kubectl get secrets prometheus-operator-grafana -n monitoring -oyaml
```

4. 使用 port forward 从本地连接 Grafana 大盘。

```bash
kubectl port-forward svc/prometheus-operator-grafana -n monitoring 3000:80
```
```bash
kubectl port-forward svc/prometheus-operator-grafana -n monitoring 3000:80
```

您也可通过在浏览器中打开 "http://localhost:3000" 地址,连接 Grafana 大盘。
您也可通过在浏览器中打开 "http://localhost:3000" 地址,连接 Grafana 大盘。

6. (可选)配置 `PodMonitor``ServiceMonitor` 选择器。

Expand Down Expand Up @@ -290,7 +290,7 @@ componentSpecs:
Grafana 大盘的 `APPS / PostgreSQL` 文件夹下有预设的大盘模板。您也可以在 [Grafana 大盘商店](https://grafana.com/grafana/dashboards/)获取更多大盘模板。
::::note
:::note
请确保 `PodMonitor` 文件中的标签(如 endpoint 中的 path 和 port 值)设置正确,与您使用的大盘匹配。
Expand Down
2 changes: 1 addition & 1 deletion i18n/zh-cn/user-docs/user-management/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
position: 7
position: 9
label: 用户管理
collapsible: true
collapsed: true

0 comments on commit dd84e69

Please sign in to comment.