[SERVICE]
    Flush        1
    Log_Level    info

[INPUT]
    Name         systemd
    Tag          host.*
    Path         /var/log/journal
    DB           {{ z_mount_workdir }}/fluentbit-journal.db

{% if not z_fb_receiver %}
[OUTPUT]
    Name         forward
    Match        *
    Host         {{ logs_node_addr }}
    Port         24224
    TLS          On
    TLS.verify   On
    TLS.ca_file  {{ z_mount_cert_ca_file }}
    TLS.crt_file {{ z_mount_cert_func_pub }}
    TLS.key_file {{ z_mount_cert_func_key }}
{% endif %}

{% if z_fb_receiver %}
[INPUT]
    Name              forward
    Port              24224
    Listen            0.0.0.0
    tls               On
    tls.crt_file     {{ z_mount_cert_func_pub }}
    tls.key_file      {{ z_mount_cert_func_key }}
    tls.ca_file       {{ z_mount_cert_ca_file }}
    tls.verify        On

[OUTPUT]
    Name            file
    Match           *
    Path            {{ z_mount_workdir }}/
    File            all-logs.log
    Format          plain
{% endif %}
