Skip to content

Logging

P. Rouvilllain edited this page May 23, 2024 · 3 revisions

fluentd

Fluentd Configuration {#fluentd-configuration .unnumbered}

Fluentd is configured to listen for incoming log data via the forward input plugin on port 24224. Log data from different sources (minitwit-database, minitwit-service, prometheus, grafana) is matched using the match directive which specifies the destination path and format for the corresponding log data. Log data is buffered using the buffer directive to handle data spikes or network outages, ensuring reliable log collection.

Docker Compose Configuration {#docker-compose-configuration .unnumbered}

A fluentd container is defined using the fluent/fluentd:v1.12-debian image. Each service in the Docker Compose file depends on the fluentd service for logging. Logging is configured to use fluentd as the logging driver, with specific options (fluentd-async-connect, fluentd-retry-wait, fluentd-max-retries) to ensure reliable log transmission. Each service specifies a unique tag to route log data to the appropriate destination, which in our case are simple log files, in fluentd based on the matching rules defined in the fluentd.conf file.

Clone this wiki locally