Skip to content

Add NATS client as option for publishing container logs#27841

Closed
wallyqs wants to merge 1 commit intomoby:masterfrom
wallyqs:nats-logging-driver
Closed

Add NATS client as option for publishing container logs#27841
wallyqs wants to merge 1 commit intomoby:masterfrom
wallyqs:nats-logging-driver

Conversation

@wallyqs
Copy link

@wallyqs wallyqs commented Oct 27, 2016

This enables the Docker Engine to be able to use a NATS transport for emitting the log entries under a customizable subject via -log-driver nats

docker run --log-driver nats \
       --log-opt nats-servers="nats://demo.nats.io:4222"
       --log-opt tag="docker.{{.ID}}.{{.ImageName}}" your/application

It also supports opt-in TLS custom connections to the server with certificates which the client also supports.

docker run --log-driver nats \
     --log-opt nats-tls-key=/srv/configs/certs/client-key.pem \
     --log-opt nats-tls-cert=/srv/configs/certs/client-cert.pem \
     --log-opt nats-tls-ca-cert=/srv/configs/certs/ca.pem \
     --log-opt nats-servers="tls://127.0.0.1:4223,tls://127.0.0.1:4222" your/application

Docs with example usage are available on branch at:

docker/docs#369

Adding demo below too

nats-docker-logs

Any feedback would be greatly appreciated :)

Signed-off-by: Waldemar Quevedo [email protected]

@wallyqs wallyqs force-pushed the nats-logging-driver branch from 21353b5 to 4f77e52 Compare October 27, 2016 23:39
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Oct 30, 2016
@wallyqs wallyqs force-pushed the nats-logging-driver branch from 777d4c2 to 3741cb1 Compare October 30, 2016 20:54
@GordonTheTurtle GordonTheTurtle removed the dco/no Automatically set by a bot when one of the commits lacks proper signature label Oct 30, 2016
@wallyqs wallyqs force-pushed the nats-logging-driver branch 4 times, most recently from 9daf57e to a2b3dd3 Compare November 7, 2016 01:10
@wallyqs wallyqs force-pushed the nats-logging-driver branch from a2b3dd3 to a8bdcbf Compare November 15, 2016 17:41
@cpuguy83
Copy link
Member

Thanks for submitting, we really want to move log drivers out to plugins.
See #28403 for this.
If I can get my stuff together (or if someone else wants to pick up the work!), hopefully we can bring these in for 1.14.

Closing since we really don't want to add another built-in driver right now.
Thanks!

@cpuguy83 cpuguy83 closed this Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants