From 55292eebe600ef98e05809edc477f65b001529d6 Mon Sep 17 00:00:00 2001 From: huolibo Date: Tue, 30 Aug 2022 13:23:36 +0800 Subject: [PATCH] docs: add taosKeeper document (#16384) --- docs/en/14-reference/14-taosKeeper.md | 27 +++++++++++++++++--------- docs/zh/14-reference/14-taosKeeper.md | 28 ++++++++++++++++++--------- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/docs/en/14-reference/14-taosKeeper.md b/docs/en/14-reference/14-taosKeeper.md index 476b5a1fd2..665bc75380 100644 --- a/docs/en/14-reference/14-taosKeeper.md +++ b/docs/en/14-reference/14-taosKeeper.md @@ -1,7 +1,7 @@ --- sidebar_label: taosKeeper title: taosKeeper -description: Instructions and tips for using taosKeeper +description: exports TDengine monitoring metrics. --- ## Introduction @@ -22,26 +22,35 @@ You can compile taosKeeper separately and install it. Please refer to the [taosK ### Configuration and running methods - -taosKeeper needs to be executed on the terminal of the operating system. To run taosKeeper, see [configuration file](#configuration-file-parameters-in-detail). +taosKeeper needs to be executed on the terminal of the operating system, it supports three configuration methods: [Command-line arguments](#command-line-arguments-in-detail), [environment variable](#environment-variable-in-detail) and [configuration file](#configuration-file-parameters-in-detail). The precedence of those is Command-line, environment variable and configuration file. **Make sure that the TDengine cluster is running correctly before running taosKeeper. ** Ensure that the monitoring service in TDengine has been started. For more information, see [TDengine Monitoring Configuration](../config/#monitoring). - +### Environment variable + +You can use Environment variable to run taosKeeper and control its behavior: + +```shell +$ export TAOS_KEEPER_TDENGINE_HOST=192.168.64.3 + +$ taoskeeper +``` + +you can run `taoskeeper -h` for more detail. + ### Configuration File You can quickly launch taosKeeper with the following commands. If you do not specify a configuration file, `/etc/taos/keeper.toml` is used by default. If this file does not specify configurations, the default values are used. ```shell -taoskeeper -c +$ taoskeeper -c ``` **Sample configuration files** @@ -110,7 +119,7 @@ Query OK, 1 rows in database (0.036162s) #### Export Monitoring Metrics ```shell -curl http://127.0.0.1:6043/metrics +$ curl http://127.0.0.1:6043/metrics ``` Sample result set (excerpt): diff --git a/docs/zh/14-reference/14-taosKeeper.md b/docs/zh/14-reference/14-taosKeeper.md index f1165c9d0f..ae0a496f03 100644 --- a/docs/zh/14-reference/14-taosKeeper.md +++ b/docs/zh/14-reference/14-taosKeeper.md @@ -1,7 +1,7 @@ --- sidebar_label: taosKeeper title: taosKeeper -description: TDengine taosKeeper 使用说明 +description: TDengine 3.0 版本监控指标的导出工具 --- ## 简介 @@ -22,26 +22,36 @@ taosKeeper 安装方式: ### 配置和运行方式 - -taosKeeper 需要在操作系统终端执行,该工具支持 [配置文件启动](#配置文件启动)。 +taosKeeper 需要在操作系统终端执行,该工具支持三种配置方式:[命令行参数](#命令行参数启动)、[环境变量](#环境变量启动) 和 [配置文件](#配置文件启动)。优先级为:命令行参数、环境变量、配置文件参数。 **在运行 taosKeeper 之前要确保 TDengine 集群与 taosAdapter 已经在正确运行。** 并且 TDengine 已经开启监控服务,具体请参考:[TDengine 监控配置](../config/#监控相关)。 - + +### 环境变量启动 + +通过设置环境变量达到控制启动参数的目的,通常在容器中运行时使用。 + +```shell +$ export TAOS_KEEPER_TDENGINE_HOST=192.168.64.3 + +$ taoskeeper +``` + +具体参数列表请参照 `taoskeeper -h` 输入结果。 + ### 配置文件启动 执行以下命令即可快速体验 taosKeeper。当不指定 taosKeeper 配置文件时,优先使用 `/etc/taos/keeper.toml` 配置,否则将使用默认配置。 ```shell -taoskeeper -c +$ taoskeeper -c ``` **下面是配置文件的示例:** @@ -110,7 +120,7 @@ Query OK, 1 rows in database (0.036162s) #### 导出监控指标 ```shell -curl http://127.0.0.1:6043/metrics +$ curl http://127.0.0.1:6043/metrics ``` 部分结果集: