From 134312deccdb2dc9540d2020fbdfe8a750d21356 Mon Sep 17 00:00:00 2001 From: YuyueBalabala <3116233097@qq.com> Date: Mon, 30 Oct 2023 14:41:08 +0800 Subject: [PATCH 1/2] doc: NeuronEX command line and configuration file description. --- neuronex/en_US/management/conf-management.md | 105 +++++++++++++++-- neuronex/zh_CN/management/conf-management.md | 112 +++++++++++++++++-- 2 files changed, 200 insertions(+), 17 deletions(-) diff --git a/neuronex/en_US/management/conf-management.md b/neuronex/en_US/management/conf-management.md index de1ce2b..65d549b 100644 --- a/neuronex/en_US/management/conf-management.md +++ b/neuronex/en_US/management/conf-management.md @@ -4,12 +4,51 @@ NeuronEX supports modifying Neuron's configuration parameters through `command l ## Command Line +### `run` command + +The `run` command is used to run NeuronEX on the console.This command starts NeuronEX as a process and displays its output in the terminal. + ```shell -c, --config string config file path (default "etc/neuronex.yaml") -e, --disable_auth select whether to enable authentication -h, --help help for run -m, --manage manage the lifecycle of eKuiper and Neuron (default true) ``` +Eg: + +```shell +./bin/neuronex run -c etc/neuronex.yaml -m false -e false +``` + +This command starts NeuronEX as a process and displays its output in the terminal. The NeuronEX will not manage the lifecycle of Neuron and Ekuiper and will not turn on privilege authentication. + +### `start` command + +The `start` command is used to start NeuronEX in daemon mode.This command starts NeuronEX as a daemon and runs it in the background. + +``` +-c, --config string config file path (default "etc/neuronex.yaml") +-e, --disable_auth select whether to enable authentication +-h, --help help for run +-m, --manage manage the lifecycle of eKuiper and Neuron (default true) +``` + +Eg: + +```sh +./bin/neuronex start -c etc/neuronex.yaml -m false -e false +``` + +This command starts NeuronEX as a daemon and runs it in the background. The NeuronEX will not manage the lifecycle of Neuron and Ekuiper and will not turn on privilege authentication. + +### `stop` command + +The `stop` command is used to stop running NeuronEX. This command will kill the NeuronEX process. + +```sh +./bin/neuronex stop +``` + ## Environment Variables NeuronEX supports reading environment variables during the startup process to configure startup parameters. The currently supported environment variables are as follows: @@ -22,43 +61,95 @@ NeuronEX supports reading environment variables during the startup process to co | NEURON_PLUGIN_DIR | Neuron plug-in file directory | ## Configuration File -NeuronEX provides a YAML format file to configure personalized parameters related to NeuronEX. The default configuration is as follows: +NeuronEX provides a YAML format file to configure personalized parameters related to NeuronEX. + +### server + +The `server` section defines the port number of the NeuronEX server. + +- `port`: port number of the NeuronEX server, default value is 8085. + +### neuron + +The `neuron` section defines the version number and reverse proxy configuration for Neuron. + +- `version`: the version number of Neuron. +- `reverseProxies`: list of reverse proxy configurations for Neuron. Each reverse proxy configuration consists of two key-value pairs, `location` and `proxyPath`. + - `location`: Neuron's path. + - `proxyPath`: path to Neuron's backend server. + +### ekuiper + +The `ekuiper` section defines the version number and reverse proxy configuration of Ekuiper. + +- `version`: the version number of Ekuiper. +- `reverseProxies`: list of reverse proxy configurations for Ekuiper. Each reverse proxy configuration is the same as the `neuron.reverseProxies` configuration. + - `location`: Ekuiper's path. + - `proxyPath`: path to Ekuiper's backend server. + +### log + +The `log` section defines the logging configuration of the NeuronEX server. + +- `mode`: log output mode, options are `console` (output to console) and `file` (output to file). +- `level`: log level, options are `debug`, `info`, `warn`, `error` and `fatal`. +- `file`: path to the log file. +- `maxSize`: maximum size in megabytes of the log file before it gets rotated. +- `maxAge`: the maximum number of days to retain old log files based on the timestamp encoded in their filename. +- `maxBackups`: the maximum number of old log files to retain. +- `listenAddr`: log listener address for remote log collection. +- `syslogForward`: log remote forwarding configuration. + - `enable`: whether to enable log remote forwarding. + - `priority`:options are emerg,alert,crit,err,warning,notice,info,debug now. + - `network`: now only support udp4 + - `remoteAddr`: log remote forwarding address. + - `tag`: log remote forwarding tag. + +### official + +The `official` section defines ecosy license official server address information. + +- `url`: ecosy license official server address. + + The default configuration is as follows: ```yaml server: - # Neuronex listening port port: 8085 -# Compatible neuron version neuron: version: 2.6.0 reverseProxies: - location: /api/neuron proxyPath: http://127.0.0.1:7000/api/v2 -# Compatible ekuiper version ekuiper: version: 1.10.2 reverseProxies: - location: /api/ekuiper proxyPath: http://127.0.0.1:9081 -# Log configuration, including log storage mode, log level, maximum value, storage count and syslog-related settings, etc. log: mode: file level: info file: log/neuronex.log + # maximum size in megabytes of the log file before it gets rotated maxSize: 50000 + #MaxAge is the maximum number of days to retain old log files based on the timestamp encoded in their filename maxAge: 3 + # MaxBackups is the maximum number of old log files to retain maxBackups: 3 listenAddr: "localhost:10514" syslogForward: enable: false + # emerg/alert/crit/err/warning/notice/info/debug priority: "info" + # now only support udp4 network: "udp4" remoteAddr: "" - tag: "neuron_ex_all" + # syslog protocol tag field, used for syslog server to identify which neuronex client send the syslog message + tag: "neuronex" official: url: https://license-test.mqttce.com -``` +``` \ No newline at end of file diff --git a/neuronex/zh_CN/management/conf-management.md b/neuronex/zh_CN/management/conf-management.md index 9f5bd66..0720ce7 100644 --- a/neuronex/zh_CN/management/conf-management.md +++ b/neuronex/zh_CN/management/conf-management.md @@ -5,12 +5,51 @@ NeuronEX 支持通过`命令行`、`环境变量`、`配置文件`的方式, ## 命令行 +### `run` 命令 + +`run ` 命令用于在控制台上运行 NeuronEX。该命令将 NeuronEX 作为一个进程启动,并在终端中显示其输出。 + ```shell --c, --config string config file path (default "etc/neuronex.yaml") --e, --disable_auth select whether to enable authentication --h, --help help for run --m, --manage manage the lifecycle of eKuiper and Neuron (default true) +-c, --config 配置文件路径(默认为 "etc/neuronex.yaml") +-e, --disable_auth 选择是否启用身份验证 +-h, --help 运行帮助 +-m, --manage 管理 eKuiper 和 Neuron 的生命周期(默认为 true) +``` + +例如: +```sh +./bin/neuronex run -c etc/neuronex.yaml -m false -e false +``` + +该命令将 NeuronEX 作为进程启动,并在终端中显示其输出。NeuronEX 不会管理 Neuron 和 Ekuiper 的生命周期,也不会开启权限验证。 + +### `start` 命令 + +`start ` 命令用于在守护进程模式下启动 NeuronEX,该命令将 NeuronEX 作为守护进程启动并在后台运行。 + +```sh +-c, --config字符串配置文件路径(默认为 "etc/neuronex.yaml") +-e, --disable_auth 选择是否启用身份验证 +-h, --help 运行帮助 +-m, --manage 管理 eKuiper 和 Neuron 的生命周期(默认为 true) +``` + +例如 + +```sh +./bin/neuronex start -c etc/neuronex.yaml -m false -e false +``` + +该命令将 NeuronEX 作为守护进程启动,并在后台运行。NeuronEX 不会管理 Neuron 和 Ekuiper 的生命周期,也不会开启权限验证。 + +### `stop` 命令 + +`stop` 命令用于停止运行 NeuronEX。该命令将杀死 NeuronEX 进程。 + +```sh +./bin/neuronex stop ``` + ## 环境变量 NeuronEX 支持在启动过程中读取环境变量来配置启动参数,目前支持的环境变量如下: @@ -23,42 +62,95 @@ NeuronEX 支持在启动过程中读取环境变量来配置启动参数,目 | NEURON_PLUGIN_DIR | Neuron 插件文件目录 | ## 配置文件 -NeuronEX 提供 yaml 格式文件配置 NeuronEX 相关个性化参数。默认配置内容如下: +NeuronEX 提供 YAML 格式文件,用于配置与 NeuronEX 相关的个性化参数。 + +### server + +` server` 部分定义了 NeuronEX 服务器的端口号。 + +- ` port`:NeuronEX 服务器的端口号,默认值为 8085。 + +### neuron + +` neuron ` 部分定义 Neuron 的版本号和反向代理配置。 + +- ` version`:Neuron 的版本号。 +- ` reverseProxies`:Neuron 的反向代理配置列表。 + - ` location`: Neuron 的路径: Neuron 的路径。 + - ` proxyPath` :Neuron 后端服务器的路径。 + +### ekuiper + +` ekuiper ` 部分定义了 Ekuiper 的版本号和反向代理配置。 + +- ` version`:Ekuiper 的版本号。 +- ` reverseProxies` :Ekuiper 的反向代理配置列表。 + - ` location`:Ekuiper 的路径: Ekuiper 的路径。 + - ` proxyPath` :Ekuiper 后端服务器的路径。 + +### log + +日志 "部分定义了 NeuronEX 服务器的日志配置。 + +- ` mode` :日志输出模式,选项为 console(输出到控制台)和 file(输出到文件)。 +- ` level`:日志级别,选项包括 debug,info,warn,error ,fatal。 +- ` file`:日志文件路径。 +- `maxSize`:日志文件轮换前的最大容量(以 MB 为单位)。 +- `maxAge`: 保留旧日志文件的最长天数。 +- `maxAge`: 根据文件名中编码的时间戳保留旧日志文件的最长天数。 +- `maxBackups`: 保留的旧日志文件的最大数量。 +- `listenAddr`:用于远程日志收集的日志监听器地址。 +- `syslogForward`:日志远程转发配置。 + - `enable`:是否启用日志远程转发。 + - `priority`:选项包括 emerg,alert,crit,err,warning,notice,info,debug。 + - `network`:现在只支持 udp4 + - `remoteAddr`: 记录远程转发地址。 + - `tag`:记录远程转发标签。 + +### official + +`offcial` 部分定义生态license 官网服务器信息。 + +- `url`:生态license 官网服务器地址。 + + 默认配置如下 ```yaml server: - # Neuronex listening port port: 8085 -# Compatible neuron version neuron: version: 2.6.0 reverseProxies: - location: /api/neuron proxyPath: http://127.0.0.1:7000/api/v2 -# Compatible ekuiper version ekuiper: version: 1.10.2 reverseProxies: - location: /api/ekuiper proxyPath: http://127.0.0.1:9081 -# Log configuration, including log storage mode, log level, maximum value, storage count and syslog-related settings, etc. log: mode: file level: info file: log/neuronex.log + # maximum size in megabytes of the log file before it gets rotated maxSize: 50000 + #MaxAge is the maximum number of days to retain old log files based on the timestamp encoded in their filename maxAge: 3 + # MaxBackups is the maximum number of old log files to retain maxBackups: 3 listenAddr: "localhost:10514" syslogForward: enable: false + # emerg/alert/crit/err/warning/notice/info/debug priority: "info" + # now only support udp4 network: "udp4" remoteAddr: "" - tag: "neuron_ex_all" + # syslog protocol tag field, used for syslog server to identify which neuronex client send the syslog message + tag: "neuronex" official: url: https://license-test.mqttce.com From 485513db19284b028b5789667e726b76a1242bbf Mon Sep 17 00:00:00 2001 From: YuyueBalabala <3116233097@qq.com> Date: Mon, 30 Oct 2023 15:24:55 +0800 Subject: [PATCH 2/2] doc: NeuronEX command line and configuration file description. --- neuronex/en_US/management/conf-management.md | 3 --- neuronex/zh_CN/management/conf-management.md | 3 --- 2 files changed, 6 deletions(-) diff --git a/neuronex/en_US/management/conf-management.md b/neuronex/en_US/management/conf-management.md index 65d549b..fad8651 100644 --- a/neuronex/en_US/management/conf-management.md +++ b/neuronex/en_US/management/conf-management.md @@ -95,7 +95,6 @@ The `log` section defines the logging configuration of the NeuronEX server. - `level`: log level, options are `debug`, `info`, `warn`, `error` and `fatal`. - `file`: path to the log file. - `maxSize`: maximum size in megabytes of the log file before it gets rotated. -- `maxAge`: the maximum number of days to retain old log files based on the timestamp encoded in their filename. - `maxBackups`: the maximum number of old log files to retain. - `listenAddr`: log listener address for remote log collection. - `syslogForward`: log remote forwarding configuration. @@ -135,8 +134,6 @@ log: file: log/neuronex.log # maximum size in megabytes of the log file before it gets rotated maxSize: 50000 - #MaxAge is the maximum number of days to retain old log files based on the timestamp encoded in their filename - maxAge: 3 # MaxBackups is the maximum number of old log files to retain maxBackups: 3 listenAddr: "localhost:10514" diff --git a/neuronex/zh_CN/management/conf-management.md b/neuronex/zh_CN/management/conf-management.md index 0720ce7..a1625f4 100644 --- a/neuronex/zh_CN/management/conf-management.md +++ b/neuronex/zh_CN/management/conf-management.md @@ -96,7 +96,6 @@ NeuronEX 提供 YAML 格式文件,用于配置与 NeuronEX 相关的个性化 - ` level`:日志级别,选项包括 debug,info,warn,error ,fatal。 - ` file`:日志文件路径。 - `maxSize`:日志文件轮换前的最大容量(以 MB 为单位)。 -- `maxAge`: 保留旧日志文件的最长天数。 - `maxAge`: 根据文件名中编码的时间戳保留旧日志文件的最长天数。 - `maxBackups`: 保留的旧日志文件的最大数量。 - `listenAddr`:用于远程日志收集的日志监听器地址。 @@ -137,8 +136,6 @@ log: file: log/neuronex.log # maximum size in megabytes of the log file before it gets rotated maxSize: 50000 - #MaxAge is the maximum number of days to retain old log files based on the timestamp encoded in their filename - maxAge: 3 # MaxBackups is the maximum number of old log files to retain maxBackups: 3 listenAddr: "localhost:10514"