DEV Community

Discussion on: Docker centralized logging using Fluent Bit, Grafana and Loki

Collapse
 
thaodt profile image
Amidamaru

hi @viyet, currently i have 3 servers setup load balancer, and my app is running 3 those servers. So how do i centralize all logs from them and forward to this dashboard monitoring? Can you tell me more details?

Collapse
 
thakkaryash94 profile image
Yash Thakkar • Edited

Hello @Amidamaru Rookie, you need to setup fluent-bit and grafana on one instance, it can be the existing or a new instance. Here are the links on how to do it.

Note: ignore the external network part from docker-compose.

github.com/thakkaryash94/docker-gr...
github.com/thakkaryash94/docker-gr...

Then forward your server container logs to it using docker log driver like below.

version: "3"

services:
  app:
    image: thakkaryash94/express-example:latest
    container_name: express-app
    logging:
      driver: fluentd
      options:
        fluentd-address: FLUENT_BIT_SERVER_IP_ADDRESS:24224
Enter fullscreen mode Exit fullscreen mode