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.conf file.
  • To change the Service plugin, by providing a custom configuration in fluent-bit-service.conf file.
  • To change the log patterns, define a custom parser inside the parsers_custom.conf file and then modify the corresponding log-file configuration 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 the fluent-bit.conf file.

    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_log
    
    Define the mylog_single_line in the parsers_custom.conf file, as shown:
    [PARSER]
        Name    mylog_single_line
        Format  regex
        Regex   /regex/
        Time_Key    date
        Time_Format %Y/%m/%d %H:%M:%S
    
    Then, modify the fluent-bit.conf file 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.