Search code examples
fluentdopen-telemetryfluent-bit

Can't see logs coming from fluent forward receiver


I am trying to collect application level logs using fluent-bit, I want to listen these logs on otel-collector-contrib

I am generating dummy logs for testing using the command given below docker run --log-driver=fluentd -t ubuntu echo "Testing a log message"

Here, I am expecting my collector to show the logs on terminal because I have set the loglevel to debug


Git Repo Link : https://github.com/Bhogayata-Keval/fluentbit-demo.git


Did some debugging and found that issue is failed to parse forward mode event: unknown type of value: 1655265172 at Time at Time at Entries/0

Also found that current timestamp is going as uint64 where expected is int64.

How to typecast timestamp to integer. Time_as_Integer property of [OUTPUT] does not seem to work.


Solution

  • test_agent_log_generate:
        image: httpd
        ports:
          - "80:80"
        logging:
          driver: "fluentd"
          options:
            fluentd-address: https://localhost:8006
            tag: httpd.access
        command: /bin/bash -c "while sleep 2; do  echo \"Testing a log message\"; done"
    

    Directly sending data to otel-endpoint like this worked ! Using forward plugin as both, input and output -- was somehow sending timestamp into uint64 format, which is not acceptable for fluentforwardreceiver