From 579be316c7b23f4a96cfb0ebf414463228d7fd35 Mon Sep 17 00:00:00 2001 From: EMQ-YangM Date: Wed, 20 Apr 2022 14:19:20 +0800 Subject: [PATCH] feat: add emqx_conf_schema.conf --- apps/emqx_conf/i18n/emqx_conf_schema.conf | 1216 +++++++++++++++++++++ 1 file changed, 1216 insertions(+) create mode 100644 apps/emqx_conf/i18n/emqx_conf_schema.conf diff --git a/apps/emqx_conf/i18n/emqx_conf_schema.conf b/apps/emqx_conf/i18n/emqx_conf_schema.conf new file mode 100644 index 000000000..8a3f1023d --- /dev/null +++ b/apps/emqx_conf/i18n/emqx_conf_schema.conf @@ -0,0 +1,1216 @@ +emqx_conf_schema { + + cluster_name { + desc { + en: """Human-friendly name of the EMQX cluster.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_discovery_strategy { + desc { + en: """Service discovery method for the cluster nodes.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_autoclean { + desc { + en: """Remove disconnected nodes from the cluster after this interval.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_autoheal { + desc { + en: """If true, the node will try to heal network partitions + automatically.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_proto_dist { + desc { + en: """The Erlang distribution protocol for the cluster.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_static_seeds { + desc { + en: """List EMQX node names in the static cluster. See node.name.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_mcast_addr { + desc { + en: """Multicast IPv4 address.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_mcast_ports { + desc { + en: """List of UDP ports used for service discovery.
+Note: probe messages are broadcast to all the specified ports.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_mcast_iface { + desc { + en: """Local IP address the node discovery service needs to bind to.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_mcast_ttl { + desc { + en: """Time-to-live (TTL) for the outgoing UDP datagrams.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_mcast_loop { + desc { + en: """If true, loop UDP datagrams back to the local socket.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_mcast_sndbuf { + desc { + en: """Size of the kernel-level buffer for outgoing datagrams.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_mcast_recbuf { + desc { + en: """Size of the kernel-level buffer for incoming datagrams.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_mcast_buffer { + desc { + en: """Size of the user-level buffer.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_dns_name { + desc { + en: """The domain name of the EMQX cluster.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_dns_app { + desc { + en: """The symbolic name of the EMQX service.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_etcd_server { + desc { + en: """List of endpoint URLs of the etcd cluster""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_etcd_prefix { + desc { + en: """Key prefix used for EMQX service discovery.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_etcd_node_ttl { + desc { + en: """Expiration time of the etcd key associated with the node. +It is refreshed automatically, as long as the node is alive.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_etcd_ssl { + desc { + en: """Options for the TLS connection to the etcd cluster.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_k8s_apiserver { + desc { + en: """Kubernetes API endpoint URL.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_k8s_service_name { + desc { + en: """EMQX broker service name.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_k8s_address_type { + desc { + en: """Address type used for connecting to the discovered nodes.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_k8s_app_name { + desc { + en: """This parameter should be set to the part of the node.name +before the '@'.
+For example, if the node.name is emqx@127.0.0.1, then this parameter +should be set to emqx.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_k8s_namespace { + desc { + en: """Kubernetes namespace.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_k8s_suffix { + desc { + en: """Node name suffix.
+Note: this parameter is only relevant when address_type is dns +or hostname.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_name { + desc { + en: """Unique name of the EMQX node. It must follow %name%@FQDN or + %name%@IPv4 format.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_cookie { + desc { + en: """Secret cookie is a random string that should be the same on all nodes in + the given EMQX cluster, but unique per EMQX cluster. It is used to prevent EMQX nodes that + belong to different clusters from accidentally connecting to each other.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_data_dir { + desc { + en: """ +Path to the persistent data directory. +Possible auto-created subdirectories are: + - `mnesia/`: EMQX's built-in database directory. + For example, `mnesia/emqx@127.0.0.1`. + There should be only one such subdirectory. + Meaning, in case the node is to be renamed (to e.g. `emqx@10.0.1.1`), + the old dir should be deleted first. + - `configs`: Generated configs at boot time, and cluster/local override configs. + - `patches`: Hot-patch beam files are to be placed here. + - `trace`: Trace log files. + +**NOTE**: One data dir cannot be shared by two or more EMQX nodes. +""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_config_files { + desc { + en: """List of configuration files that are read during startup. The order is + significant: later configuration files override the previous ones.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_global_gc_interval { + desc { + en: """Periodic garbage collection interval.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_crash_dump_file { + desc { + en: """Location of the crash dump file""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_crash_dump_seconds { + desc { + en: """The number of seconds that the broker is allowed to spend writing +a crash dump""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_crash_dump_bytes { + desc { + en: """The maximum size of a crash dump file in bytes.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_dist_net_ticktime { + desc { + en: """This is the approximate time an EMQX node may be unresponsive until it is considered down and thereby disconnected.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_backtrace_depth { + desc { + en: """Maximum depth of the call stack printed in error messages and + process_info.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_applications { + desc { + en: """List of Erlang applications that shall be rebooted when the EMQX broker joins + the cluster.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + node_etc_dir { + desc { + en: """etc dir for the node""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + db_backend { + desc { + en: """ +Select the backend for the embedded database.
+rlog is the default backend, +that is suitable for very large clusters.
+mnesia is a backend that offers decent performance in small clusters. +""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + db_role { + desc { + en: """ +Select a node role.
+core nodes provide durability of the data, and take care of writes. +It is recommended to place core nodes in different racks or different availability zones.
+replicant nodes are ephemeral worker nodes. Removing them from the cluster +doesn't affect database redundancy
+It is recommended to have more replicant nodes than core nodes.
+Note: this parameter only takes effect when the backend is set +to rlog. +""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + db_core_nodes { + desc { + en: """ +List of core nodes that the replicant will connect to.
+Note: this parameter only takes effect when the backend is set +to rlog and the role is set to replicant.
+This value needs to be defined for manual or static cluster discovery mechanisms.
+If an automatic cluster discovery mechanism is being used (such as etcd), +there is no need to set this value. +""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + db_rpc_module { + desc { + en: """ +Protocol used for pushing transaction logs to the replicant nodes. +""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + db_tlog_push_mode { + desc { + en: """ +In sync mode the core node waits for an ack from the replicant nodes before sending the next +transaction log entry. +""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + db_default_shard_transport { + desc { + en: """Defines the default transport for pushing transaction logs.
This may be overridden on a per-shard basis in db.shard_transports.gen_rpc uses the gen_rpc library, distr uses the Erlang distribution.
""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + db_shard_transports { + desc { + en: """Allows to tune the transport method used for transaction log replication, on a per-shard basis.
gen_rpc uses the gen_rpc library, distr uses the Erlang distribution.
If not specified, the default is to use the value set in db.default_shard_transport.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_call_retry_interval { + desc { + en: """Time interval to retry after a failed call.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_call_max_history { + desc { + en: """Retain the maximum number of completed transactions (for queries).""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + cluster_call_cleanup_interval { + desc { + en: """Time interval to clear completed but stale transactions. +Ensure that the number of completed transactions is less than the max_history.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_mode { + desc { + en: """In sync mode the sending side waits for the ack from the receiving side.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_driver { + desc { + en: """Transport protocol used for inter-broker communication""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_async_batch_size { + desc { + en: """The maximum number of batch messages sent in asynchronous mode. Note that this configuration does not work in synchronous mode.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_port_discovery { + desc { + en: """manual: discover ports by tcp_server_port.
stateless: discover ports in a stateless manner, using the following algorithm. If node name is emqxN@127.0.0.1, where the N is an integer, then the listening port will be 5370 + N.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_tcp_server_port { + desc { + en: """Listening port used by RPC local service.
Note that this config only takes effect when rpc.port_discovery is set to manual.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_ssl_server_port { + desc { + en: """Listening port used by RPC local service.
Note that this config only takes effect when rpc.port_discovery is set to manual and driver is set to ssl.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_tcp_client_num { + desc { + en: """Set the maximum number of RPC communication channels initiated by this node to each remote node.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_connect_timeout { + desc { + en: """Timeout for establishing an RPC connection.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_certfile { + desc { + en: """Path to TLS certificate file used to validate identity of the cluster nodes. Note that this config only takes effect when rpc.driver is set to ssl.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_keyfile { + desc { + en: """Path to the private key file for the rpc.certfile.
Note: contents of this file are secret, so it's necessary to set permissions to 600.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_cacertfile { + desc { + en: """Path to certification authority TLS certificate file used to validate rpc.certfile.
Note: certificates of all nodes in the cluster must be signed by the same CA.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_send_timeout { + desc { + en: """Timeout for sending the RPC request.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_authentication_timeout { + desc { + en: """Timeout for the remote node authentication.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_call_receive_timeout { + desc { + en: """Timeout for the reply to a synchronous RPC.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_socket_keepalive_idle { + desc { + en: """How long the connections between the brokers should remain open after the last message is sent.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_socket_keepalive_interval { + desc { + en: """The interval between keepalive messages.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_socket_keepalive_count { + desc { + en: """How many times the keepalive probe message can fail to receive a reply until the RPC connection is considered lost.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_socket_sndbuf { + desc { + en: """TCP tuning parameters. TCP sending buffer size.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_socket_recbuf { + desc { + en: """TCP tuning parameters. TCP receiving buffer size.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + rpc_socket_buffer { + desc { + en: """TCP tuning parameters. Socket buffer size in user mode.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handlers { + desc { + en: """Key-value list of file-based log handlers.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_error_logger { + desc { + en: """Deprecated.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + console_handler_enable { + desc { + en: """Enable this log handler.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + console_handler_level { + desc { + en: """Global log level. This includes the primary log level and all log handlers.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + console_handler_time_offset { + desc { + en: """The time offset to be used when formatting the timestamp.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + console_handler_chars_limit { + desc { + en: """Set the maximum length of a single log message. If this length is exceeded, the log message will be truncated.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + console_handler_formatter { + desc { + en: """Choose log format. text for free text, and json for structured logging.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + console_handler_single_line { + desc { + en: """Print logs in a single line if set to true. Otherwise, log messages may span multiple lines.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + console_handler_sync_mode_qlen { + desc { + en: """As long as the number of buffered log events is lower than this value, all log events are handled asynchronously.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + console_handler_drop_mode_qlen { + desc { + en: """When the number of buffered log events is larger than this value, the new log events are dropped.
When drop mode is activated or deactivated, a message is printed in the logs.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + console_handler_flush_qlen { + desc { + en: """If the number of buffered log events grows larger than this threshold, a flush (delete) operation takes place. To flush events, the handler discards the buffered log messages without logging.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + console_handler_supervisor_reports { + desc { + en: """Type of supervisor reports that are logged. + - `error`: only log errors in the Erlang processes. + - `progress`: log process startup.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + console_handler_max_depth { + desc { + en: """Maximum depth for Erlang term log formatting and Erlang process message queue inspection.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_file { + desc { + en: """Name the log file.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_max_size { + desc { + en: """This parameter controls log file rotation. The value `infinity` means the log file will grow indefinitely, otherwise the log file will be rotated once it reaches `max_size` in bytes.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_enable { + desc { + en: """Enable this log handler.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_level { + desc { + en: """Global log level. This includes the primary log level and all log handlers.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_time_offset { + desc { + en: """The time offset to be used when formatting the timestamp.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_chars_limit { + desc { + en: """Set the maximum length of a single log message. If this length is exceeded, the log message will be truncated.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_formatter { + desc { + en: """Choose log format. text for free text, and json for structured logging.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_single_line { + desc { + en: """Print logs in a single line if set to true. Otherwise, log messages may span multiple lines.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_sync_mode_qlen { + desc { + en: """As long as the number of buffered log events is lower than this value, all log events are handled asynchronously.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_drop_mode_qlen { + desc { + en: """When the number of buffered log events is larger than this value, the new log events are dropped.
When drop mode is activated or deactivated, a message is printed in the logs.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_flush_qlen { + desc { + en: """If the number of buffered log events grows larger than this threshold, a flush (delete) operation takes place. To flush events, the handler discards the buffered log messages without logging.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_supervisor_reports { + desc { + en: """Type of supervisor reports that are logged. + - `error`: only log errors in the Erlang processes. + - `progress`: log process startup.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_file_handler_max_depth { + desc { + en: """Maximum depth for Erlang term log formatting and Erlang process message queue inspection.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_rotation_enable { + desc { + en: """Enable log rotation feature.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_rotation_count { + desc { + en: """Maximum number of log files.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_overload_kill_enable { + desc { + en: """Enable log handler overload kill feature.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_overload_kill_mem_size { + desc { + en: """Maximum memory size that the handler process is allowed to use.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_overload_kill_qlen { + desc { + en: """Maximum allowed queue length.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_overload_kill_restart_after { + desc { + en: """If the handler is terminated, it restarts automatically after a delay specified in milliseconds. The value `infinity` prevents restarts.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_burst_limit_enable { + desc { + en: """Enable log burst control feature.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_burst_limit_max_count { + desc { + en: """Maximum number of log events to handle within a `window_time` interval. After the limit is reached, successive events are dropped until the end of the `window_time`.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + log_burst_limit_window_time { + desc { + en: """See `max_count`.""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + + authorization { + desc { + en: """ +Authorization a.k.a. ACL.
+In EMQX, MQTT client access control is extremely flexible.
+An out-of-the-box set of authorization data sources are supported. +For example,
+'file' source is to support concise and yet generic ACL rules in a file;
+'built_in_database' source can be used to store per-client customizable rule sets, +natively in the EMQX node;
+'http' source to make EMQX call an external HTTP API to make the decision;
+'PostgreSQL' etc. to look up clients or rules from external databases;
+""" + zh: """""" + } + label: { + en: "" + zh: "" + } + } + +}