Variables
Calyptia Fluent Bit supports the usage of environment variables in any value associated to a key when using a configuration file.
The variables are case sensitive and can be used in the following format:
When Calyptia Fluent Bit starts, the configuration reader will detect any request for ${MY_VARIABLE}
and will try to resolve its value.
When Calyptia Fluent Bit is running under systemd (using the official packages), environment variables can be set in the following files:
/etc/default/calyptia-fluent-bit
(Debian based system)/etc/sysconfig/calyptia-fluent-bit
(Others)
These files are ignored if they do not exist.
Example
Create the following configuration file (calyptia-fluent-bit.conf
):
Open a terminal and set the environment variable:
The above command set the 'stdout' value to the variable
MY_OUTPUT
.
Run Calyptia Fluent Bit with the recently created configuration file:
As you can see the service worked properly as the configuration was valid.
Last updated