DEV Community

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

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