Add simple Logstash adapter#64
Conversation
There was a problem hiding this comment.
I see, it's a global. Maybe set this up as a field of the adapter object and do this in its constructor.
|
@progrium Updated with more Docker fields, similar to the fields in https://github.com/digital-wonderland/docker-logstash-forwarder. |
|
Why do you think JSON+UDP should be the canonical way logspout should send logs to logstash? |
|
I think UPD should be the default because it's faster for streaming logs, and there can be a lot from some docker containers. For more info: https://github.com/dwbutler/logstash-logger#what-type-of-logger-should-i-use |
|
Maybe it should just be called a JSON adapter then? |
|
Does this satisfy your use? |
|
I think your JSON adapter is a pretty cool implementation, but I would like to have both! My implementation is focused on performance as this is more important in our use case. |
|
I recommend putting this adapter in its own repo and building logspout On Friday, March 27, 2015, Max Persson notifications@github.com wrote:
Jeff Lindsay |
|
Sure, are there any guidelines on how to do that? |
|
The repo name should be prefixed with Depending on how often you might change it and to what degree, I recommend versioning/tagging with gopkg.in conventions. This way people can use that for pinning if they wish. |
|
Will this be added to gliderlabs/logspout/modules.go or to my own fork? |
|
Anybody's fork. We'll list it as a third-party module in the readme. |
|
What I meant was when using logspout; will I be able to run your container with my module referenced in it, or would I create and push my own container from my own fork using my adapter? |
|
For now you need your own container fork. Eventually you can dynamically load modules at container boot. |
|
Ok, thanks for the info. |
|
This might make it easier for you: https://github.com/gliderlabs/logspout/pull/66/files |
|
I created a custom module instead, available here https://github.com/looplab/logspout-logstash. Closing this PR. |
This adds a simpler version of the Logstash UDP adapter created in github.com/gliderlabs/logspout.