Customize Fluent Bit
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
You can customize Fluent Bit by making changes to the configuration files located in the
/etc/fluent-bit/ directory. For example, you can do the
following:
- To change the Output plugin, by providing a custom
configuration in
fluent-bit-output.conffile. - To change the Service plugin, by providing a custom
configuration in
fluent-bit-service.conffile. - To change the log patterns, define a custom parser inside the
parsers_custom.conffile and then modify the correspondinglog-fileconfiguration to point to the custom parser. - If the PAS for OpenEdge application is generating additional log files,
stream it to the STDOUT. To do that, add a new Input Fluent Bit configuration
for that log file at
/etc/fluent-bit/and include that configuration in thefluent-bit.conffile.For example, there is an extra log file at
/psc/wrk/logs/mylog.log.Create an input configuration file,io_mylog.conf, with following content:[INPUT] Name tail path /psc/wrk/logs/mylog.log Path_Key logfilepath Tag mylog_tag Parser mylog_single_line [FILTER] Name record_modifier Match mylog_tag record logtype mylog_logDefine themylog_single_linein theparsers_custom.conffile, as shown:[PARSER] Name mylog_single_line Format regex Regex /regex/ Time_Key date Time_Format %Y/%m/%d %H:%M:%SThen, modify thefluent-bit.conffile to include this configuration:@INCLUDE io_mylog.conf
Note: If you customize the default logging configuration of PAS for
OpenEdge, change the Fluent Bit configurations.
Using the deployment scripts, you can add the changed configuration files or
provide the complete set of configuration files in the ./deploy/conf/logging folder.
Note: You can use these configurations in a PAS for OpenEdge, also and the
output can be streamed to Elasticsearch or a similar service instead of
STDOUT.