refactor(config): replace all ':' with '=' in the *.conf (#5531)

This commit is contained in:
Shawn 2021-08-19 19:57:42 +08:00 committed by GitHub
parent 65563e9f8c
commit f3efc89192
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 452 additions and 451 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
emqx_hocon_plugin: { emqx_hocon_plugin {
name: test name = test
} }

View File

@ -1,6 +1,6 @@
authentication: { authentication {
enable: false enable = false
authenticators: [ authenticators = [
# { # {
# name: "authenticator1" # name: "authenticator1"
# mechanism: password-based # mechanism: password-based

View File

@ -1,5 +1,5 @@
authorization:{ authorization {
rules: [ rules = [
# { # {
# type: http # type: http
# config: { # config: {
@ -66,9 +66,9 @@ authorization:{
# find: { "$or": [ { "username": "%u" }, { "clientid": "%c" } ] } # find: { "$or": [ { "username": "%u" }, { "clientid": "%c" } ] }
# }, # },
{ {
permission: allow permission = allow
action: all action = all
topics: ["#"] topics = ["#"]
} }
] ]
} }

View File

@ -2,7 +2,7 @@
## Configuration for EMQ X MQTT Broker Bridge ## Configuration for EMQ X MQTT Broker Bridge
##==================================================================== ##====================================================================
emqx_bridge_mqtt:{ emqx_bridge_mqtt {
bridges:[ bridges:[
# { # {
# name: "mqtt1" # name: "mqtt1"
@ -11,13 +11,13 @@ emqx_bridge_mqtt:{
# forward_mountpoint: "" # forward_mountpoint: ""
# reconnect_interval: "30s" # reconnect_interval: "30s"
# batch_size: 100 # batch_size: 100
# queue:{ # queue {
# replayq_dir: "{{ platform_data_dir }}/replayq/bridge_mqtt/" # replayq_dir: "{{ platform_data_dir }}/replayq/bridge_mqtt/"
# replayq_seg_bytes: "100MB" # replayq_seg_bytes: "100MB"
# replayq_offload_mode: false # replayq_offload_mode: false
# replayq_max_total_bytes: "1GB" # replayq_max_total_bytes: "1GB"
# }, # },
# config:{ # config {
# conn_type: mqtt # conn_type: mqtt
# address: "127.0.0.1:1883" # address: "127.0.0.1:1883"
# proto_ver: v4 # proto_ver: v4
@ -43,13 +43,13 @@ emqx_bridge_mqtt:{
# forward_mountpoint: "" # forward_mountpoint: ""
# reconnect_interval: "30s" # reconnect_interval: "30s"
# batch_size: 100 # batch_size: 100
# queue:{ # queue {
# replayq_dir: "{{ platform_data_dir }}/replayq/bridge_mqtt/" # replayq_dir: "{{ platform_data_dir }}/replayq/bridge_mqtt/"
# replayq_seg_bytes: "100MB" # replayq_seg_bytes: "100MB"
# replayq_offload_mode: false # replayq_offload_mode: false
# replayq_max_total_bytes: "1GB" # replayq_max_total_bytes: "1GB"
# }, # },
# config:{ # config {
# conn_type: rpc # conn_type: rpc
# node: "emqx@127.0.0.1" # node: "emqx@127.0.0.1"
# } # }

View File

@ -2,24 +2,24 @@
## EMQ X Dashboard ## EMQ X Dashboard
##-------------------------------------------------------------------- ##--------------------------------------------------------------------
emqx_dashboard:{ emqx_dashboard {
default_username: "admin" default_username = "admin"
default_password: "public" default_password = "public"
## notice: sample_interval should be divisible by 60. ## notice: sample_interval should be divisible by 60.
sample_interval: 10s sample_interval = 10s
## api jwt timeout. default is 30 minute ## api jwt timeout. default is 30 minute
token_expired_time: 60m token_expired_time = 60m
listeners: [ listeners = [
{ {
num_acceptors: 4 num_acceptors = 4
max_connections: 512 max_connections = 512
protocol: http protocol = http
port: 18083 port = 18083
backlog: 512 backlog = 512
send_timeout: 15s send_timeout = 15s
send_timeout_close: true send_timeout_close = true
inet6: false inet6 = false
ipv6_v6only: false ipv6_v6only = false
} }
## , ## ,
## { ## {

View File

@ -2,7 +2,7 @@
## EMQ X Bridge Plugin ## EMQ X Bridge Plugin
##-------------------------------------------------------------------- ##--------------------------------------------------------------------
emqx_data_bridge:{ emqx_data_bridge {
bridges:[ bridges:[
# {name: "mysql_bridge_1" # {name: "mysql_bridge_1"
# type: mysql # type: mysql

View File

@ -2,19 +2,19 @@
## EMQ X Hooks ## EMQ X Hooks
##==================================================================== ##====================================================================
exhook: { exhook {
## The default value or action will be returned, while the request to ## The default value or action will be returned, while the request to
## the gRPC server failed or no available grpc server running. ## the gRPC server failed or no available grpc server running.
## ##
## Default: deny ## Default: deny
## Value: ignore | deny ## Value: ignore | deny
request_failed_action: deny request_failed_action = deny
## The timeout to request grpc server ## The timeout to request grpc server
## ##
## Default: 5s ## Default: 5s
## Value: Duration ## Value: Duration
request_timeout: 5s request_timeout = 5s
## Whether to automatically reconnect (initialize) the gRPC server ## Whether to automatically reconnect (initialize) the gRPC server
## ##
@ -23,9 +23,9 @@ exhook: {
## ##
## Default: false ## Default: false
## Value: false | Duration ## Value: false | Duration
auto_reconnect: 60s auto_reconnect = 60s
servers: [ servers = [
# { name: "default" # { name: "default"
# url: "http://127.0.0.1:9000" # url: "http://127.0.0.1:9000"
# #ssl: { # #ssl: {

View File

@ -6,130 +6,130 @@
## In the final version, it will be commented out. ## In the final version, it will be commented out.
gateway.stomp { gateway.stomp {
frame: { frame {
max_headers: 10 max_headers = 10
max_headers_length: 1024 max_headers_length = 1024
max_body_length: 8192 max_body_length = 8192
} }
clientinfo_override: { clientinfo_override {
username: "${Packet.headers.login}" username = "${Packet.headers.login}"
password: "${Packet.headers.passcode}" password = "${Packet.headers.passcode}"
} }
authentication: { authentication {
enable: true enable = true
authenticators: [ authenticators = [
{ {
name: "authenticator1" name = "authenticator1"
mechanism: password-based mechanism = password-based
server_type: built-in-database server_type = built-in-database
user_id_type: clientid user_id_type = clientid
} }
] ]
} }
listener.tcp.1: { listener.tcp.1 {
bind: 61613 bind = 61613
acceptors: 16 acceptors = 16
max_connections: 1024000 max_connections = 1024000
max_conn_rate: 1000 max_conn_rate = 1000
active_n: 100 active_n = 100
} }
} }
gateway.coap: { gateway.coap {
enable_stats: false enable_stats = false
#authentication.enable: false #authentication.enable: false
authentication: { authentication {
enable: true enable = true
authenticators: [ authenticators = [
{ {
name: "authenticator1" name = "authenticator1"
mechanism: password-based mechanism = password-based
server_type: built-in-database server_type = built-in-database
user_id_type: clientid user_id_type = clientid
} }
] ]
} }
heartbeat: 30s heartbeat = 30s
notify_type: qos notify_type = qos
subscribe_qos: qos0 subscribe_qos = qos0
publish_qos: qos1 publish_qos = qos1
listener.udp.1: { listener.udp.1 {
bind: 5683 bind = 5683
} }
} }
gateway.mqttsn: { gateway.mqttsn {
## The MQTT-SN Gateway ID in ADVERTISE message. ## The MQTT-SN Gateway ID in ADVERTISE message.
gateway_id: 1 gateway_id = 1
## Enable broadcast this gateway to WLAN ## Enable broadcast this gateway to WLAN
broadcast: true broadcast = true
## To control whether write statistics data into ETS table ## To control whether write statistics data into ETS table
## for dashbord to read. ## for dashbord to read.
enable_stats: true enable_stats = true
## To control whether accept and process the received ## To control whether accept and process the received
## publish message with qos=-1. ## publish message with qos=-1.
enable_qos3: true enable_qos3 = true
## Idle timeout for a MQTT-SN channel ## Idle timeout for a MQTT-SN channel
idle_timeout: 30s idle_timeout = 30s
## The pre-defined topic name corresponding to the pre-defined topic ## The pre-defined topic name corresponding to the pre-defined topic
## id of N. ## id of N.
## Note that the pre-defined topic id of 0 is reserved. ## Note that the pre-defined topic id of 0 is reserved.
predefined: [ predefined = [
{ id: 1 { id = 1
topic: "/predefined/topic/name/hello" topic = "/predefined/topic/name/hello"
}, },
{ id: 2 { id = 2
topic: "/predefined/topic/name/nice" topic = "/predefined/topic/name/nice"
} }
] ]
### ClientInfo override ### ClientInfo override
clientinfo_override: { clientinfo_override {
username: "mqtt_sn_user" username = "mqtt_sn_user"
password: "abc" password = "abc"
} }
listener.udp.1: { listener.udp.1 {
bind: 1884 bind = 1884
max_connections: 10240000 max_connections = 10240000
max_conn_rate: 1000 max_conn_rate = 1000
} }
} }
gateway.exproto: { gateway.exproto {
## The gRPC server to accept requests ## The gRPC server to accept requests
server: { server {
bind: 9100 bind = 9100
#ssl.keyfile: #ssl.keyfile:
#ssl.certfile: #ssl.certfile:
#ssl.cacertfile: #ssl.cacertfile:
} }
handler: { handler {
address: "http://127.0.0.1:9001" address = "http://127.0.0.1:9001"
#ssl.keyfile: #ssl.keyfile:
#ssl.certfile: #ssl.certfile:
#ssl.cacertfile: #ssl.cacertfile:
} }
authentication.enable: false authentication.enable = false
listener.tcp.1: { listener.tcp.1 {
bind: 7993 bind = 7993
acceptors: 8 acceptors = 8
max_connections: 10240 max_connections = 10240
max_conn_rate: 1000 max_conn_rate = 1000
} }
#listener.ssl.1: {} #listener.ssl.1: {}
@ -137,29 +137,29 @@ gateway.exproto: {
#listener.dtls.1: {} #listener.dtls.1: {}
} }
gateway.lwm2m: { gateway.lwm2m {
xml_dir: "{{ platform_etc_dir }}/lwm2m_xml" xml_dir = "{{ platform_etc_dir }}/lwm2m_xml"
lifetime_min: 1s lifetime_min = 1s
lifetime_max: 86400s lifetime_max = 86400s
qmode_time_windonw: 22 qmode_time_windonw = 22
auto_observe: false auto_observe = false
mountpoint: "lwm2m/%e/" mountpoint = "lwm2m/%e/"
## always | contains_object_list ## always | contains_object_list
update_msg_publish_condition: contains_object_list update_msg_publish_condition = contains_object_list
translators: { translators {
command: "dn/#" command = "dn/#"
response: "up/resp" response = "up/resp"
notify: "up/notify" notify = "up/notify"
register: "up/resp" register = "up/resp"
update: "up/resp" update = "up/resp"
} }
listener.udp.1 { listener.udp.1 {
bind: 5783 bind = 5783
} }
} }

View File

@ -11,35 +11,35 @@ node {
## @doc node.name ## @doc node.name
## ValueType: NodeName ## ValueType: NodeName
## Default: emqx@127.0.0.1 ## Default: emqx@127.0.0.1
name: "emqx@127.0.0.1" name = "emqx@127.0.0.1"
## Cookie for distributed node communication. ## Cookie for distributed node communication.
## ##
## @doc node.cookie ## @doc node.cookie
## ValueType: String ## ValueType: String
## Default: emqxsecretcookie ## Default: emqxsecretcookie
cookie: emqxsecretcookie cookie = emqxsecretcookie
## Data dir for the node ## Data dir for the node
## ##
## @doc node.data_dir ## @doc node.data_dir
## ValueType: Folder ## ValueType: Folder
## Default: "{{ platform_data_dir }}/" ## Default: "{{ platform_data_dir }}/"
data_dir: "{{ platform_data_dir }}/" data_dir = "{{ platform_data_dir }}/"
## Dir of crash dump file. ## Dir of crash dump file.
## ##
## @doc node.crash_dump_dir ## @doc node.crash_dump_dir
## ValueType: Folder ## ValueType: Folder
## Default: "{{ platform_log_dir }}/" ## Default: "{{ platform_log_dir }}/"
crash_dump_dir: "{{ platform_log_dir }}/" crash_dump_dir = "{{ platform_log_dir }}/"
## Global GC Interval. ## Global GC Interval.
## ##
## @doc node.global_gc_interval ## @doc node.global_gc_interval
## ValueType: Duration ## ValueType: Duration
## Default: 15m ## Default: 15m
global_gc_interval: 15m global_gc_interval = 15m
## Sets the net_kernel tick time in seconds. ## Sets the net_kernel tick time in seconds.
## Notice that all communicating nodes are to have the same ## Notice that all communicating nodes are to have the same
@ -50,7 +50,7 @@ node {
## @doc node.dist_net_ticktime ## @doc node.dist_net_ticktime
## ValueType: Number ## ValueType: Number
## Default: 2m ## Default: 2m
dist_net_ticktime: 2m dist_net_ticktime = 2m
## Sets the port range for the listener socket of a distributed ## Sets the port range for the listener socket of a distributed
## Erlang node. ## Erlang node.
@ -63,7 +63,7 @@ node {
## ValueType: Integer ## ValueType: Integer
## Range: [1024,65535] ## Range: [1024,65535]
## Default: 6369 ## Default: 6369
dist_listen_min: 6369 dist_listen_min = 6369
## Sets the port range for the listener socket of a distributed ## Sets the port range for the listener socket of a distributed
## Erlang node. ## Erlang node.
@ -76,7 +76,7 @@ node {
## ValueType: Integer ## ValueType: Integer
## Range: [1024,65535] ## Range: [1024,65535]
## Default: 6369 ## Default: 6369
dist_listen_max: 6369 dist_listen_max = 6369
## Sets the maximum depth of call stack back-traces in the exit ## Sets the maximum depth of call stack back-traces in the exit
## reason element of 'EXIT' tuples. ## reason element of 'EXIT' tuples.
@ -87,7 +87,7 @@ node {
## ValueType: Integer ## ValueType: Integer
## Range: [0,1024] ## Range: [0,1024]
## Default: 23 ## Default: 23
backtrace_depth: 23 backtrace_depth = 23
} }
@ -100,14 +100,14 @@ cluster {
## @doc cluster.name ## @doc cluster.name
## ValueType: String ## ValueType: String
## Default: emqxcl ## Default: emqxcl
name: emqxcl name = emqxcl
## Enable cluster autoheal from network partition. ## Enable cluster autoheal from network partition.
## ##
## @doc cluster.autoheal ## @doc cluster.autoheal
## ValueType: Boolean ## ValueType: Boolean
## Default: true ## Default: true
autoheal: true autoheal = true
## Autoclean down node. A down node will be removed from the cluster ## Autoclean down node. A down node will be removed from the cluster
## if this value > 0. ## if this value > 0.
@ -115,7 +115,7 @@ cluster {
## @doc cluster.autoclean ## @doc cluster.autoclean
## ValueType: Duration ## ValueType: Duration
## Default: 5m ## Default: 5m
autoclean: 5m autoclean = 5m
## Node discovery strategy to join the cluster. ## Node discovery strategy to join the cluster.
## ##
@ -129,7 +129,7 @@ cluster {
## - k8s: Kubernetes ## - k8s: Kubernetes
## ##
## Default: manual ## Default: manual
discovery_strategy: manual discovery_strategy = manual
##---------------------------------------------------------------- ##----------------------------------------------------------------
## Cluster using static node list ## Cluster using static node list
@ -140,7 +140,7 @@ cluster {
## @doc cluster.static.seeds ## @doc cluster.static.seeds
## ValueType: Array<NodeName> ## ValueType: Array<NodeName>
## Default: [] ## Default: []
seeds: ["emqx1@127.0.0.1", "emqx2@127.0.0.1"] seeds = ["emqx1@127.0.0.1", "emqx2@127.0.0.1"]
} }
##---------------------------------------------------------------- ##----------------------------------------------------------------
@ -152,21 +152,21 @@ cluster {
## @doc cluster.mcast.addr ## @doc cluster.mcast.addr
## ValueType: IPAddress ## ValueType: IPAddress
## Default: "239.192.0.1" ## Default: "239.192.0.1"
addr: "239.192.0.1" addr = "239.192.0.1"
## Multicast Ports. ## Multicast Ports.
## ##
## @doc cluster.mcast.ports ## @doc cluster.mcast.ports
## ValueType: Array<Port> ## ValueType: Array<Port>
## Default: [4369, 4370] ## Default: [4369, 4370]
ports: [4369, 4370] ports = [4369, 4370]
## Multicast Iface. ## Multicast Iface.
## ##
## @doc cluster.mcast.iface ## @doc cluster.mcast.iface
## ValueType: IPAddress ## ValueType: IPAddress
## Default: "0.0.0.0" ## Default: "0.0.0.0"
iface: "0.0.0.0" iface = "0.0.0.0"
## Multicast Ttl. ## Multicast Ttl.
## ##
@ -174,14 +174,14 @@ cluster {
## ValueType: Integer ## ValueType: Integer
## Range: [0,255] ## Range: [0,255]
## Default: 255 ## Default: 255
ttl: 255 ttl = 255
## Multicast loop. ## Multicast loop.
## ##
## @doc cluster.mcast.loop ## @doc cluster.mcast.loop
## ValueType: Boolean ## ValueType: Boolean
## Default: true ## Default: true
loop: true loop = true
} }
##---------------------------------------------------------------- ##----------------------------------------------------------------
@ -193,14 +193,14 @@ cluster {
## @doc cluster.dns.name ## @doc cluster.dns.name
## ValueType: String ## ValueType: String
## Default: localhost ## Default: localhost
name: localhost name = localhost
## The App name is used to build 'node.name' with IP address. ## The App name is used to build 'node.name' with IP address.
## ##
## @doc cluster.dns.app ## @doc cluster.dns.app
## ValueType: String ## ValueType: String
## Default: emqx ## Default: emqx
app: emqx app = emqx
} }
##---------------------------------------------------------------- ##----------------------------------------------------------------
@ -212,7 +212,7 @@ cluster {
## @doc cluster.etcd.server ## @doc cluster.etcd.server
## ValueType: URL ## ValueType: URL
## Required: true ## Required: true
server: "http://127.0.0.1:2379" server = "http://127.0.0.1:2379"
## The prefix helps build nodes path in etcd. Each node in the cluster ## The prefix helps build nodes path in etcd. Each node in the cluster
## will create a path in etcd: v2/keys/<prefix>/<name>/<node.name> ## will create a path in etcd: v2/keys/<prefix>/<name>/<node.name>
@ -220,28 +220,28 @@ cluster {
## @doc cluster.etcd.prefix ## @doc cluster.etcd.prefix
## ValueType: String ## ValueType: String
## Default: emqxcl ## Default: emqxcl
prefix: emqxcl prefix = emqxcl
## The TTL for node's path in etcd. ## The TTL for node's path in etcd.
## ##
## @doc cluster.etcd.node_ttl ## @doc cluster.etcd.node_ttl
## ValueType: Duration ## ValueType: Duration
## Default: 1m ## Default: 1m
node_ttl: 1m node_ttl = 1m
## Path to the file containing the user's private PEM-encoded key. ## Path to the file containing the user's private PEM-encoded key.
## ##
## @doc cluster.etcd.ssl.keyfile ## @doc cluster.etcd.ssl.keyfile
## ValueType: File ## ValueType: File
## Default: "{{ platform_etc_dir }}/certs/key.pem" ## Default: "{{ platform_etc_dir }}/certs/key.pem"
ssl.keyfile: "{{ platform_etc_dir }}/certs/key.pem" ssl.keyfile = "{{ platform_etc_dir }}/certs/key.pem"
## Path to a file containing the user certificate. ## Path to a file containing the user certificate.
## ##
## @doc cluster.etcd.ssl.certfile ## @doc cluster.etcd.ssl.certfile
## ValueType: File ## ValueType: File
## Default: "{{ platform_etc_dir }}/certs/cert.pem" ## Default: "{{ platform_etc_dir }}/certs/cert.pem"
ssl.certfile: "{{ platform_etc_dir }}/certs/cert.pem" ssl.certfile = "{{ platform_etc_dir }}/certs/cert.pem"
## Path to the file containing PEM-encoded CA certificates. The CA certificates ## Path to the file containing PEM-encoded CA certificates. The CA certificates
## are used during server authentication and when building the client certificate chain. ## are used during server authentication and when building the client certificate chain.
@ -249,7 +249,7 @@ cluster {
## @doc cluster.etcd.ssl.cacertfile ## @doc cluster.etcd.ssl.cacertfile
## ValueType: File ## ValueType: File
## Default: "{{ platform_etc_dir }}/certs/cacert.pem" ## Default: "{{ platform_etc_dir }}/certs/cacert.pem"
ssl.cacertfile: "{{ platform_etc_dir }}/certs/cacert.pem" ssl.cacertfile = "{{ platform_etc_dir }}/certs/cacert.pem"
} }
##---------------------------------------------------------------- ##----------------------------------------------------------------
@ -261,47 +261,47 @@ cluster {
## @doc cluster.k8s.apiserver ## @doc cluster.k8s.apiserver
## ValueType: URL ## ValueType: URL
## Required: true ## Required: true
apiserver: "http://10.110.111.204:8080" apiserver = "http://10.110.111.204:8080"
## The service name helps lookup EMQ nodes in the cluster. ## The service name helps lookup EMQ nodes in the cluster.
## ##
## @doc cluster.k8s.service_name ## @doc cluster.k8s.service_name
## ValueType: String ## ValueType: String
## Default: emqx ## Default: emqx
service_name: emqx service_name = emqx
## The address type is used to extract host from k8s service. ## The address type is used to extract host from k8s service.
## ##
## @doc cluster.k8s.address_type ## @doc cluster.k8s.address_type
## ValueType: ip | dns | hostname ## ValueType: ip | dns | hostname
## Default: ip ## Default: ip
address_type: ip address_type = ip
## The app name helps build 'node.name'. ## The app name helps build 'node.name'.
## ##
## @doc cluster.k8s.app_name ## @doc cluster.k8s.app_name
## ValueType: String ## ValueType: String
## Default: emqx ## Default: emqx
app_name: emqx app_name = emqx
## The suffix added to dns and hostname get from k8s service ## The suffix added to dns and hostname get from k8s service
## ##
## @doc cluster.k8s.suffix ## @doc cluster.k8s.suffix
## ValueType: String ## ValueType: String
## Default: "pod.local" ## Default: "pod.local"
suffix: "pod.local" suffix = "pod.local"
## Kubernetes Namespace ## Kubernetes Namespace
## ##
## @doc cluster.k8s.namespace ## @doc cluster.k8s.namespace
## ValueType: String ## ValueType: String
## Default: default ## Default: default
namespace: default namespace = default
} }
db_backend: mnesia db_backend = mnesia
rlog: { rlog {
# role: core # role: core
# core_nodes: [] # core_nodes: []
} }
@ -326,7 +326,7 @@ log {
## @doc log.primary_level ## @doc log.primary_level
## ValueType: debug | info | notice | warning | error | critical | alert | emergency ## ValueType: debug | info | notice | warning | error | critical | alert | emergency
## Default: warning ## Default: warning
primary_level: warning primary_level = warning
##---------------------------------------------------------------- ##----------------------------------------------------------------
## The console log handler send log messages to emqx console ## The console log handler send log messages to emqx console
@ -335,7 +335,7 @@ log {
## @doc log.console_handler.enable ## @doc log.console_handler.enable
## ValueType: Boolean ## ValueType: Boolean
## Default: false ## Default: false
console_handler.enable: false console_handler.enable = false
## The log level of this handler ## The log level of this handler
## All the log messages with levels lower than this level will ## All the log messages with levels lower than this level will
@ -344,13 +344,13 @@ log {
## @doc log.console_handler.level ## @doc log.console_handler.level
## ValueType: debug | info | notice | warning | error | critical | alert | emergency ## ValueType: debug | info | notice | warning | error | critical | alert | emergency
## Default: warning ## Default: warning
console_handler.level: warning console_handler.level = warning
##---------------------------------------------------------------- ##----------------------------------------------------------------
## The file log handlers send log messages to files ## The file log handlers send log messages to files
##---------------------------------------------------------------- ##----------------------------------------------------------------
## file_handlers.<name> ## file_handlers.<name>
file_handlers.emqx_log: { file_handlers.emqx_log {
## The log level filter of this handler ## The log level filter of this handler
## All the log messages with levels lower than this level will ## All the log messages with levels lower than this level will
## be dropped. ## be dropped.
@ -358,7 +358,7 @@ log {
## @doc log.file_handlers.<name>.level ## @doc log.file_handlers.<name>.level
## ValueType: debug | info | notice | warning | error | critical | alert | emergency ## ValueType: debug | info | notice | warning | error | critical | alert | emergency
## Default: warning ## Default: warning
level: warning level = warning
## The log file for specified level. ## The log file for specified level.
## ##
@ -373,7 +373,7 @@ log {
## @doc log.file_handlers.<name>.file ## @doc log.file_handlers.<name>.file
## ValueType: File ## ValueType: File
## Required: true ## Required: true
file: "{{ platform_log_dir }}/emqx.log" file = "{{ platform_log_dir }}/emqx.log"
## Enables the log rotation. ## Enables the log rotation.
## With this enabled, new log files will be created when the current ## With this enabled, new log files will be created when the current
@ -382,7 +382,7 @@ log {
## @doc log.file_handlers.<name>.rotation.enable ## @doc log.file_handlers.<name>.rotation.enable
## ValueType: Boolean ## ValueType: Boolean
## Default: true ## Default: true
rotation.enable: true rotation.enable = true
## Maximum rotation count of log files. ## Maximum rotation count of log files.
## ##
@ -390,7 +390,7 @@ log {
## ValueType: Integer ## ValueType: Integer
## Range: [1, 2048] ## Range: [1, 2048]
## Default: 10 ## Default: 10
rotation.count: 10 rotation.count = 10
## Maximum size of each log file. ## Maximum size of each log file.
## ##
@ -401,16 +401,16 @@ log {
## @doc log.file_handlers.<name>.max_size ## @doc log.file_handlers.<name>.max_size
## ValueType: Size | infinity ## ValueType: Size | infinity
## Default: 10MB ## Default: 10MB
max_size: 10MB max_size = 10MB
} }
## file_handlers.<name> ## file_handlers.<name>
## ##
## You could also create multiple file handlers for different ## You could also create multiple file handlers for different
## log level for example: ## log level for example:
file_handlers.emqx_error_log: { file_handlers.emqx_error_log {
level: error level = error
file: "{{ platform_log_dir }}/error.log" file = "{{ platform_log_dir }}/error.log"
} }
## Timezone offset to display in logs ## Timezone offset to display in logs
@ -421,7 +421,7 @@ log {
## - "utc" for Universal Coordinated Time (UTC) ## - "utc" for Universal Coordinated Time (UTC)
## - "+hh:mm" or "-hh:mm" for a specified offset ## - "+hh:mm" or "-hh:mm" for a specified offset
## Default: system ## Default: system
time_offset: system time_offset = system
## Limits the total number of characters printed for each log event. ## Limits the total number of characters printed for each log event.
## ##
@ -429,7 +429,7 @@ log {
## ValueType: unlimited | Integer ## ValueType: unlimited | Integer
## Range: [0, +Inf) ## Range: [0, +Inf)
## Default: unlimited ## Default: unlimited
chars_limit: unlimited chars_limit = unlimited
## Maximum depth for Erlang term log formatting ## Maximum depth for Erlang term log formatting
## and Erlang process message queue inspection. ## and Erlang process message queue inspection.
@ -437,19 +437,19 @@ log {
## @doc log.max_depth ## @doc log.max_depth
## ValueType: unlimited | Integer ## ValueType: unlimited | Integer
## Default: 80 ## Default: 80
max_depth: 80 max_depth = 80
## Log formatter ## Log formatter
## @doc log.formatter ## @doc log.formatter
## ValueType: text | json ## ValueType: text | json
## Default: text ## Default: text
formatter: text formatter = text
## Log to single line ## Log to single line
## @doc log.single_line ## @doc log.single_line
## ValueType: Boolean ## ValueType: Boolean
## Default: true ## Default: true
single_line: true single_line = true
## The max allowed queue length before switching to sync mode. ## The max allowed queue length before switching to sync mode.
## ##
@ -460,7 +460,7 @@ log {
## ValueType: Integer ## ValueType: Integer
## Range: [0, ${log.drop_mode_qlen}] ## Range: [0, ${log.drop_mode_qlen}]
## Default: 100 ## Default: 100
sync_mode_qlen: 100 sync_mode_qlen = 100
## The max allowed queue length before switching to drop mode. ## The max allowed queue length before switching to drop mode.
## ##
@ -472,7 +472,7 @@ log {
## ValueType: Integer ## ValueType: Integer
## Range: [${log.sync_mode_qlen}, ${log.flush_qlen}] ## Range: [${log.sync_mode_qlen}, ${log.flush_qlen}]
## Default: 3000 ## Default: 3000
drop_mode_qlen: 3000 drop_mode_qlen = 3000
## The max allowed queue length before switching to flush mode. ## The max allowed queue length before switching to flush mode.
## ##
@ -485,7 +485,7 @@ log {
## ValueType: Integer ## ValueType: Integer
## Range: [${log.drop_mode_qlen}, infinity) ## Range: [${log.drop_mode_qlen}, infinity)
## Default: 8000 ## Default: 8000
flush_qlen: 8000 flush_qlen = 8000
## Kill the log handler when it gets overloaded. ## Kill the log handler when it gets overloaded.
## ##
@ -498,7 +498,7 @@ log {
## @doc log.overload_kill.enable ## @doc log.overload_kill.enable
## ValueType: Boolean ## ValueType: Boolean
## Default: true ## Default: true
overload_kill.enable: true overload_kill.enable = true
## The max allowed queue length before killing the log hanlder. ## The max allowed queue length before killing the log hanlder.
## ##
@ -510,7 +510,7 @@ log {
## ValueType: Integer ## ValueType: Integer
## Range: [0, 1048576] ## Range: [0, 1048576]
## Default: 20000 ## Default: 20000
overload_kill.qlen: 20000 overload_kill.qlen = 20000
## The max allowed memory size before killing the log hanlder. ## The max allowed memory size before killing the log hanlder.
## ##
@ -521,7 +521,7 @@ log {
## @doc log.overload_kill.mem_size ## @doc log.overload_kill.mem_size
## ValueType: Size ## ValueType: Size
## Default: 30MB ## Default: 30MB
overload_kill.mem_size: 30MB overload_kill.mem_size = 30MB
## Restart the log hanlder after some seconds. ## Restart the log hanlder after some seconds.
## ##
@ -531,7 +531,7 @@ log {
## @doc log.overload_kill.restart_after ## @doc log.overload_kill.restart_after
## ValueType: Duration ## ValueType: Duration
## Default: 5s ## Default: 5s
overload_kill.restart_after: 5s overload_kill.restart_after = 5s
## Controlling Bursts of Log Requests. ## Controlling Bursts of Log Requests.
## ##
@ -547,7 +547,7 @@ log {
## @doc log.burst_limit.enable ## @doc log.burst_limit.enable
## ValueType: Boolean ## ValueType: Boolean
## Default: false ## Default: false
burst_limit.enable: false burst_limit.enable = false
## This config controls the maximum number of events to handle within ## This config controls the maximum number of events to handle within
## a time frame. After the limit is reached, successive events are ## a time frame. After the limit is reached, successive events are
@ -556,14 +556,14 @@ log {
## @doc log.burst_limit.max_count ## @doc log.burst_limit.max_count
## ValueType: Integer ## ValueType: Integer
## Default: 10000 ## Default: 10000
burst_limit.max_count: 10000 burst_limit.max_count = 10000
## See the previous description of burst_limit_max_count. ## See the previous description of burst_limit_max_count.
## ##
## @doc log.burst_limit.window_time ## @doc log.burst_limit.window_time
## ValueType: duration ## ValueType: duration
## Default: 1s ## Default: 1s
burst_limit.window_time: 1s burst_limit.window_time = 1s
} }
##================================================================== ##==================================================================
@ -575,7 +575,7 @@ rpc {
## @doc rpc.mode ## @doc rpc.mode
## ValueType: sync | async ## ValueType: sync | async
## Default: async ## Default: async
mode: async mode = async
## Max batch size of async RPC requests. ## Max batch size of async RPC requests.
## ##
@ -586,7 +586,7 @@ rpc {
## ValueType: Integer ## ValueType: Integer
## Range: [0, 1048576] ## Range: [0, 1048576]
## Default: 0 ## Default: 0
async_batch_size: 256 async_batch_size = 256
## RPC port discovery ## RPC port discovery
## ##
@ -601,7 +601,7 @@ rpc {
## an integer, then the listening port will be `5370 + <N>` ## an integer, then the listening port will be `5370 + <N>`
## ##
## Default: `stateless`. ## Default: `stateless`.
port_discovery: stateless port_discovery = stateless
## TCP server port for RPC. ## TCP server port for RPC.
## ##
@ -611,7 +611,7 @@ rpc {
## ValueType: Integer ## ValueType: Integer
## Range: [1024-65535] ## Range: [1024-65535]
## Defaults: 5369 ## Defaults: 5369
tcp_server_port: 5369 tcp_server_port = 5369
## Number of outgoing RPC connections. ## Number of outgoing RPC connections.
## ##
@ -622,75 +622,75 @@ rpc {
## ValueType: Integer ## ValueType: Integer
## Range: [1, 256] ## Range: [1, 256]
## Defaults: 1 ## Defaults: 1
tcp_client_num: 1 tcp_client_num = 1
## RCP Client connect timeout. ## RCP Client connect timeout.
## ##
## @doc rpc.connect_timeout ## @doc rpc.connect_timeout
## ValueType: Duration ## ValueType: Duration
## Default: 5s ## Default: 5s
connect_timeout: 5s connect_timeout = 5s
## TCP send timeout of RPC client and server. ## TCP send timeout of RPC client and server.
## ##
## @doc rpc.send_timeout ## @doc rpc.send_timeout
## ValueType: Duration ## ValueType: Duration
## Default: 5s ## Default: 5s
send_timeout: 5s send_timeout = 5s
## Authentication timeout ## Authentication timeout
## ##
## @doc rpc.authentication_timeout ## @doc rpc.authentication_timeout
## ValueType: Duration ## ValueType: Duration
## Default: 5s ## Default: 5s
authentication_timeout: 5s authentication_timeout = 5s
## Default receive timeout for call() functions ## Default receive timeout for call() functions
## ##
## @doc rpc.call_receive_timeout ## @doc rpc.call_receive_timeout
## ValueType: Duration ## ValueType: Duration
## Default: 15s ## Default: 15s
call_receive_timeout: 15s call_receive_timeout = 15s
## Socket idle keepalive. ## Socket idle keepalive.
## ##
## @doc rpc.socket_keepalive_idle ## @doc rpc.socket_keepalive_idle
## ValueType: Duration ## ValueType: Duration
## Default: 900s ## Default: 900s
socket_keepalive_idle: 900s socket_keepalive_idle = 900s
## TCP Keepalive probes interval. ## TCP Keepalive probes interval.
## ##
## @doc rpc.socket_keepalive_interval ## @doc rpc.socket_keepalive_interval
## ValueType: Duration ## ValueType: Duration
## Default: 75s ## Default: 75s
socket_keepalive_interval: 75s socket_keepalive_interval = 75s
## Probes lost to close the connection ## Probes lost to close the connection
## ##
## @doc rpc.socket_keepalive_count ## @doc rpc.socket_keepalive_count
## ValueType: Integer ## ValueType: Integer
## Default: 9 ## Default: 9
socket_keepalive_count: 9 socket_keepalive_count = 9
## Size of TCP send buffer. ## Size of TCP send buffer.
## ##
## @doc rpc.socket_sndbuf ## @doc rpc.socket_sndbuf
## ValueType: Size ## ValueType: Size
## Default: 1MB ## Default: 1MB
socket_sndbuf: 1MB socket_sndbuf = 1MB
## Size of TCP receive buffer. ## Size of TCP receive buffer.
## ##
## @doc rpc.socket_recbuf ## @doc rpc.socket_recbuf
## ValueType: Size ## ValueType: Size
## Default: 1MB ## Default: 1MB
socket_recbuf: 1MB socket_recbuf = 1MB
## Size of user-level software socket buffer. ## Size of user-level software socket buffer.
## ##
## @doc rpc.socket_buffer ## @doc rpc.socket_buffer
## ValueType: Size ## ValueType: Size
## Default: 1MB ## Default: 1MB
socket_buffer: 1MB socket_buffer = 1MB
} }

View File

@ -1,22 +1,22 @@
emqx_management:{ emqx_management {
applications: [ applications = [
{ {
id: "admin", id = "admin",
secret: "public" secret = "public"
} }
] ]
max_row_limit: 10000 max_row_limit = 10000
listeners: [ listeners = [
{ {
num_acceptors: 4 num_acceptors = 4
max_connections: 512 max_connections = 512
protocol: http protocol = http
port: 8081 port = 8081
backlog: 512 backlog = 512
send_timeout: 15s send_timeout = 15s
send_timeout_close: true send_timeout_close = true
inet6: false inet6 = false
ipv6_v6only: false ipv6_v6only = false
} }
## , ## ,
## { ## {

View File

@ -1,20 +1,21 @@
delayed: {
enable: true delayed {
enable = true
## 0 is no limit ## 0 is no limit
max_delayed_messages: 0 max_delayed_messages = 0
} }
recon: { recon {
enable: true enable = true
} }
telemetry: { telemetry {
enable: true enable = true
} }
event_message { event_message {
"$event/client_connected": true "$event/client_connected" = true
"$event/client_disconnected": true "$event/client_disconnected" = true
# "$event/client_subscribed": false # "$event/client_subscribed": false
# "$event/client_unsubscribed": false # "$event/client_unsubscribed": false
# "$event/message_delivered": false # "$event/message_delivered": false
@ -22,17 +23,17 @@ event_message {
# "$event/message_dropped": false # "$event/message_dropped": false
} }
topic_metrics:{ topic_metrics {
topics: ["topic/#"] topics = ["topic/#"]
} }
rewrite:{ rewrite {
rules: [ rules = [
{ {
action: publish action = publish
source_topic: "x/#" source_topic = "x/#"
re: "^x/y/(.+)$" re = "^x/y/(.+)$"
dest_topic: "z/y/$1" dest_topic = "z/y/$1"
} }
] ]
} }

View File

@ -1,8 +1,8 @@
##-------------------------------------------------------------------- ##--------------------------------------------------------------------
## emqx_prometheus for EMQ X ## emqx_prometheus for EMQ X
##-------------------------------------------------------------------- ##--------------------------------------------------------------------
prometheus: { prometheus {
push_gateway_server: "http://127.0.0.1:9091" push_gateway_server = "http://127.0.0.1:9091"
interval: "15s" interval = "15s"
enable: true enable = true
} }

View File

@ -5,9 +5,9 @@
## Where to store the retained messages. ## Where to store the retained messages.
## ##
## Notice that all nodes in the same cluster have to be configured to ## Notice that all nodes in the same cluster have to be configured to
emqx_retainer: { emqx_retainer {
## enable/disable emqx_retainer ## enable/disable emqx_retainer
enable: true enable = true
## Periodic interval for cleaning up expired messages. Never clear if the value is 0. ## Periodic interval for cleaning up expired messages. Never clear if the value is 0.
## ##
@ -22,12 +22,12 @@ emqx_retainer: {
## - 20s: 20 seconds ## - 20s: 20 seconds
## ##
## Default: 0s ## Default: 0s
msg_clear_interval: 0s msg_clear_interval = 0s
## Message retention time. 0 means message will never be expired. ## Message retention time. 0 means message will never be expired.
## ##
## Default: 0s ## Default: 0s
msg_expiry_interval: 0s msg_expiry_interval = 0s
## The message read and deliver flow rate control ## The message read and deliver flow rate control
## When a client subscribe to a wildcard topic, may many retained messages will be loaded. ## When a client subscribe to a wildcard topic, may many retained messages will be loaded.
@ -37,42 +37,42 @@ emqx_retainer: {
## deliver -> ## deliver ->
## repeat this, until all retianed messages are delivered ## repeat this, until all retianed messages are delivered
## ##
flow_control: { flow_control {
## The max messages number per read from storage. 0 means no limit ## The max messages number per read from storage. 0 means no limit
## ##
## Default: 0 ## Default: 0
max_read_number: 0 max_read_number = 0
## The max number of retained message can be delivered in emqx per quota_release_interval.0 means no limit ## The max number of retained message can be delivered in emqx per quota_release_interval.0 means no limit
## ##
## Default: 0 ## Default: 0
msg_deliver_quota: 0 msg_deliver_quota = 0
## deliver quota reset interval ## deliver quota reset interval
## ##
## Default: 0s ## Default: 0s
quota_release_interval: 0s quota_release_interval = 0s
} }
## Maximum retained message size. ## Maximum retained message size.
## ##
## Value: Bytes ## Value: Bytes
max_payload_size: 1MB max_payload_size = 1MB
## Storage connect parameters ## Storage connect parameters
## ##
## Value: built_in_database ## Value: built_in_database
## ##
config: { config {
type: built_in_database type = built_in_database
## storage_type: ram | disc | disc_only ## storage_type: ram | disc | disc_only
storage_type: ram storage_type = ram
## Maximum number of retained messages. 0 means no limit. ## Maximum number of retained messages. 0 means no limit.
## ##
## Value: Number >= 0 ## Value: Number >= 0
max_retained_messages: 0 max_retained_messages = 0
} }
} }

View File

@ -1,6 +1,6 @@
##==================================================================== ##====================================================================
## Rule Engine for EMQ X R5.0 ## Rule Engine for EMQ X R5.0
##==================================================================== ##====================================================================
emqx_rule_engine:{ emqx_rule_engine {
ignore_sys_message: true ignore_sys_message = true
} }

View File

@ -2,9 +2,9 @@
## Statsd for EMQ X ## Statsd for EMQ X
##-------------------------------------------------------------------- ##--------------------------------------------------------------------
statsd:{ statsd {
enable: true enable = true
server: "127.0.0.1:8125" server = "127.0.0.1:8125"
sample_time_interval: "10s" sample_time_interval = "10s"
flush_time_interval: "10s" flush_time_interval = "10s"
} }