Configuration
eKuiper configuration is based on yaml file and allow to configure by updating the file, environment variable and REST API.
Configuration Scope
eKuiper configurations include
etc/kuiper.yaml
: global configuration file. Make change to it need to restart the eKuiper instance. Please refer to basic configuration file for detail.etc/sources/${source_name}.yaml
: the configuration file for each source to define the default properties (except MQTT source, whose configuration file isetc/mqtt_source.yaml
). Please refer to the doc for each source for detail. For example, MQTT source and Neuron source covers the configuration items.etc/connections/connection.yaml
: shared connection configuration file.
Configuration Methods
Users can set the configuration through 3 methods order by precedence.
- Management Console/REST API
- Environment variables
- Yaml files in etc folder.
The yaml files usually be used to set up the default configurations. It can be heavily use when deploy in bare metal and the user can access the file system easily.
When deploying in docker or k8s, it is not easy enough to manipulate files, small amount of configurations can then be set or override by environment variables. And in runtime, end users will use management console to change the configurations dynamically. The Configuration
page in the eKuiper manager can help users to modify the configurations visually.
Environment variable syntax
There is a mapping from environment variable to the configuration yaml file. When modifying configuration through environment variables, the environment variables need to be set according to the prescribed format, for example:
KUIPER__BASIC__DEBUG => basic.debug in etc/kuiper.yaml
MQTT_SOURCE__DEMO_CONF__QOS => demo_conf.qos in etc/mqtt_source.yaml
EDGEX__DEFAULT__PORT => default.port in etc/sources/edgex.yaml
CONNECTION__EDGEX__REDISMSGBUS__PORT => edgex.redismsgbus.port int etc/connections/connection.yaml
The environment variables are separated by "__", the content of the first part after the separation matches the file name of the configuration file, and the remaining content matches the different levels of the configuration items. The file name could be KUIPER
and MQTT_SOURCE
in the etc
folder; or CONNECTION
in etc/connection
folder. Otherwise, the file should in etc/sources
folder.
command line parameters
eKuiper supports importing configuration from command line parameters, as follows:
configuration name | type | configuration role |
---|---|---|
loadFileType | string | Set the way to load files, support "relative" and "absolute" |
etc | string | Set absolute path of etc directory, only valid when loadFileType is "absolute" |
data | string | Set the absolute path of the data directory, only valid when loadFileType is "absolute" |
log | string | Set the absolute path of the log directory, only valid when loadFileType is "absolute" |
plugins | string | Set the absolute path of the plugins directory, only valid when loadFileType is "absolute" |
example:
./bin/kuiperd -loadFileType absolute -etc /etc/kuiper