Giter Site home page Giter Site logo

microsoft / fluentbit-containerd-cri-o-json-log Goto Github PK

View Code? Open in Web Editor NEW
91.0 5.0 19.0 21 KB

Parsing CRI JSON logs with Fluent Bit - applies to fluentbit, kubernetes, containerd and cri-o

License: MIT License

fluentbit containerd cri-o json logging kubernetes

fluentbit-containerd-cri-o-json-log's Issues

ClusterFlow format

Bug Report

Description

As I have not much experience in fluentd, I struggle a bit to translate your docu into a working ClusterFlow config. I figured starting with something like thi

apiVersion: logging.banzaicloud.io/v1beta1
kind: ClusterFlow
metadata:
  name: all-logs
  namespace: cattle-logging-system
  filters:
    - parser:
        key_name: log
        parse:
          expression: >-
            ^(?<time>[^ ]+) (?<stream>stdout|stderr) (?<logtag>[^ ]*)
            (?<log>.*)$
          time_format: '%Y-%m-%dT%H:%M:%S.%L%z'
  globalOutputRefs:
    - cluster-output-splunk

But don't know where to go from there...

Expected Behavior

N/A

Reproduce

N/A

Additional Context

N/A

Logs emitted under `message` instead of `log`

Bug Report

Description

The provided instructions to create a parser for the cri logs results in the creation of a duplicate parser.

Since 1.0, the fluent-bit docker image has included a built-in list of parsers, one of which is the default cri parser.

Attempting to create another parser with the same name as described here results in an error at start-up:

[error] [parser] parser named 'cri' already exists, skip.

This built-in cri parser emits the main contents of the log under the message field, not the log field, which is contradictory to many of the statements provided.

Expected Behavior

The creation of a parser does not generate errors within fluent-bit.
The logs are emitted under the log key, as described.

Reproduce

  1. Take the provided config.yaml and configure a pod running the fluent-bit docker image with a version greater than 1.0.
  2. On start-up the pod should emit a log: [error] [parser] parser named 'cri' already exists, skip.
  3. The logs output by fluent-bit will have the main contents emitted under message instead of `log.

Additional Context

Recommend that the name of the parser specified in this documentation is changed to something like cri-log, as well as the value for Parser under [INPUT].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.