Myles McDonnell
Myles McDonnell

Reputation: 13335

Shipping stdout and stderr to Logstash

We have a bunch of services, deployed on Mesos via docker containers, that log to stdout and stderr. We are now introducing ELK and so need to ship this log data to Logstash.

One solution I am considering is to have a wrapper process that starts the service process, catches stdout and stderr and writes that to a file (which is truncated over time) and have FileBeat ship that file to LogStash. Feels like I might be re-inventing a wheel thought, is there a more direct way to achieve the same thing?

Upvotes: 1

Views: 2413

Answers (1)

Myles McDonnell
Myles McDonnell

Reputation: 13335

I wrote this which is perfect for my use case: https://github.com/myles-mcdonnell/procwrap

Upvotes: 1

Related Questions