Skip to content

sevir/logging-with-fluentbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logging with Fluent-bit and different languages

Running fluent-bit configuration with docker

Simply run docker-compose up in the root repo

The configuration for fluent-bit is fluentbit/etc/fluent-bit.conf, in this example all inputs are redirected to standard output.

The input selected for fluentbit is TCP Json Socket because is more standard than fluent protocol. The most known languages are libraries for logging into a tcp socket so this solution it must work with many languages.

Running example for Node.JS

This example is tested on NodeJS >9.x with

npm install
node --experimental-modules test-fluent.mjs

Running example for PHP

This example is tested on PHP 7.x

composer install
php test-fluent.php

Running example for Ruby

This example is tested on Ruby 2.5+

sudo gem install bundler
bundle install --path vendor
ruby test-fluent.rb

Configuration for JAVA

Configure log4j2 with the XML

Sorry I can't make an example, my knowledge with JAVA is very poor

Useful info for Log4j with SocketAppender in Log Aggregation

About

Useful tips for logging to fluentbit TCP socket with Ruby, NodeJS, PHP, Groovy and JAVA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •