Lab 017 - Logging with Fluentd¶
This lab demonstrates how to use Fluentd with Docker to collect and manage logs from Docker containers, Docker events, and syslog.
Prerequisites¶
- Docker installed and running
- Basic understanding of Docker and logging concepts
Overview¶
Fluentd is an open-source data collector that provides a unified logging layer. In this lab, we’ll:
- Set up Fluentd as a logging driver for Docker containers
- Collect Docker events using Fluentd
- Configure syslog input for Fluentd
Demo Scripts¶
demo.sh: Main demo script showing Fluentd setup with Docker loggingfluentd.conf: Fluentd configuration filedocker-compose.yml: Docker Compose file to run Fluentd
Running the Demo¶
- Make sure Docker is running
- Run the demo script:
./demo.sh - Follow the on-screen instructions
Key Concepts¶
- Fluentd Logging Driver: Docker can send container logs directly to Fluentd
- Docker Events: System events from Docker daemon (container start/stop, etc.)
- Syslog Input: Fluentd can receive syslog messages from various sources
Cleanup¶
After the demo, run: