Skip to content

Commit 0bffc83

Browse files
Copilotfengjiachun
andauthored
docs: remove export_metrics configuration (removed in greptimedb#7236) (#2230)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: fengjiachun <[email protected]>
1 parent d5b6cd2 commit 0bffc83

File tree

4 files changed

+2
-196
lines changed

4 files changed

+2
-196
lines changed

docs/user-guide/deployments-administration/configuration.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -508,59 +508,6 @@ The `meta_client` configures the Metasrv client, including:
508508
- `ddl_timeout`, DDL execution timeout, `10s` by default.
509509
- `tcp_nodelay`, `TCP_NODELAY` option for accepted connections, true by default.
510510

511-
### Monitor metrics options
512-
513-
These options are used to save system metrics to GreptimeDB itself.
514-
For instructions on how to use this feature, please refer to the [Monitoring](/user-guide/deployments-administration/monitoring/overview.md) guide.
515-
516-
```toml
517-
[export_metrics]
518-
# Whether to enable export_metrics
519-
enable=true
520-
# Export time interval
521-
write_interval = "30s"
522-
```
523-
524-
- `enable`: Whether to enable export_metrics, `false` by default.
525-
- `write_interval`: Export time interval.
526-
527-
#### `self_import` method
528-
529-
If you are using `standalone`, you can use the `self_import` method to export metrics to GreptimeDB itself.
530-
531-
```toml
532-
[export_metrics]
533-
# Whether to enable export_metrics
534-
enable=true
535-
# Export time interval
536-
write_interval = "30s"
537-
[export_metrics.self_import]
538-
db = "information_schema"
539-
```
540-
541-
- `db`: The default database used by `self_import` is `information_schema`. You can also create another database for saving system metrics.
542-
543-
#### `remote_write` method
544-
545-
The `remote_write` method is supported by `datanode`, `frontend`, `metasrv`, and `standalone`.
546-
It sends metrics to a receiver compatible with the [Prometheus Remote-Write protocol](https://prometheus.io/docs/concepts/remote_write_spec/).
547-
548-
```toml
549-
[export_metrics]
550-
# Whether to enable export_metrics
551-
enable=true
552-
# Export time interval
553-
write_interval = "30s"
554-
[export_metrics.remote_write]
555-
# URL specified by Prometheus Remote-Write protocol
556-
url = "http://127.0.0.1:4000/v1/prometheus/write?db=information_schema"
557-
# Some optional HTTP parameters, such as authentication information
558-
headers = { Authorization = "Basic Z3JlcHRpbWVfdXNlcjpncmVwdGltZV9wd2Q=" }
559-
```
560-
561-
- `url`: URL specified by Prometheus Remote-Write protocol.
562-
- `headers`: Some optional HTTP parameters, such as authentication information.
563-
564511
### Heartbeat configuration
565512
Heartbeat configuration is available in `frontend` and `datanode`.
566513
```toml

docs/user-guide/deployments-administration/monitoring/standalone-monitoring.md

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,7 @@ description: Guide to monitor GreptimeDB standalone instance using Prometheus me
77

88
GreptimeDB standalone provides a `/metrics` endpoint on the HTTP port (default `4000`) that exposes [Prometheus metrics](/reference/http-endpoints.md#metrics).
99

10-
## Monitoring configuration
11-
12-
You can configure GreptimeDB to export metrics to GreptimeDB itself or to an external Prometheus instance.
13-
14-
### Internal Metrics Storage
15-
16-
Configuring GreptimeDB to store its own metrics internally is convenient and recommended for self-monitoring,
17-
it also enables SQL-based querying and analysis.
18-
19-
To enable self-monitoring, configure the `export_metrics` section in your TOML configuration file:
20-
21-
```toml
22-
[export_metrics]
23-
enable = true
24-
# Metrics collection interval
25-
write_interval = "30s"
26-
[export_metrics.self_import]
27-
db = "greptime_metrics"
28-
```
29-
30-
This configuration:
31-
- Collects and writes metrics every 30 seconds.
32-
- Exports metrics to the `greptime_metrics` database within GreptimeDB. Ensure the `greptime_metrics` database [is created](/reference/sql/create.md#create-database) before exporting metrics.
33-
34-
### Export metrics to Prometheus
35-
36-
For environments with existing Prometheus infrastructure,
37-
GreptimeDB can export metrics via the Prometheus remote write protocol.
38-
39-
To do this, configure the `export_metrics` section in your TOML configuration file with the `remote_write` option:
40-
41-
```toml
42-
[export_metrics]
43-
enable=true
44-
write_interval = "30s"
45-
[export_metrics.remote_write]
46-
# URL specified by Prometheus Remote-Write protocol
47-
url = "https://your/remote_write/endpoint"
48-
# Some optional HTTP parameters, such as authentication information
49-
headers = { Authorization = {{Authorization}} }
50-
```
51-
52-
This configuration:
53-
- Sets the export interval to 30 seconds
54-
- Specifies the Prometheus remote write URL, which should point to your Prometheus instance
55-
- Optionally includes HTTP headers for the remote write URL, such as authentication information
10+
You can use Prometheus to scrape these metrics and Grafana to visualize them.
5611

5712
## Grafana Dashboard Integration
5813

i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/configuration.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -500,59 +500,6 @@ tcp_nodelay = true
500500
- `ddl_timeout`,DDL 执行的超时时间,默认 10 秒。
501501
- `tcp_nodelay`,接受连接时的 `TCP_NODELAY` 选项,默认为 true。
502502

503-
### 指标监控选项
504-
505-
这些选项用于将系统监控指标保存到 GreptimeDB 本身。
506-
有关如何使用此功能的说明,请参见 [监控](/user-guide/deployments-administration/monitoring/overview.md) 指南。
507-
508-
```toml
509-
[export_metrics]
510-
# Whether to enable export_metrics
511-
enable=true
512-
# Export time interval
513-
write_interval = "30s"
514-
```
515-
516-
- `enable`: 是否启用导出指标功能,默认为 `false`
517-
- `write_interval`: 指标导出时间间隔。
518-
519-
#### `self_import` 方法
520-
521-
如果你使用的是 GreptimeDB 单机版,可以使用 `self_import` 方法将指标导入到自身的数据库中。
522-
523-
```toml
524-
[export_metrics]
525-
# Whether to enable export_metrics
526-
enable=true
527-
# Export time interval
528-
write_interval = "30s"
529-
[export_metrics.self_import]
530-
db = "information_schema"
531-
```
532-
533-
- `db`: 默认的数据库为 `information_schema`,你也可以创建另一个数据库来保存系统指标。
534-
535-
#### `remote_write` 方法
536-
537-
`datanode``frontend``metasrv``standalone` 支持使用 `remote_write` 方法导出指标。
538-
它将指标发送到与 [Prometheus Remote-Write protocol](https://prometheus.io/docs/concepts/remote_write_spec/) 兼容的接受端。
539-
540-
```toml
541-
[export_metrics]
542-
# Whether to enable export_metrics
543-
enable=true
544-
# Export time interval
545-
write_interval = "30s"
546-
[export_metrics.remote_write]
547-
# URL specified by Prometheus Remote-Write protocol
548-
url = "http://127.0.0.1:4000/v1/prometheus/write?db=information_schema"
549-
# Some optional HTTP parameters, such as authentication information
550-
headers = { Authorization = "Basic Z3JlcHRpbWVfdXNlcjpncmVwdGltZV9wd2Q=" }
551-
```
552-
553-
- `url`: Prometheus Remote-Write 协议指定的 URL。
554-
- `headers`: 一些可选的 HTTP 参数,比如认证信息。
555-
556503
### 心跳配置
557504
心跳配置在 `frontend``datanode` 中可用。
558505
```toml

i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/monitoring/standalone-monitoring.md

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,7 @@ description: 使用 Prometheus 指标和 Grafana 监控 GreptimeDB 单机实例
77

88
GreptimeDB 单机版在 HTTP 端口(默认 `4000`)上提供 `/metrics` 端点,暴露 [Prometheus 指标](/reference/http-endpoints.md#指标)
99

10-
## 监控配置
11-
12-
你可以配置 GreptimeDB 将指标导出到 GreptimeDB 自身或外部的 Prometheus 实例。
13-
14-
### 将指标存储到 GreptimeDB 自身
15-
16-
将指标存储到 GreptimeDB 自身既方便又推荐用于自监控,且支持基于 SQL 的查询和分析。
17-
18-
要启用自监控,请在你的 TOML 配置文件中配置 `export_metrics` 部分:
19-
20-
```toml
21-
[export_metrics]
22-
enable = true
23-
# 指标收集间隔
24-
write_interval = "30s"
25-
[export_metrics.self_import]
26-
db = "greptime_metrics"
27-
```
28-
29-
此配置:
30-
- 每 30 秒收集和写入指标。
31-
- 将指标导出到 GreptimeDB 内的 `greptime_metrics` 数据库。请确保在导出指标之前 `greptime_metrics` 数据库[已被创建](/reference/sql/create.md#create-database)
32-
33-
### 导出指标到 Prometheus
34-
35-
对于已有 Prometheus 基础设施的环境,GreptimeDB 可以通过 Prometheus 远程写入协议导出指标。
36-
37-
具体方法为,在 TOML 配置文件中使用 `remote_write` 选项配置 `export_metrics` 部分:
38-
39-
```toml
40-
[export_metrics]
41-
enable=true
42-
write_interval = "30s"
43-
[export_metrics.remote_write]
44-
# Prometheus Remote-Write 协议指定的 URL
45-
url = "https://your/remote_write/endpoint"
46-
# 一些可选的 HTTP 参数,如身份验证信息
47-
headers = { Authorization = {{Authorization}} }
48-
```
49-
50-
此配置:
51-
- 将导出间隔设置为 30 秒
52-
- 指定 Prometheus 远程写入 URL,应指向你的 Prometheus 实例
53-
- 可选择包含远程写入 URL 的 HTTP 头,如身份验证信息
10+
你可以使用 Prometheus 抓取这些指标,并使用 Grafana 进行可视化展示。
5411

5512
## Grafana 仪表板集成
5613

0 commit comments

Comments
 (0)