3 fluent bit
Markus Bergholz edited this page 4 months ago
cmake .. -DFLB_HTTP_SERVER=Yes -DFLB_TLS=Yes -DFLB_SMALL=Yes -DFLB_SIGNV4=No -DFLB_AWS=No -DFLB_OUT_S3=No -DFLB_FILTER_AWS=No -DFLB_OUT_KINESIS_FIREHOSE=No -DFLB_OUT_CLOUDWATCH_LOGS=No

Count Requests

using stream processor

fluent-bit.conf

[SERVICE]
    Flush     1
    Daemon    off
    Log_Level info
    Streams_File stream_processor.conf


[INPUT]
    Name          tail
    Tag           gitea.logs
    Path          /var/log/containers/gitea.log

[FILTER]
    Name record_modifier
    Match gitea.requests
    Record app gitea

[OUTPUT]
    Name          influxdb
    Match  *.requests
    Host          two.osuv.de
    Port          8086
    Database      osuv
    Sequence_Tag  _seq
    Tag_Keys      app

[OUTPUT]
    Name null
    Match gitea.logs

[OUTPUT]
    Name stdout
    Match gitea.requests

stream_processor.conf

fluent-bit -c fluent-bit.conf -T "CREATE STREAM results WITH (tag='gitea.requests') AS SELECT count(*) as requests from TAG:'gitea.logs' WINDOW TUMBLING (60 SECOND);"