Skip to main content
Version: 7.14

YAML Configuration Files

ElastiFlow supports YAML configuration files for all binaries. 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, specify a path with the --config or -c flag when running the binary. There is no default, but the recommended location is /etc/elastiflow/<binary-name>.yml:

./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:

  1. 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
  2. Customize the settings as needed and create additional YAML files for other ElastiFlow binaries if required.

  3. Run the flowcoll binary with the --config flag, specifying the path to your flowcoll.yml file:

    ./flowcoll --config=/path/to/flowcoll.yml

For more information on supported configurations, consult the Configuration Reference