Add docker logs support to the Elastic Log Driver#19531
Merged
fearful-symmetry merged 14 commits intoelastic:masterfrom Jul 9, 2020
Merged
Add docker logs support to the Elastic Log Driver#19531fearful-symmetry merged 14 commits intoelastic:masterfrom
docker logs support to the Elastic Log Driver#19531fearful-symmetry merged 14 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/integrations (Team:Integrations) |
Contributor
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
urso
reviewed
Jul 1, 2020
The writer should be fine to reuse. We only introduced our own reader to handle reading and framing correctly in the presence of errors. |
urso
reviewed
Jul 7, 2020
urso
reviewed
Jul 8, 2020
urso
reviewed
Jul 8, 2020
urso
reviewed
Jul 8, 2020
urso
reviewed
Jul 8, 2020
urso
reviewed
Jul 8, 2020
urso
reviewed
Jul 8, 2020
urso
approved these changes
Jul 8, 2020
v1v
added a commit
to v1v/beats
that referenced
this pull request
Jul 9, 2020
* 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)
v1v
added a commit
to v1v/beats
that referenced
this pull request
Jul 9, 2020
* 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)
v1v
added a commit
to v1v/beats
that referenced
this pull request
Jul 9, 2020
* 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)
v1v
added a commit
to v1v/beats
that referenced
this pull request
Jul 9, 2020
* 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)
v1v
added a commit
to v1v/beats
that referenced
this pull request
Jul 9, 2020
* 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)
5 tasks
fearful-symmetry
added a commit
to fearful-symmetry/beats
that referenced
this pull request
Jul 9, 2020
* 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)
fearful-symmetry
added a commit
that referenced
this pull request
Jul 9, 2020
* 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)
melchiormoulin
pushed a commit
to melchiormoulin/beats
that referenced
this pull request
Oct 14, 2020
* 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
See #19371 and #13990
This PR adds support for the
docker logscommand 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 -ffor 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.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
mage buildAndInstalldockerlogbeatfor an example of how to run the plugin against a containerdocker logscommand against that container with various options, make sure everything works as expected.