Piotr Synowiec
Piotr Synowiec
~1 min read

Categories

Tags

Requirements

Configuration

  • I created a parsers.conf file to have option to add custom parsers. FIle is basically a copy from fluent-bit github repository. File location /addon_configs/144431fc_fluent_bit/parsers.conf, Link to the file in Resources
  • If you do not need custom parsers and parser.conf file, skip file creation and remove Parsers_File line from SERVICE definition
  • Create /addon_configs/144431fc_fluent_bit/fluent_bit.conf

fluent_bit.conf

[SERVICE]
    Flush           1
    Log_Level       info
    Parsers_File    /config/parsers.conf


[INPUT]
    Name systemd
    Path /var/log/journal
    DB /data/fluent-bit.db

[FILTER]
    name   grep
    match  *

    exclude SYSLOG_IDENTIFIER addon_144431fc_fluent_bit
    exclude SYSLOG_IDENTIFIER addon_45df7312_zigbee2mqtt
    exclude SYSLOG_IDENTIFIER kernel
    exclude SYSLOG_IDENTIFIER audit
    exclude SYSLOG_IDENTIFIER NetworkManager
    exclude SYSLOG_IDENTIFIER systemd
    exclude SYSLOG_IDENTIFIER containerd
    exclude SYSLOG_IDENTIFIER qemu-ga
    exclude SYSLOG_IDENTIFIER dockerd
    exclude SYSLOG_IDENTIFIER addon_core_mosquitto


[OUTPUT]
    Name            http
    Match           *
    URI             /api/default/default/_json
    Host            <your OpenObserve host or IP address>
    Port            5080
    tls             Off
    Format          json
    Json_date_key   _timestamp
    Json_date_format iso8601
    HTTP_User       <your OpenObserve user>
    HTTP_Passwd     <your OpenObserve user password>
    compress        gzip

Filter exclude statements are to skip some logs. This can be configured as required

Resources