New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker logs should be able to provide some amount of logs regardless of 3rd party logging driver #30887

Open
dhiltgen opened this Issue Feb 9, 2017 · 13 comments

Comments

Projects
None yet
9 participants
@dhiltgen
Contributor

dhiltgen commented Feb 9, 2017

Description

When users configure a 3rd party logging driver, typically docker logs is unable to report any log output from existing containers. This makes it difficult to troubleshoot problems without having to go into the weeds of the specific 3rd party logging system to extract the logs.

We should find some way to expose some amount of historical logging information from containers regardless of what the logging configuration is, so we can rely on docker logs producing output.

Depending on the chosen model, we might want to expose a knob the user can tweak to control how much logging history is stored when a 3rd party driver that doesn't support read.

@aluzzardi

This comment has been minimized.

Show comment
Hide comment
@aluzzardi
Member

aluzzardi commented Feb 10, 2017

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Feb 10, 2017

Member

Related discussion for AWS logs; #30691

Member

thaJeztah commented Feb 10, 2017

Related discussion for AWS logs; #30691

@dperny

This comment has been minimized.

Show comment
Hide comment
@dperny

dperny Mar 8, 2017

Contributor

Relevant to my interests but outside of my skillset and priorities.

Contributor

dperny commented Mar 8, 2017

Relevant to my interests but outside of my skillset and priorities.

@jwulf

This comment has been minimized.

Show comment
Hide comment
@jwulf

jwulf Apr 2, 2018

A Docker log driver middleware driver would be useful - then you could connect multiple drivers to it.

jwulf commented Apr 2, 2018

A Docker log driver middleware driver would be useful - then you could connect multiple drivers to it.

@jwulf

This comment has been minimized.

Show comment
Hide comment
@jwulf

jwulf Apr 2, 2018

Doesn't look hard to write a logging driver that combines json-log with whatever else you are using: https://github.com/moby/moby/tree/master/daemon/logger

Here's a lower orbit way - an alpine container that uses the json-log driver and listens for GELF logging from your containers, and prints it to stdout. And it forwards your log to whatever log consumer you use.

I think I'll do that first. I did something like that previously: https://github.com/jwulf/Gandelf

jwulf commented Apr 2, 2018

Doesn't look hard to write a logging driver that combines json-log with whatever else you are using: https://github.com/moby/moby/tree/master/daemon/logger

Here's a lower orbit way - an alpine container that uses the json-log driver and listens for GELF logging from your containers, and prints it to stdout. And it forwards your log to whatever log consumer you use.

I think I'll do that first. I did something like that previously: https://github.com/jwulf/Gandelf

@jwulf

This comment has been minimized.

Show comment
Hide comment
@jwulf

jwulf Apr 2, 2018

I updated Gandelf to support streaming logs through to GELF, Azure, Slack, and Seq while logging for inspection locally.

https://github.com/jwulf/Gandelf

If you want another log provider supported, happy to take pull requests.

jwulf commented Apr 2, 2018

I updated Gandelf to support streaming logs through to GELF, Azure, Slack, and Seq while logging for inspection locally.

https://github.com/jwulf/Gandelf

If you want another log provider supported, happy to take pull requests.

@BarnumD

This comment has been minimized.

Show comment
Hide comment
@BarnumD

BarnumD Jul 2, 2018

Agree. We should either be able to have logging go to multiple logging drivers or it should |tee (as on linux) both the primary json driver a secondary driver.

BarnumD commented Jul 2, 2018

Agree. We should either be able to have logging go to multiple logging drivers or it should |tee (as on linux) both the primary json driver a secondary driver.

@dbsanfte

This comment has been minimized.

Show comment
Hide comment
@dbsanfte

dbsanfte Jul 6, 2018

Glaring omission here, using a logging driver should never break docker logs.

dbsanfte commented Jul 6, 2018

Glaring omission here, using a logging driver should never break docker logs.

@cpuguy83

This comment has been minimized.

Show comment
Hide comment
@cpuguy83

cpuguy83 Jul 6, 2018

Contributor

The latest Docker EE engine (18.03.1-ee-1) supports docker logs for any selected logging driver, btw.

Contributor

cpuguy83 commented Jul 6, 2018

The latest Docker EE engine (18.03.1-ee-1) supports docker logs for any selected logging driver, btw.

@rajkumar49

This comment has been minimized.

Show comment
Hide comment
@rajkumar49

rajkumar49 Jul 26, 2018

hi @cpuguy83 , i am unable to use AWS Logs driver with Docker version 18.03.1-ce, build 9ee9f40.
getting ERROR :

ubuntu@ip-172-xxxx:~$ docker inspect 7cf86xxxxx       | grep log
                "Type": "awslogs",
                    "awslogs-group": "test-log-group",
                    "awslogs-region": "us-east-1"
ubuntu@ip-172-xxxx:~$ docker logs 7cf861xxxxx        
**Error response from daemon: configured logging driver does not support reading**

also, i have AWS IAM policy which allows the user account to put logs in the available log group in AWS Cloudwatch.
please help

rajkumar49 commented Jul 26, 2018

hi @cpuguy83 , i am unable to use AWS Logs driver with Docker version 18.03.1-ce, build 9ee9f40.
getting ERROR :

ubuntu@ip-172-xxxx:~$ docker inspect 7cf86xxxxx       | grep log
                "Type": "awslogs",
                    "awslogs-group": "test-log-group",
                    "awslogs-region": "us-east-1"
ubuntu@ip-172-xxxx:~$ docker logs 7cf861xxxxx        
**Error response from daemon: configured logging driver does not support reading**

also, i have AWS IAM policy which allows the user account to put logs in the available log group in AWS Cloudwatch.
please help

@cpuguy83

This comment has been minimized.

Show comment
Hide comment
@cpuguy83

cpuguy83 Jul 26, 2018

Contributor

@rajkumar49 The feature is only available in docker-ee, no docker-ce.

Contributor

cpuguy83 commented Jul 26, 2018

@rajkumar49 The feature is only available in docker-ee, no docker-ce.

@rajkumar49

This comment has been minimized.

Show comment
Hide comment
@rajkumar49

rajkumar49 Jul 26, 2018

rajkumar49 commented Jul 26, 2018

@cpuguy83

This comment has been minimized.

Show comment
Hide comment
@cpuguy83

cpuguy83 Jul 26, 2018

Contributor

@rajkumar49 I couldn't comment on that. Currently it's docker-ee only.

Contributor

cpuguy83 commented Jul 26, 2018

@rajkumar49 I couldn't comment on that. Currently it's docker-ee only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment