refactor: refine examples
Also turns off vm_dist_collector metrics collector by default
This commit is contained in:
parent
49c4ea9ae9
commit
e0d05a02ff
|
@ -88,9 +88,9 @@ fields("prometheus") ->
|
||||||
?HOCON(
|
?HOCON(
|
||||||
hoconsc:enum([enabled, disabled]),
|
hoconsc:enum([enabled, disabled]),
|
||||||
#{
|
#{
|
||||||
default => enabled,
|
default => disabled,
|
||||||
required => true,
|
required => true,
|
||||||
importance => ?IMPORTANCE_HIDDEN,
|
importance => ?IMPORTANCE_LOW,
|
||||||
desc => ?DESC(vm_dist_collector)
|
desc => ?DESC(vm_dist_collector)
|
||||||
}
|
}
|
||||||
)},
|
)},
|
||||||
|
@ -100,7 +100,7 @@ fields("prometheus") ->
|
||||||
#{
|
#{
|
||||||
default => enabled,
|
default => enabled,
|
||||||
required => true,
|
required => true,
|
||||||
importance => ?IMPORTANCE_HIDDEN,
|
importance => ?IMPORTANCE_LOW,
|
||||||
desc => ?DESC(mnesia_collector)
|
desc => ?DESC(mnesia_collector)
|
||||||
}
|
}
|
||||||
)},
|
)},
|
||||||
|
@ -110,7 +110,7 @@ fields("prometheus") ->
|
||||||
#{
|
#{
|
||||||
default => enabled,
|
default => enabled,
|
||||||
required => true,
|
required => true,
|
||||||
importance => ?IMPORTANCE_HIDDEN,
|
importance => ?IMPORTANCE_LOW,
|
||||||
desc => ?DESC(vm_statistics_collector)
|
desc => ?DESC(vm_statistics_collector)
|
||||||
}
|
}
|
||||||
)},
|
)},
|
||||||
|
@ -120,7 +120,7 @@ fields("prometheus") ->
|
||||||
#{
|
#{
|
||||||
default => enabled,
|
default => enabled,
|
||||||
required => true,
|
required => true,
|
||||||
importance => ?IMPORTANCE_HIDDEN,
|
importance => ?IMPORTANCE_LOW,
|
||||||
desc => ?DESC(vm_system_info_collector)
|
desc => ?DESC(vm_system_info_collector)
|
||||||
}
|
}
|
||||||
)},
|
)},
|
||||||
|
@ -130,7 +130,7 @@ fields("prometheus") ->
|
||||||
#{
|
#{
|
||||||
default => enabled,
|
default => enabled,
|
||||||
required => true,
|
required => true,
|
||||||
importance => ?IMPORTANCE_HIDDEN,
|
importance => ?IMPORTANCE_LOW,
|
||||||
desc => ?DESC(vm_memory_collector)
|
desc => ?DESC(vm_memory_collector)
|
||||||
}
|
}
|
||||||
)},
|
)},
|
||||||
|
@ -140,7 +140,7 @@ fields("prometheus") ->
|
||||||
#{
|
#{
|
||||||
default => enabled,
|
default => enabled,
|
||||||
required => true,
|
required => true,
|
||||||
importance => ?IMPORTANCE_HIDDEN,
|
importance => ?IMPORTANCE_LOW,
|
||||||
desc => ?DESC(vm_msacc_collector)
|
desc => ?DESC(vm_msacc_collector)
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -1,16 +1,24 @@
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
Here are examples of how to configure features In EMQX, most of them can be used directly by copy-paste content into the `emqx.conf` file, others may need to be slightly modified to use, for example, you should change the listener port or HTTP URL to what you actually used.
|
Here are examples of how to configure EMQX.
|
||||||
|
The main purpose of the examples are to serve as a reference for configuration layout and syntax, but not a guide to how to configure EMQX.
|
||||||
|
For more information about EMQX configuration, please refer to EMQX documentation (links below).
|
||||||
|
|
||||||
Although we have tried to show every configurable field in the example,
|
There are two ways to extend the configuration of EMQX:
|
||||||
you do not need to care about each one, since most of them already have default values and can be omitted in the configuration file.
|
|
||||||
|
|
||||||
If you are confused about some fields, please refer to our documents, here are just some simple configuration examples with necessary descriptions.
|
* By adding the configs to `emqx.conf` file.
|
||||||
|
* By adding the configs to a new file and include it in `emqx.conf` file. For example, add `include "mylisteners.conf"` to `emqx.conf` file and add the listeners to `mylisteners.conf`.
|
||||||
|
|
||||||
|
EMQX configuration consists of two parts: static configs and dynamic configs.
|
||||||
|
|
||||||
|
* Configs loaded from `emqx.conf` (and included files) are static configs.
|
||||||
|
* Configs added or updated from the dashboard or CLI are dynamic configs which are synced to all nodes in the cluster and stored in the data directory on each node.
|
||||||
|
|
||||||
|
It is important to note that static configs are loaded when EMQX starts and overlays on top of the dynamic configs,
|
||||||
|
to avoid confusion, it is highly recommended NOT to use the same config name for both static and dynamic configs.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
The EMQX documentation is available at [www.emqx.io/docs/en/latest/](https://www.emqx.io/docs/en/latest/).
|
The EMQX documentation is available at [www.emqx.io/docs/en/latest/](https://www.emqx.io/docs/en/latest/).
|
||||||
|
|
||||||
The EMQX Enterprise documentation is available at [docs.emqx.com/en/](https://docs.emqx.com/en/).
|
The EMQX Enterprise documentation is available at [docs.emqx.com/en/](https://docs.emqx.com/en/).
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Alarm
|
## Alarm
|
||||||
##
|
|
||||||
## Configuring how to handle the alarms generated from sysmon.*.conf.example
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
alarm {
|
alarm {
|
||||||
## The actions triggered when the alarm is activated
|
## The actions triggered when the alarm is activated
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
## Cluster discovery via DNS resolution
|
||||||
## Cluster in service discovery via DNS SRV records mode
|
|
||||||
##
|
|
||||||
## Configs to instruct how individual nodes can discover each other
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
cluster {
|
cluster {
|
||||||
## Human-friendly name of the EMQX cluster.
|
## Human-friendly name of the EMQX cluster.
|
||||||
|
@ -13,9 +7,6 @@ cluster {
|
||||||
## Service discovery method for the cluster nodes
|
## Service discovery method for the cluster nodes
|
||||||
discovery_strategy = dns
|
discovery_strategy = dns
|
||||||
|
|
||||||
## List of core nodes that the replicant will connect to
|
|
||||||
core_nodes = ["emqx1@192.168.0.1", "emqx2@192.168.0.2"]
|
|
||||||
|
|
||||||
## If true, the node will try to heal network partitions automatically
|
## If true, the node will try to heal network partitions automatically
|
||||||
autoheal = true
|
autoheal = true
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,12 @@
|
||||||
##--------------------------------------------------------------------
|
## Cluster discovery using 'etcd'
|
||||||
## Cluster in service discovery using 'etcd' service mode
|
## connect to etcd over TLS
|
||||||
##
|
|
||||||
## Configs to instruct how individual nodes can discover each other
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
cluster {
|
cluster {
|
||||||
## Human-friendly name of the EMQX cluster.
|
|
||||||
name = emqxcl
|
name = emqxcl
|
||||||
|
|
||||||
## Service discovery method for the cluster nodes
|
## Service discovery method for the cluster nodes
|
||||||
discovery_strategy = etcd
|
discovery_strategy = etcd
|
||||||
|
|
||||||
## List of core nodes that the replicant will connect to
|
|
||||||
core_nodes = ["emqx1@192.168.0.1", "emqx2@192.168.0.2"]
|
|
||||||
|
|
||||||
## If true, the node will try to heal network partitions automatically
|
## If true, the node will try to heal network partitions automatically
|
||||||
autoheal = true
|
autoheal = true
|
||||||
|
|
||||||
|
@ -31,51 +22,16 @@ cluster {
|
||||||
|
|
||||||
ssl_options {
|
ssl_options {
|
||||||
## Trusted PEM format CA certificates bundle file
|
## Trusted PEM format CA certificates bundle file
|
||||||
cacertfile = "data/certs/cacert.pem"
|
cacertfile = "${EMQX_ETC_DIR}/certs/etcd-cacert.pem"
|
||||||
|
|
||||||
## PEM format certificates chain file
|
## PEM format certificates chain file
|
||||||
certfile = "data/certs/cert.pem"
|
certfile = "${EMQX_ETC_DIR}/certs/etcd-client-cert.pem"
|
||||||
|
|
||||||
## PEM format private key file
|
## PEM format private key file
|
||||||
keyfile = "data/certs/key.pem"
|
keyfile = "${EMQX_ETC_DIR}/certs/etcd-client-key.pem"
|
||||||
|
|
||||||
## Enable or disable peer verification
|
## Enable or disable peer verification
|
||||||
verify = verify_none ## use verify_peer to enable
|
verify = verify_none ## use verify_peer to enable
|
||||||
|
|
||||||
## if `verify' is ebabled, whit true, the connection fails if the client does not have a certificate to send
|
|
||||||
fail_if_no_peer_cert = false
|
|
||||||
|
|
||||||
## Enable TLS session reuse
|
|
||||||
reuse_sessions = true
|
|
||||||
|
|
||||||
## Maximum number of non-self-issued intermediate certificates that can follow the peer certificate in a valid certification path
|
|
||||||
depth = 10
|
|
||||||
|
|
||||||
## Which versions are to be supported
|
|
||||||
versions = [tlsv1.3, tlsv1.2]
|
|
||||||
|
|
||||||
## TLS cipher suite names
|
|
||||||
## Note: By default, all available suites are supported, you do not need to set this
|
|
||||||
ciphers = ["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256"]
|
|
||||||
|
|
||||||
## Allows a client and a server to renegotiate the parameters of the SSL connection on the fly
|
|
||||||
secure_renegotiate = true
|
|
||||||
|
|
||||||
## Log level for SSL communication
|
|
||||||
## Type: emergency | alert | critical | error | warning | notice | info | debug | none | all
|
|
||||||
log_level = notice
|
|
||||||
|
|
||||||
## Hibernate the SSL process after idling for amount of time reducing its memory footprint
|
|
||||||
hibernate_after = 5s
|
|
||||||
|
|
||||||
## Forces the cipher to be set based on the server-specified order instead of the client-specified order
|
|
||||||
honor_cipher_order = true
|
|
||||||
|
|
||||||
## Setting this to false to disable client-initiated renegotiation
|
|
||||||
client_renegotiation = true
|
|
||||||
|
|
||||||
## Maximum time duration allowed for the handshake to complete
|
|
||||||
handshake_timeout = 15s
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
##--------------------------------------------------------------------
|
## Cluster discovery using 'etcd' service
|
||||||
## Cluster in service discovery using 'etcd' service mode
|
## Connect to etcd over plain TCP (not TLS)
|
||||||
##
|
|
||||||
## Configs to instruct how individual nodes can discover each other
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
cluster {
|
cluster {
|
||||||
## Human-friendly name of the EMQX cluster.
|
## Human-friendly name of the EMQX cluster.
|
||||||
|
@ -13,9 +8,6 @@ cluster {
|
||||||
## Service discovery method for the cluster nodes
|
## Service discovery method for the cluster nodes
|
||||||
discovery_strategy = etcd
|
discovery_strategy = etcd
|
||||||
|
|
||||||
## List of core nodes that the replicant will connect to
|
|
||||||
core_nodes = ["emqx1@192.168.0.1", "emqx2@192.168.0.2"]
|
|
||||||
|
|
||||||
## If true, the node will try to heal network partitions automatically
|
## If true, the node will try to heal network partitions automatically
|
||||||
autoheal = true
|
autoheal = true
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
## Cluster discovery via Kubernetes API server mode
|
||||||
## Cluster in service discovery via Kubernetes API server mode
|
|
||||||
##
|
|
||||||
## Configs to instruct how individual nodes can discover each other
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
cluster {
|
cluster {
|
||||||
## Human-friendly name of the EMQX cluster.
|
## Human-friendly name of the EMQX cluster.
|
||||||
|
@ -13,9 +7,6 @@ cluster {
|
||||||
## Service discovery method for the cluster nodes
|
## Service discovery method for the cluster nodes
|
||||||
discovery_strategy = k8s
|
discovery_strategy = k8s
|
||||||
|
|
||||||
## List of core nodes that the replicant will connect to
|
|
||||||
core_nodes = ["emqx1@192.168.0.1", "emqx2@192.168.0.2"]
|
|
||||||
|
|
||||||
## If true, the node will try to heal network partitions automatically
|
## If true, the node will try to heal network partitions automatically
|
||||||
autoheal = true
|
autoheal = true
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
## Cluster discovery via `emqx ctl cluster` command
|
||||||
## Cluster in service discovery via manual join mode
|
|
||||||
##
|
|
||||||
## Configs to instruct how individual nodes can discover each other
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
cluster {
|
cluster {
|
||||||
## Human-friendly name of the EMQX cluster.
|
## Human-friendly name of the EMQX cluster.
|
||||||
|
@ -13,9 +7,6 @@ cluster {
|
||||||
## Service discovery method for the cluster nodes
|
## Service discovery method for the cluster nodes
|
||||||
discovery_strategy = manual
|
discovery_strategy = manual
|
||||||
|
|
||||||
## List of core nodes that the replicant will connect to
|
|
||||||
core_nodes = ["emqx1@192.168.0.1", "emqx2@192.168.0.2"]
|
|
||||||
|
|
||||||
## If true, the node will try to heal network partitions automatically
|
## If true, the node will try to heal network partitions automatically
|
||||||
autoheal = true
|
autoheal = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
## Cluster discovery via static seed nodes
|
||||||
## Cluster in service discovery via static nodes mode
|
|
||||||
##
|
|
||||||
## Configs to instruct how individual nodes can discover each other
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
cluster {
|
cluster {
|
||||||
## Human-friendly name of the EMQX cluster.
|
## Human-friendly name of the EMQX cluster.
|
||||||
|
@ -13,9 +7,6 @@ cluster {
|
||||||
## Service discovery method for the cluster nodes
|
## Service discovery method for the cluster nodes
|
||||||
discovery_strategy = static
|
discovery_strategy = static
|
||||||
|
|
||||||
## List of core nodes that the replicant will connect to
|
|
||||||
core_nodes = ["emqx1@192.168.0.1", "emqx2@192.168.0.2"]
|
|
||||||
|
|
||||||
## If true, the node will try to heal network partitions automatically
|
## If true, the node will try to heal network partitions automatically
|
||||||
autoheal = true
|
autoheal = true
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Connection Congestion
|
## Connection Congestion
|
||||||
##
|
##
|
||||||
## Generating alarm when MQTT connection congested
|
## Generating alarm when MQTT connection congested
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
conn_congestion {
|
conn_congestion {
|
||||||
## Enable or disable connection congestion alarm
|
## Enable or disable connection congestion alarm
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
##--------------------------------------------------------------------
|
## Dashboard on HTTP
|
||||||
## Dashboard with HTTP Listener
|
|
||||||
##
|
##
|
||||||
## Configuration for EMQX dashboard
|
## Configure HTTP for EMQX dashboard
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
dashboard {
|
dashboard {
|
||||||
## JWT token expiration time
|
## JWT token expiration time
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
##--------------------------------------------------------------------
|
## Dashboard on HTTPS
|
||||||
## Dashboard with HTTPS Listener
|
|
||||||
##
|
##
|
||||||
## Configuration for EMQX dashboard
|
## Configure HTTPS for EMQX dashboard
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
dashboard {
|
dashboard {
|
||||||
## JWT token expiration time
|
## JWT token expiration time
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## gRPC Hook Extension
|
## gRPC Hook Extension
|
||||||
##
|
##
|
||||||
## Allows users to process EMQX Hooks using other programming languages
|
## Allows users to provide hook callbacks over gRPC for EMQX message lifecycle events.
|
||||||
##--------------------------------------------------------------------
|
|
||||||
|
|
||||||
exhook.servers = [
|
exhook.servers = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
##--------------------------------------------------------------------
|
## File Transfer over MQTT exporting files to local file system
|
||||||
## File Transfer
|
|
||||||
##
|
##
|
||||||
## Enables the File Transfer over MQTT feature
|
## NOTE: This configuration is only applicable in EMQX Enterprise edition 5.1 or later.
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
## Note: This configuration only works for the EMQX Enterprise version
|
|
||||||
|
|
||||||
file_transfer {
|
file_transfer {
|
||||||
## Enable the File Transfer feature
|
## Enable the File Transfer feature
|
||||||
|
|
|
@ -1,12 +1,7 @@
|
||||||
##--------------------------------------------------------------------
|
## File Transfer over MQTT
|
||||||
## File Transfer
|
|
||||||
##
|
##
|
||||||
## Enables the File Transfer over MQTT feature
|
## Enables the File Transfer over MQTT feature
|
||||||
##--------------------------------------------------------------------
|
## Note: This configuration is only applicable for EMQX Enterprise edition 5.1 or later.
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
## Note: This configuration only works for the EMQX Enterprise version
|
|
||||||
|
|
||||||
file_transfer {
|
file_transfer {
|
||||||
## Enable the File Transfer feature
|
## Enable the File Transfer feature
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Flapping Detect
|
## Flapping Detect
|
||||||
##
|
##
|
||||||
## Ban the client when the times of connections exceed the limit in the time window
|
## Ban the client when the times of connections exceed the limit in the configured time window
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
flapping_detect {
|
flapping_detect {
|
||||||
## use false to disabled
|
## use 'true' to enable this feature
|
||||||
enable = true
|
enable = false
|
||||||
|
|
||||||
## Time window for flapping detection
|
## Time window for flapping detection
|
||||||
window_time = 1m
|
window_time = 1m
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
##--------------------------------------------------------------------
|
## Force Elrang VM garbage collection
|
||||||
## Force garbage collection
|
|
||||||
##
|
|
||||||
## Force garbage collection in MQTT connection process after they process certain number of messages or bytes of data
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
force_gc {
|
force_gc {
|
||||||
## set to false to disable this
|
## set 'false' to disable this feature
|
||||||
enable = true
|
enable = true
|
||||||
|
|
||||||
## GC the process after this many received messages
|
## GC the process after this many received messages
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Force Shutdown
|
## Force Shutdown
|
||||||
##
|
##
|
||||||
## Forced closing of the overloaded session
|
## Forced shutdown MQTT clients for overload protection
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
force_shutdown {
|
force_shutdown {
|
||||||
## false to disable this
|
## set 'false' to disable force shutdown feature
|
||||||
enable = true
|
enable = true
|
||||||
|
|
||||||
## Maximum mailbox size for each Erlang process
|
## Maximum mailbox size for each Erlang process
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Gateway Exproto
|
## Gateway Exproto
|
||||||
##
|
|
||||||
## Add an Exproto gateway
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
gateway.exproto {
|
gateway.exproto {
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Gateway LwM2M
|
## Gateway LwM2M
|
||||||
##
|
|
||||||
## Add a LwM2M gateway
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
gateway.lwm2m {
|
gateway.lwm2m {
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Gateway MQTT-SN
|
## Gateway MQTT-SN
|
||||||
##
|
|
||||||
## Add a MQTT-SN gateway
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
gateway.mqttsn {
|
gateway.mqttsn {
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Gateway STOMP
|
## Gateway STOMP
|
||||||
##
|
|
||||||
## Add STOMP CoAP gateway
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
gateway.stomp {
|
gateway.stomp {
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
##--------------------------------------------------------------------
|
## EMQX Enterprise License
|
||||||
## License
|
|
||||||
##
|
|
||||||
## Defines the EMQX Enterprise license
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
## Note: This configuration only works for the EMQX Enterprise version
|
## NOTE: This configuration is only applicable for the EMQX Enterprise eidtion
|
||||||
|
|
||||||
license {
|
license {
|
||||||
## License Key
|
## License Key
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
##--------------------------------------------------------------------
|
## MQTT over QUIC Listener
|
||||||
## QUIC Listener
|
|
||||||
##
|
|
||||||
## Add a QUIC Listener
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
## Note: Modifying the 'quicname' to what you need
|
listeners.quic.my_quick_listener_name {
|
||||||
listeners.quic.quicname {
|
|
||||||
## Port or Address to listen on, 0 means disable
|
## Port or Address to listen on, 0 means disable
|
||||||
bind = 14567 ## or with an IP, e.g. "127.0.0.1:14567"
|
bind = 14567 ## or with an IP, e.g. "127.0.0.1:14567"
|
||||||
|
|
||||||
|
@ -28,8 +21,8 @@ listeners.quic.quicname {
|
||||||
## Type: infinity | Integer
|
## Type: infinity | Integer
|
||||||
max_connections = infinity
|
max_connections = infinity
|
||||||
|
|
||||||
## TLS cipher suite names
|
## TLS v1.3 exclusive cipher suite names
|
||||||
ciphers = ["TLS_AES_256_GCM_SHA384", "TLS_AES_128_GCM_SHA256", "TLS_CHACHA20_POLY1305_SHA256"]
|
ciphers = "TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_CHACHA20_POLY1305_SHA256"
|
||||||
|
|
||||||
ssl_options {
|
ssl_options {
|
||||||
## Trusted PEM format CA certificates bundle file
|
## Trusted PEM format CA certificates bundle file
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
##--------------------------------------------------------------------
|
## MQTT over TLS(SSL) Listener
|
||||||
## SSL Listener
|
|
||||||
##
|
|
||||||
## Add a SSL Listener
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
## The SSL listener also supports all the fields listed in listeners.tcp.conf.example
|
listeners.ssl.my_ssl_listener_name {
|
||||||
## only the SSL-specific fields are shown here
|
|
||||||
|
|
||||||
## Note: Modifying the 'sslname' to what you need
|
|
||||||
listeners.ssl.sslname {
|
|
||||||
## Port or Address to listen on, 0 means disable
|
## Port or Address to listen on, 0 means disable
|
||||||
bind = 8883 ## or with an IP e.g. "127.0.0.1:8883"
|
bind = 8883 ## or with an IP e.g. "127.0.0.1:8883"
|
||||||
enabled = true
|
enabled = true
|
||||||
|
@ -33,13 +23,13 @@ listeners.ssl.sslname {
|
||||||
}
|
}
|
||||||
ssl_options {
|
ssl_options {
|
||||||
## Trusted PEM format CA certificates bundle file
|
## Trusted PEM format CA certificates bundle file
|
||||||
cacertfile = "data/certs/cacert.pem"
|
cacertfile = "${EMQX_ETC_DIR}/certs/cacert.pem"
|
||||||
|
|
||||||
## PEM format certificates chain file
|
## PEM format certificates chain file
|
||||||
certfile = "data/certs/cert.pem"
|
certfile = "${EMQX_ETC_DIR}/certs/cert.pem"
|
||||||
|
|
||||||
## PEM format private key file
|
## PEM format private key file
|
||||||
keyfile = "data/certs/key.pem"
|
keyfile = "${EMQX_ETC_DIR}/certs/key.pem"
|
||||||
|
|
||||||
## Enable or disable peer verification
|
## Enable or disable peer verification
|
||||||
verify = verify_none ## use verify_peer to enable
|
verify = verify_none ## use verify_peer to enable
|
||||||
|
@ -58,7 +48,7 @@ listeners.ssl.sslname {
|
||||||
|
|
||||||
## TLS cipher suite names
|
## TLS cipher suite names
|
||||||
## Note: By default, all available suites are supported, you do not need to set this
|
## Note: By default, all available suites are supported, you do not need to set this
|
||||||
ciphers = ["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256"]
|
ciphers = "TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,ECDHE-RSA-AES256-GCM-SHA384"
|
||||||
|
|
||||||
## Allows a client and a server to renegotiate the parameters of the SSL connection on the fly
|
## Allows a client and a server to renegotiate the parameters of the SSL connection on the fly
|
||||||
secure_renegotiate = true
|
secure_renegotiate = true
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
##--------------------------------------------------------------------
|
## MQTT over TCP Listener
|
||||||
## TCP Listener
|
|
||||||
##
|
|
||||||
## Add a TCP Listener
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
## Note: Modifying the 'tcpname' to what you need
|
listeners.tcp.my_tcp_listener_name {
|
||||||
listeners.tcp.tcpname {
|
|
||||||
## Port or Address to listen on, 0 means disable
|
## Port or Address to listen on, 0 means disable
|
||||||
bind = 1883 ## or with an IP e.g. "127.0.0.1:1883"
|
bind = 1883 ## or with an IP e.g. "127.0.0.1:1883"
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
##--------------------------------------------------------------------
|
## MQTT over WebSocket (HTTP) Listener
|
||||||
## WebSocket Listener
|
|
||||||
##
|
|
||||||
## Add a WebSocket Listener
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
## The WebSocket listener supports all the fields listed in listeners.tcp.conf.example
|
listeners.ws.my_ws_listener_name {
|
||||||
## only the WebSocket-specific fields are shown here
|
|
||||||
|
|
||||||
## Note: Modifying the 'wsname' to what you need
|
|
||||||
listeners.ws.wsname {
|
|
||||||
## Port or Address to listen on, 0 means disable
|
## Port or Address to listen on, 0 means disable
|
||||||
bind = "0.0.0.0:8083" # or just a port number, e.g. 8083
|
bind = "0.0.0.0:8083" # or just a port number, e.g. 8083
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
##--------------------------------------------------------------------
|
## MQTT over Secured Websocket (HTTPS) Listener
|
||||||
## WSS Listener
|
|
||||||
##
|
|
||||||
## Add a WSS Listener
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
## The WSS listener supports all the fields listed in listeners.ws.conf.example
|
listeners.wss.my_wss_listener_name = {
|
||||||
## only the WSS-specific fields are shown here
|
|
||||||
|
|
||||||
## Note: Modifying the 'wssname' to what you need
|
|
||||||
listeners.wss.wssname {
|
|
||||||
## Port or Address to listen on, 0 means disable
|
## Port or Address to listen on, 0 means disable
|
||||||
bind = 8084 ## or with an IP, e.g. "127.0.0.1:8084"
|
bind = 8084 ## or with an IP, e.g. "127.0.0.1:8084"
|
||||||
enabled = true
|
enabled = true
|
||||||
|
@ -76,11 +66,11 @@ listeners.wss.wssname {
|
||||||
depth = 10
|
depth = 10
|
||||||
|
|
||||||
## Which versions are to be supported
|
## Which versions are to be supported
|
||||||
versions = [tlsv1.3, tlsv1.2]
|
versions = ["tlsv1.3", "tlsv1.2"]
|
||||||
|
|
||||||
## TLS cipher suite names
|
## TLS cipher suite names
|
||||||
## Note: By default, all available suites are supported, you do not need to set this
|
## Note: By default, all available suites are supported, you do not need to set this
|
||||||
ciphers = ["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256"]
|
ciphers = "TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,ECDHE-RSA-AES256-GCM-SHA384"
|
||||||
|
|
||||||
## Allows a client and a server to renegotiate the parameters of the SSL connection on the fly
|
## Allows a client and a server to renegotiate the parameters of the SSL connection on the fly
|
||||||
secure_renegotiate = true
|
secure_renegotiate = true
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
## Log to console
|
||||||
## Log
|
|
||||||
##
|
|
||||||
## Configure the log output location, log level, log file storage path, and parameters
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
log.console {
|
log.console {
|
||||||
## set true to enable this
|
## set true to enable this
|
||||||
|
|
|
@ -1,21 +1,14 @@
|
||||||
##--------------------------------------------------------------------
|
## Log to file
|
||||||
## Log
|
|
||||||
##
|
|
||||||
## Configure the log output location, log level, log file storage path, and parameters
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
## The default-enabled log handler can use all the above fields listed fields
|
|
||||||
log.file {
|
log.file {
|
||||||
## use false to disable this
|
## Enable file log handler
|
||||||
enable = true
|
enable = true
|
||||||
|
|
||||||
## Log level
|
## Log level
|
||||||
## Type: debug | info | notice | warning | error | critical | alert | emergency
|
## Type: debug | info | notice | warning | error | critical | alert | emergency
|
||||||
level = warning
|
level = warning
|
||||||
|
|
||||||
## Log formatter, text for free text, and json for structured logging
|
## Log formatter, text for free text, and json for more structured logging
|
||||||
## Type: text | json
|
## Type: text | json
|
||||||
formatter = text
|
formatter = text
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
##--------------------------------------------------------------------
|
## MQTT protocol related settings
|
||||||
## MQTT
|
## Settings in this section is applied globally to all MQTT connections/sessions in this node
|
||||||
##
|
|
||||||
## MQTT configuration
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
mqtt {
|
mqtt {
|
||||||
## After the TCP connection is established,
|
## After the TCP connection is established,
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
## EMQX Node
|
||||||
## Node
|
|
||||||
##
|
|
||||||
## configuring for current EMQX node
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
## Note: all fields in this section are immutable after EMQX started, and most of the time you only need to modify the value for the name and cookie.
|
## Note: all fields in this section are immutable after EMQX started, and most of the time you only need to modify the value for the name and cookie.
|
||||||
node {
|
node {
|
||||||
|
@ -14,29 +8,31 @@ node {
|
||||||
## Note: Make sure the IP resolve from the domain is deterministic and unique and never change
|
## Note: Make sure the IP resolve from the domain is deterministic and unique and never change
|
||||||
name = "emqx@127.0.0.1"
|
name = "emqx@127.0.0.1"
|
||||||
|
|
||||||
## Secret cookie is a random string that should be the same on all nodes in the given EMQX cluster, but unique per EMQX cluster
|
## Secret cookie is a random string that should be the same on all nodes in the cluster, but unique per EMQX cluster
|
||||||
cookie = "Yzc0NGExM2RjYzYxYzM0YzQ5MWQ0NmI1NWM0MWRhMzY4NzgxYmFkMmI2MWJjZWQ5NTQzYTMxNjE1ODVmYmJmMyAgLQo="
|
cookie = "Yzc0NGExM2Rj"
|
||||||
|
|
||||||
## Select a node role
|
## Select a node role
|
||||||
## Type:
|
## Possible values:
|
||||||
## - core :: nodes provide durability of the data, and take care of writes
|
## - core: This is a core node which provides durability of the client states, and takes care of writes
|
||||||
## - replicant :: nodes are ephemeral worker nodes
|
## - replicant: This is a stateless worker node
|
||||||
role = core
|
role = core
|
||||||
|
|
||||||
## Maximum number of simultaneously existing processes for this Erlang system
|
## Maximum number of simultaneously existing processes for this Erlang system
|
||||||
## Type: Range from 1024 to 134217727
|
|
||||||
process_limit = 2097152
|
process_limit = 2097152
|
||||||
|
|
||||||
## Maximum number of simultaneously existing ports for this Erlang system
|
## Maximum number of simultaneously open files and sockets for this Erlang system
|
||||||
## Type: Range from 1024 to 134217727
|
|
||||||
max_ports = 1048576
|
max_ports = 1048576
|
||||||
|
|
||||||
## Erlang's distribution buffer busy limit in kilobytes
|
## Erlang's distribution buffer busy limit in kilobytes.
|
||||||
## Type: Range from 1 to 2097152
|
## Range from 1 to 2097152
|
||||||
dist_buffer_size = 8192
|
dist_buffer_size = 8192
|
||||||
|
|
||||||
## Path to the persistent data directory
|
## NOTE: keep this the same for all nodes in the cluster.
|
||||||
data_dir = "var/emqx/data"
|
## Path to the persistent data directory.
|
||||||
|
## This config is pre-filled when the EMQX distribution package is built.
|
||||||
|
## You are advised to use the default value.
|
||||||
|
#data_dir = "data" # when running a zip package or in docker container
|
||||||
|
#data_dir = "/var/lib/emqx" # when installed from deb/rpm packages
|
||||||
|
|
||||||
## Type: Periodic garbage collection interval
|
## Type: Periodic garbage collection interval
|
||||||
global_gc_interval = 15m
|
global_gc_interval = 15m
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
## Plugin management
|
||||||
## Plugin
|
|
||||||
##
|
|
||||||
## Manage EMQX plugins
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
plugin {
|
plugin {
|
||||||
## Plugins declaration
|
## Plugins declaration
|
||||||
## Note: The plugins are started in the defined order
|
## Note: The plugins are started in the defined order
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
## Prometheus push-gateway integration
|
||||||
|
|
||||||
|
## EMQX's Prometheus scraping endpoint is enabled by default without authentication.
|
||||||
|
## e.g. curl -f "127.0.0.1:18083/api/v5/prometheus/stats"
|
||||||
|
## If you want to use push-gateway
|
||||||
|
|
||||||
|
prometheus {
|
||||||
|
## Set to true to make EMQX send metrics to push-gateway
|
||||||
|
enable = false
|
||||||
|
|
||||||
|
## URL of push-gateway server
|
||||||
|
push_gateway_server = "http://127.0.0.1:9091"
|
||||||
|
|
||||||
|
## Data push interval
|
||||||
|
interval = 15s
|
||||||
|
|
||||||
|
## A HTTP Headers when pushing to Push-gateway
|
||||||
|
headers = {
|
||||||
|
Authorization = "some-authz-tokens",
|
||||||
|
Connection = "keep-alive"
|
||||||
|
}
|
||||||
|
|
||||||
|
## Job Name that is pushed to the Push-gateway
|
||||||
|
## Available variable:
|
||||||
|
## - ${name}: Name of EMQX node
|
||||||
|
## - ${host}: Host name of EMQX node
|
||||||
|
job_name = "${name}/instance/${name}~${host}"
|
||||||
|
}
|
|
@ -1,28 +1,10 @@
|
||||||
##--------------------------------------------------------------------
|
## Prometheus push-gateway integration
|
||||||
## Prometheus
|
|
||||||
##
|
## EMQX's Prometheus scraping endpoint is enabled by default without authentication.
|
||||||
## Settings for reporting metrics to Prometheus
|
## And there is no way to turn it off.
|
||||||
##--------------------------------------------------------------------
|
## You can inspect it with a curl command: curl -f "127.0.0.1:18083/api/v5/prometheus/stats"
|
||||||
|
|
||||||
prometheus {
|
prometheus {
|
||||||
## URL of Prometheus server
|
# turn off this expensive collector
|
||||||
push_gateway_server = "http://127.0.0.1:9091"
|
vm_dist_collector = disabled
|
||||||
|
|
||||||
## Data reporting interval
|
|
||||||
interval = 15s
|
|
||||||
|
|
||||||
## A HTTP Headers when pushing to Push Gateway.
|
|
||||||
headers = {
|
|
||||||
Authorization = "some-authz-tokens",
|
|
||||||
Connection = "keep-alive"
|
|
||||||
}
|
|
||||||
|
|
||||||
## Job Name that is pushed to the Push Gateway.
|
|
||||||
## Available variable:
|
|
||||||
## - ${name}: Name of EMQX node
|
|
||||||
## - ${host}: Host name of EMQX node
|
|
||||||
job_name = "${name}/instance/${name}~${host}"
|
|
||||||
|
|
||||||
## set to false to enable this
|
|
||||||
enable = true
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Pre-Shared Keys authentication
|
## Pre-Shared Keys authentication
|
||||||
##
|
|
||||||
## Config to enable TLS-PSK authentication
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
psk_authentication {
|
psk_authentication {
|
||||||
## set to false to disable
|
## Set to false to disable
|
||||||
enable = true
|
enable = true
|
||||||
|
|
||||||
## If init_file is specified, EMQX will import PSKs from the file into the built-in database at startup for use by the runtime
|
## If init_file is specified, EMQX will import PSKs from the file into the built-in database at startup for use by the runtime
|
||||||
|
|
|
@ -3,20 +3,12 @@
|
||||||
##
|
##
|
||||||
## Configuration related to handling PUBLISH packets with a retain flag set to 1
|
## Configuration related to handling PUBLISH packets with a retain flag set to 1
|
||||||
##--------------------------------------------------------------------
|
##--------------------------------------------------------------------
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
retainer {
|
retainer {
|
||||||
## set to false to disable this
|
## set to false to disable retainer
|
||||||
enable = true
|
enable = true
|
||||||
|
|
||||||
## Message retention time. 0 means message will never be expired
|
## Maximum message size allowed
|
||||||
msg_expiry_interval = 0s
|
|
||||||
|
|
||||||
## Periodic interval for cleaning up expired messages. Never clear if the value is 0
|
|
||||||
msg_clear_interval = 0s
|
|
||||||
|
|
||||||
## Maximum retained message size
|
|
||||||
max_payload_size = 1MB
|
max_payload_size = 1MB
|
||||||
|
|
||||||
## When the retained flag of the PUBLISH message is set and Payload is empty, whether to continue to publish the message
|
## When the retained flag of the PUBLISH message is set and Payload is empty, whether to continue to publish the message
|
||||||
|
@ -27,10 +19,10 @@ retainer {
|
||||||
|
|
||||||
## Retained messages store backend
|
## Retained messages store backend
|
||||||
backend {
|
backend {
|
||||||
## Backend type
|
## Built-in database (Mnesia)
|
||||||
type = built_in_database
|
type = built_in_database
|
||||||
|
|
||||||
## Specifies whether the messages are stored in RAM or persisted on disc
|
## Specifies whether the messages are stored in RAM or persisted on disk
|
||||||
## Type: enum: ram | disc
|
## Type: enum: ram | disc
|
||||||
storage_type = ram
|
storage_type = ram
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## System Topic
|
## System Topic
|
||||||
##
|
|
||||||
## Publishing client lifecycle events to "$SYS" topics
|
## Publishing client lifecycle events to "$SYS" topics
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
sys_topics {
|
sys_topics {
|
||||||
## Time interval of publishing `$SYS` messages
|
## Time interval of publishing `$SYS` messages
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
## System Monitoring of the host machine
|
||||||
## System Monitoring For System
|
|
||||||
##
|
|
||||||
## System monitoring and introspection
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
sysmon.os {
|
sysmon.os {
|
||||||
## Time interval for the periodic CPU check
|
## Time interval for the periodic CPU check
|
||||||
|
@ -17,9 +11,9 @@ sysmon.os {
|
||||||
cpu_low_watermark = 60%
|
cpu_low_watermark = 60%
|
||||||
|
|
||||||
## Time interval for the periodic memory check
|
## Time interval for the periodic memory check
|
||||||
## Type:
|
## Possible values:
|
||||||
## - disabled :: Never check
|
## disabled: Never check
|
||||||
## - Time Duration :: The time period
|
## Duration: Check every Duration
|
||||||
mem_check_interval = 60s
|
mem_check_interval = 60s
|
||||||
|
|
||||||
## For how much system memory can be allocated before the corresponding alarm is raised
|
## For how much system memory can be allocated before the corresponding alarm is raised
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## System Monitoring For Erlang VM
|
## System Monitoring For Erlang VM
|
||||||
##
|
|
||||||
## System monitoring and introspection
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## Note: This is an example of how to configure this feature
|
|
||||||
## you should copy and paste the below data into the emqx.conf for working
|
|
||||||
|
|
||||||
sysmon.vm {
|
sysmon.vm {
|
||||||
## Time interval for the periodic process limit check
|
## Time interval for the periodic process limit check
|
||||||
|
@ -25,7 +19,7 @@ sysmon.vm {
|
||||||
## Generating an alarm is generated when the Erlang VM detect a task scheduled for too long
|
## Generating an alarm is generated when the Erlang VM detect a task scheduled for too long
|
||||||
## Type:
|
## Type:
|
||||||
## - disabled :: Never alarm
|
## - disabled :: Never alarm
|
||||||
## - Time During :: The maximum schedule time for generating an alarm
|
## - Duration:: The maximum schedule time for generating an alarm
|
||||||
long_schedule = 240ms
|
long_schedule = 240ms
|
||||||
|
|
||||||
## Generating an alarm when an Erlang process consumed a large amount of memory for its heap space
|
## Generating an alarm when an Erlang process consumed a large amount of memory for its heap space
|
||||||
|
|
|
@ -135,7 +135,7 @@ log_overload_kill_restart_after.label:
|
||||||
"""Handler Restart Timer"""
|
"""Handler Restart Timer"""
|
||||||
|
|
||||||
log_file_handler_max_size.desc:
|
log_file_handler_max_size.desc:
|
||||||
"""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."""
|
"""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 `rotation_size` in bytes."""
|
||||||
|
|
||||||
log_file_handler_max_size.label:
|
log_file_handler_max_size.label:
|
||||||
"""Rotation Size"""
|
"""Rotation Size"""
|
||||||
|
@ -514,15 +514,13 @@ cluster_autoclean.label:
|
||||||
|
|
||||||
process_limit.desc:
|
process_limit.desc:
|
||||||
"""Maximum number of simultaneously existing processes for this Erlang system.
|
"""Maximum number of simultaneously existing processes for this Erlang system.
|
||||||
The actual maximum chosen may be much larger than the Number passed.
|
|
||||||
For more information, see: https://www.erlang.org/doc/man/erl.html"""
|
For more information, see: https://www.erlang.org/doc/man/erl.html"""
|
||||||
|
|
||||||
process_limit.label:
|
process_limit.label:
|
||||||
"""Erlang Process Limit"""
|
"""Erlang Process Limit"""
|
||||||
|
|
||||||
max_ports.desc:
|
max_ports.desc:
|
||||||
"""Maximum number of simultaneously existing ports for this Erlang system.
|
"""Maximum number of simultaneously open files and sockets for this Erlang system.
|
||||||
The actual maximum chosen may be much larger than the Number passed.
|
|
||||||
For more information, see: https://www.erlang.org/doc/man/erl.html"""
|
For more information, see: https://www.erlang.org/doc/man/erl.html"""
|
||||||
|
|
||||||
max_ports.label:
|
max_ports.label:
|
||||||
|
|
|
@ -21,13 +21,15 @@ mnesia_collector.desc:
|
||||||
"""Enable or disable Mnesia collector, collects Mnesia metrics mainly using mnesia:system_info/1 ."""
|
"""Enable or disable Mnesia collector, collects Mnesia metrics mainly using mnesia:system_info/1 ."""
|
||||||
|
|
||||||
prometheus.desc:
|
prometheus.desc:
|
||||||
"""Settings for reporting metrics to Prometheus"""
|
"""EMQX's Prometheus scraping endpoint is enabled by default without authentication.
|
||||||
|
You can inspect it with a `curl` command like this: `curl -f "127.0.0.1:18083/api/v5/prometheus/stats"`<br/>
|
||||||
|
The 'enable' flag is used to turn on and off for the push-gateway integration."""
|
||||||
|
|
||||||
prometheus.label:
|
prometheus.label:
|
||||||
"""Prometheus"""
|
"""Prometheus"""
|
||||||
|
|
||||||
push_gateway_server.desc:
|
push_gateway_server.desc:
|
||||||
"""URL of Prometheus server"""
|
"""URL of Prometheus server. Pushgateway is optional, should not be configured if prometheus is to scrape EMQX."""
|
||||||
|
|
||||||
vm_dist_collector.desc:
|
vm_dist_collector.desc:
|
||||||
"""Enable or disable VM distribution collector, collects information about the sockets and processes involved in the Erlang distribution mechanism."""
|
"""Enable or disable VM distribution collector, collects information about the sockets and processes involved in the Erlang distribution mechanism."""
|
||||||
|
|
|
@ -34,11 +34,11 @@ mnesia_config_type.desc:
|
||||||
"""Backend type."""
|
"""Backend type."""
|
||||||
|
|
||||||
msg_clear_interval.desc:
|
msg_clear_interval.desc:
|
||||||
"""Periodic interval for cleaning up expired messages.
|
"""Interval for EMQX to scan expired messages and delete them. Never scan if the value is 0."""
|
||||||
Never clear if the value is 0."""
|
|
||||||
|
|
||||||
msg_expiry_interval.desc:
|
msg_expiry_interval.desc:
|
||||||
"""Message retention time. 0 means message will never be expired."""
|
"""Message retention time. This config is only applicable for messages without the Message Expiry Interval message property.
|
||||||
|
0 means message will never expir."""
|
||||||
|
|
||||||
stop_publish_clear_msg.desc:
|
stop_publish_clear_msg.desc:
|
||||||
"""When the retained flag of the `PUBLISH` message is set and Payload is empty,
|
"""When the retained flag of the `PUBLISH` message is set and Payload is empty,
|
||||||
|
|
Loading…
Reference in New Issue