Collect logs from dockerized apps

I have Vector configured to collect logs from other containers using a docker_logs source. But to make it work I need to map docker.sock inside container. It’s easy with docker-compose but I’m now trying to split that docker-compose into separate containers to deploy to Fly.
I checked fly-log-shipper repo but I don’t understand what should be the source of logs in vector config. According to description, log-shipper

will subscribe to a log stream of your organisation’s logs and ship it to various providers

Does it mean I just need to log something from one of my apps directly into stdout and it will automatically be caught by the log-shipper? If so, is it [sources.nats] that performs such a subscription?

Hi @Desprit

When your app logs to stdout it gets captured by fly’s logging infrastructure. Fly uses NATS to pass around log messages. fly-log-shipper subscribes to the NATS messages and sends the logs to your preferred destination (e.g Grafana Cloud Loki, AWS Cloud Watch, DataDog, etc).

All you need to do is run your own instance of fly-log-shipper with the secrets set as outlined in the readme and you should start seeing logs in your preferred destination.

1 Like

I’m falling in love with Fly. Thank you for the reply @charsleysa

1 Like