Skip to content

Commit

Permalink
refactor: monitoring (#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicecui authored Sep 26, 2024
1 parent 139ddd2 commit 12b58b7
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 21 deletions.
6 changes: 3 additions & 3 deletions docs/user-guide/deployments/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,9 @@ default_ratio = 1.0
- `enable_otlp_tracing`: whether to turn on tracing, not turned on by default.
- `otlp_endpoint`: Export the target endpoint of tracing using gRPC-based OTLP protocol, the default value is `localhost:4317`.
- `append_stdout`: Whether to append logs to stdout. Defaults to `true`.
- `tracing_sample_ratio`: This field can configure the sampling rate of tracing. How to use `tracing_sample_ratio`, please refer to [How to configure tracing sampling rate](/user-guide/operations/tracing.md#guide-how-to-configure-tracing-sampling-rate).
- `tracing_sample_ratio`: This field can configure the sampling rate of tracing. How to use `tracing_sample_ratio`, please refer to [How to configure tracing sampling rate](/user-guide/operations/monitoring/tracing.md#guide-how-to-configure-tracing-sampling-rate).

How to use distributed tracing, please reference [Tracing](/user-guide/operations/tracing.md#tutorial-use-jaeger-to-trace-greptimedb)
How to use distributed tracing, please reference [Tracing](/user-guide/operations/monitoring/tracing.md#tutorial-use-jaeger-to-trace-greptimedb)

### Region engine options

Expand Down Expand Up @@ -482,7 +482,7 @@ The `meta_client` configures the Metasrv client, including:
### Monitor metrics options

These options are used to save system metrics to GreptimeDB itself.
For instructions on how to use this feature, please refer to the [Monitoring](/user-guide/operations/monitoring.md) guide.
For instructions on how to use this feature, please refer to the [Monitoring](/user-guide/operations/monitoring/export-metrics.md) guide.

```toml
[export_metrics]
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/operations/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This document addresses strategies and practices used in the operation of Grepti

* [Installation](/getting-started/installation/overview.md) for GreptimeDB and the [g-t-control](/reference/gtctl.md) command line tool.
* Database Configuration, please read the [Configuration](/user-guide/deployments/configuration.md) reference.
* [Monitoring](/user-guide/operations/monitoring.md) and [Tracing](/user-guide/operations/tracing.md) for GreptimeDB.
* [Monitoring metrics](/user-guide/operations/monitoring/export-metrics.md) and [Tracing](/user-guide/operations/monitoring/tracing.md) for GreptimeDB.
* GreptimeDB [Disaster Recovery](/user-guide/operations/disaster-recovery/overview.md).

### Runtime information
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/operations/capacity-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ there are several key considerations:
- Data retention policy
- Hardware costs

To monitor the various metrics of GreptimeDB, please refer to [Monitoring](/user-guide/operations/monitoring.md).
To monitor the various metrics of GreptimeDB, please refer to [Monitoring](/user-guide/operations/monitoring/export-metrics.md).

## CPU

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Monitoring
# Export Metrics

Monitoring is a crucial part of database administration. By monitoring metrics, you can assess the state of the database, maintain the deployment without crisis, and diagnose problems when they occur.
By monitoring metrics, you can assess the state of the database, maintain the deployment without crisis, and diagnose problems when they occur.

For detailed metrics of GreptimeDB, please refer to the [Metrics Detail](#metrics-detail) section.

Expand Down
8 changes: 8 additions & 0 deletions docs/user-guide/operations/monitoring/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Overview

Effective database administration relies heavily on monitoring.
You can monitor GreptimeDB using the following methods:

- [Export Metrics](export-metrics.md)
- [Tracing](tracing.md)

File renamed without changes.
3 changes: 1 addition & 2 deletions docs/user-guide/operations/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* [Administration](./admin.md)
* [Capacity Plan](./capacity-plan.md)
* [Disaster Recovery](./disaster-recovery/overview.md)
* [Monitoring](./monitoring.md)
* [Tracing](./tracing.md)
* [Monitoring](./monitoring/overview.md)
* [Remote WAL](./remote-wal/quick-start.md)
* [Region Migration](./region-migration.md)
4 changes: 4 additions & 0 deletions i18n/zh/docusaurus-plugin-content-docs/current.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,9 @@
"sidebar.docs.category.Protocols": {
"message": "协议",
"description": "The label for category Manage Data in sidebar docs"
},
"sidebar.docs.category.Monitoring": {
"message": "监控",
"description": "The label for category Monitoring in sidebar docs"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,9 @@ default_ratio = 1.0
- `enable_otlp_tracing`:是否打开分布式追踪,默认不开启。
- `otlp_endpoint`:使用基于 gRPC 的 OTLP 协议导出 tracing 的目标端点,默认值为 `localhost:4317`
- `append_stdout`:是否将日志打印到 stdout。默认是`true`
- `tracing_sample_ratio`:该字段可以配置 tracing 的采样率,如何使用 `tracing_sample_ratio`,请参考 [如何配置 tracing 采样率](/user-guide/operations/tracing.md#指南如何配置-tracing-采样率)
- `tracing_sample_ratio`:该字段可以配置 tracing 的采样率,如何使用 `tracing_sample_ratio`,请参考 [如何配置 tracing 采样率](/user-guide/operations/monitoring/tracing.md#指南如何配置-tracing-采样率)

如何使用分布式追踪,请参考 [Tracing](/user-guide/operations/tracing.md#教程使用-jaeger-追踪-greptimedb-调用链路)
如何使用分布式追踪,请参考 [Tracing](/user-guide/operations/monitoring/tracing.md#教程使用-jaeger-追踪-greptimedb-调用链路)

### Region 引擎选项

Expand Down Expand Up @@ -471,7 +471,7 @@ tcp_nodelay = true
### 指标监控选项

这些选项用于将系统监控指标保存到 GreptimeDB 本身。
有关如何使用此功能的说明,请参见 [监控](/user-guide/operations/monitoring.md) 指南。
有关如何使用此功能的说明,请参见 [监控](/user-guide/operations/monitoring/export-metrics.md) 指南。

```toml
[export_metrics]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

* GreptimeDB 的 [安装](/getting-started/installation/overview.md)[g-t-control](/reference/gtctl.md) 命令行工具。
* 数据库配置,请阅读 [配置](/user-guide/deployments/configuration.md) 参考。
* GreptimeDB 的 [监控](/user-guide/operations/monitoring.md)[链路追踪](/user-guide/operations/tracing.md)
* GreptimeDB 的 [指标监控](/user-guide/operations/monitoring/export-metrics.md)[链路追踪](/user-guide/operations/monitoring/tracing.md)
* GreptimeDB 的 [灾难恢复方案](/user-guide/operations/disaster-recovery/overview.md)

### 运行时信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GreptimeDB 具备超轻量级的启动基准,
- 数据保留策略
- 硬件成本

要监控 GreptimeDB 的各种指标,请参阅[监控](/user-guide/operations/monitoring.md)
要监控 GreptimeDB 的各种指标,请参阅[监控](/user-guide/operations/monitoring/export-metrics.md)

## CPU

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 监控
# 导出指标

监控是数据库管理的重要组成部分。通过监控指标,你可以评估数据库的状态,维护部署并诊断问题。
通过监控指标,你可以评估数据库的状态,维护部署并诊断问题。

请参考[指标详情](#指标详情)章节了解 GreptimeDB 的具体指标。

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 概述

数据库的有效管理在很大程度上依赖于监控。
你可以使用以下方法监控 GreptimeDB:

- [导出指标](export-metrics.md)
- [链路追踪](tracing.md)

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tracing
# 链路追踪

GreptimeDB 支持分布式链路追踪。 GreptimeDB 使用基于 gRPC 的 OTLP 协议导出所有采集到的 Span。您可以使用 [Jaeger](https://www.jaegertracing.io/)[Tempo](https://grafana.com/oss/tempo/) 等支持基于 gRPC 的 OTLP 协议后端接收 GreptimeDB 采集到的 Span。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* [管理](./admin.md)
* [容量规划](./capacity-plan.md)
* [灾难恢复](./disaster-recovery/overview.md)
* [监控](./monitoring.md)
* [Tracing](./tracing.md)
* [监控](./monitoring/overview.md)
* [Remote WAL](./remote-wal/quick-start.md)
* [Region 迁移](./region-migration.md)
11 changes: 9 additions & 2 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,15 @@ const sidebars: SidebarsConfig = {
'user-guide/operations/region-migration',
'user-guide/operations/region-failover',
'user-guide/operations/compaction',
'user-guide/operations/monitoring',
'user-guide/operations/tracing',
{
type: 'category',
label: 'Monitoring',
items: [
'user-guide/operations/monitoring/overview',
'user-guide/operations/monitoring/export-metrics',
'user-guide/operations/monitoring/tracing',
],
},
'user-guide/operations/performance-tuning-tips',
],
},
Expand Down

0 comments on commit 12b58b7

Please sign in to comment.