githubEdit

Fluentd

Fluentd and Fluent Bit

Fluentd

Introduction

...

Deploy By Binary

Quick Start

# Ubuntu Package install
# https://docs.fluentd.org/installation/install-by-deb

Config and Boot

Fluentd Config

# change storage permission
# td-agent
chown td-agent.td-agent /opt/log_path/ -R
# fluentd
chown _fluentd:_fluentd /opt/log_path/ -R

# boot
systemctl daemon-reload
systemctl start td-agent.service
systemctl enable td-agent.service

Verify

Troubleshooting

Deploy By Container

Run On Kubernetes

Fluent Bit

Introduction

Fluent Bit is an open-source, multi-platform log processor tool designed to be a versatile solution for log processing and distribution. Today, the number of information sources in systems is continuously increasing. Handling large-scale data is complex, and collecting and aggregating various data requires a specialized tool that can address the following challenges:

  • Different data sources

  • Different data formats

  • Data reliability

  • Security

  • Flexible routing

  • Multiple destinations Fluent Bit was designed with high performance and low resource consumption in mind.

Differences between Fluent Bit & Fluentd Both Fluentd and Fluent Bit can serve as aggregators or forwarders, and they can be used complementarily or independently as solutions. Detailsarrow-up-right

Deploy By Binary

Deploy By Container

Kubernetes manages a cluster of nodes, so our log agent tool needs to run on every node to collect logs from each POD. Therefore, Fluent Bit is deployed as a DaemonSet (a POD that runs on every node in the cluster). When Fluent Bit runs, it reads, parses, and filters logs from each POD, and enriches each record with the following metadata:

  • Pod Name

  • Pod ID

  • Container Name

  • Container ID

  • Labels

  • Annotations

Log Output Methods

Container logs in the current cluster environment are all console output, divided into two parts:

  • Output to Elasticsearch, for searching logs via the Kibana frontend.

  • Output to the forward interface, provided by the fluentd service for log persistence, with 15 days of local storage and 3 months of log archiving to cloud storage (e.g., S3, GCS, OSS).

Download Helm Charts Package

Configuration and Startup

Quick deployment of fluent-bit & ES services (for testing environments only)

OUTPUT Plugin Service Configuration

Elasticsearch Configuration

Logstash Configuration

Reference:

Last updated