YAML Configuration Files
While we have added support for configuration via YAML files in 6.3.0, the default method of configuration remains the use of environment variables set in the systemd unit file for the collector daemon. For example, /etc/systemd/system/flowcoll.service.d/flowcoll.conf
for the Unified Flow Collector binary flowcoll.
Beginning with 6.4.0 the default configuration method will be via YAML files, as described on this page. You should either transition to the use of YAML files prior to upgrading to the future 6.4.0
release, or plan to disable the YAML configuration when you upgrade to a post-6.3.x
release.
ElastiFlow now supports YAML configuration files for all binaries, with a default file location of /etc/elastiflow/<binary_name>.yml
. These YAML files are compatible with all existing ElastiFlow settings, which are documented in the Configuration Reference.
Although environment variables are still available for configuring the collector, the systemd attributes file may be removed in future releases.
To use a YAML file for configuration, either place it in the default location or specify a custom location with the --config
or -c
flag when running the binary:
./flowcoll --config=/etc/elastiflow/flowcoll.yml
or
./flowcoll -c=/etc/elastiflow/flowcoll.yml
Implementing YAML Configuration
This example demonstrates configuring logging settings for the ElastiFlow flow-collector binary using a flowcoll.yml
file:
-
Create a new file called
flowcoll.yml
with the following content.EF_LOGGER_LEVEL: 'info'
EF_LOGGER_ENCODING: 'json'
EF_LOGGER_FILE_LOG_ENABLE: true
EF_LOGGER_FILE_LOG_FILENAME: '/var/log/elastiflow/flowcoll/flowcoll.log'
EF_LOGGER_FILE_LOG_MAX_SIZE: 100
EF_LOGGER_FILE_LOG_MAX_AGE: 7
EF_LOGGER_FILE_LOG_MAX_BACKUPS: 4
EF_LOGGER_FILE_LOG_COMPRESS: false -
Customize the settings as needed and create additional YAML files for other ElastiFlow binaries if required.
-
Run the flowcoll binary with the
--config
flag, specifying the path to yourflowcoll.yml
file:./flowcoll --config=/path/to/flowcoll.yml
For more information on supported configurations, consult the Configuration Reference