# GoChat Fluentd Configuration # Reference: Chatwoot production uses structured JSON logging # This config collects logs from gochat containers and forwards to outputs @type tail path /var/log/gochat/*.log pos_file /var/log/fluentd/gochat.log.pos tag gochat.app @type json time_key timestamp time_format %Y-%m-%dT%H:%M:%S.%NZ keep_time_key true @type tail path /var/log/gochat/worker.log pos_file /var/log/fluentd/gochat-worker.log.pos tag gochat.worker @type json time_key timestamp time_format %Y-%m-%dT%H:%M:%S.%NZ keep_time_key true # Docker container logs via systemd/journald @type systemd filters [{ "_COMM": "docker" }] tag docker # ---- Outputs ---- # Console output for development @type stdout # Production: send to Elasticsearch or Loki # Uncomment based on your backend: # # # @type elasticsearch # host elasticsearch # port 9200 # logstash_format true # logstash_prefix gochat # # @type file # path /var/log/fluentd/buffers/gochat # flush_interval 5s # # # # # @type loki # url http://loki:3100 # labels { "app": "gochat", "environment": "production" } #