FluentBit to SigNoz

If you use FluentBit to collect logs in your stack, this tutorial will guide you on how to send logs from FluentBit to SigNoz.

At SigNoz, we use the OpenTelemetry Collector to receive logs, which supports the FluentForward protocol. You can forward logs from your FluentBit agent to the OpenTelemetry Collector using this protocol.

Collect Logs Using FluentBit in SigNoz Cloud

  1. Add OpenTelemetry Collector binary to your VM: Follow this guide.

  2. Add FluentForward receiver to your config.yaml:

    receivers:
      fluentforward:
        endpoint: 0.0.0.0:24224
    

    Here, port 24224 is used for listening to the FluentForward protocol. You can change it to a port of your choice. Learn more about the FluentForward receiver here.

  3. Modify your config.yaml to include the receiver:

    service:
      ...
      logs:
        receivers: [otlp, fluentforward]
        processors: [batch]
        exporters: [otlp]
    
  4. Update FluentBit configuration to forward logs to the OpenTelemetry Collector:

    [OUTPUT]
      Name          forward
      Match         *
      Host          localhost
      Port          24224
    
    • This configuration forwards logs to the OpenTelemetry Collector listening on port 24224.
    • If FluentBit is not running on the same host, replace localhost with the appropriate host value.
  5. Restart FluentBit and OpenTelemetry Collector.

  6. Use processors to transform logs: To properly transform your existing log model into the OpenTelemetry log model, use OpenTelemetry processors:

    processors:
      logstransform:
        operators:
          - type: trace_parser
            trace_id:
              parse_from: attributes.trace_id
            span_id:
              parse_from: attributes.span_id
          - type: remove
            field: attributes.trace_id
          - type: remove
            field: attributes.span_id
    

Was this page helpful?