-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add docker logs
support to the Elastic Log Driver
#19531
Add docker logs
support to the Elastic Log Driver
#19531
Conversation
Pinging @elastic/integrations (Team:Integrations) |
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
The writer should be fine to reuse. We only introduced our own reader to handle reading and framing correctly in the presence of errors. |
* upstream/master: Add `docker logs` support to the Elastic Log Driver (elastic#19531) [Elastic Agent] Fix saving of agent configuration on Windows to have proper ACLs (elastic#19793) Send the config revision down to the endpoint application. (elastic#19759) [Elastic Agent] Add support for multiple hosts in connection to kibana (elastic#19628) Remove the downloadConfig and retryConfig from plugin/process.Application and plugin/service.Application. (elastic#19603) Update go version to 1.14.4 (elastic#19753) ci: set builds as skipped when they do not match the trigger (elastic#19750) [Auditbeat] Fix up socket dataset runaway CPU usage (elastic#19764) Convert cloudfoundry input to v2 (elastic#19717)
* upstream/master: Add `docker logs` support to the Elastic Log Driver (elastic#19531) [Elastic Agent] Fix saving of agent configuration on Windows to have proper ACLs (elastic#19793) Send the config revision down to the endpoint application. (elastic#19759) [Elastic Agent] Add support for multiple hosts in connection to kibana (elastic#19628)
* upstream/master: Add `docker logs` support to the Elastic Log Driver (elastic#19531) [Elastic Agent] Fix saving of agent configuration on Windows to have proper ACLs (elastic#19793)
* upstream/master: Add `docker logs` support to the Elastic Log Driver (elastic#19531) [Elastic Agent] Fix saving of agent configuration on Windows to have proper ACLs (elastic#19793) Send the config revision down to the endpoint application. (elastic#19759)
* upstream/master: Add `docker logs` support to the Elastic Log Driver (elastic#19531) [Elastic Agent] Fix saving of agent configuration on Windows to have proper ACLs (elastic#19793)
* init commit of docker logs support * remove vendor * fix tests * mage fmt * code cleanup * change logging directories around, add code to remove containers * remove error message on EOF * fix config, add docs * more fixes, migrate to writing logs to docker's own location * add changelog entry * docs cleanup (cherry picked from commit d53cd12)
* init commit of docker logs support * remove vendor * fix tests * mage fmt * code cleanup * change logging directories around, add code to remove containers * remove error message on EOF * fix config, add docs * more fixes, migrate to writing logs to docker's own location * add changelog entry * docs cleanup (cherry picked from commit d53cd12)
* init commit of docker logs support * remove vendor * fix tests * mage fmt * code cleanup * change logging directories around, add code to remove containers * remove error message on EOF * fix config, add docs * more fixes, migrate to writing logs to docker's own location * add changelog entry * docs cleanup
What does this PR do?
See #19371 and #13990
This PR adds support for the
docker logs
command to the Elastic Log Driver. This basically re-implements the "default" log driver, using Docker's own libraries, inside the Elastic Log Driver. In theory this should be a simple addition, as we're just gluing existing libraries on top on what we already have.There's still some oddities going on here:
docker logs -f
for an expended period of time without additional log lines:Error grabbing logs: error decoding log message: net/http: request canceled (Client.Timeout exceeded while reading body)
This doesn't seem to be something in my library. Looks like it was due to this PR here: add a 10s timeout to the client object. docker/cli#1872Why is it important?
This is a "must have" from the Cloud folks, and it's good to have in general. Also required for docker certification.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
mage buildAndInstall
dockerlogbeat
for an example of how to run the plugin against a containerdocker logs
command against that container with various options, make sure everything works as expected.