Fix #224 - Enable advanced log routing when running Logagent with Docker #231
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.
This PR fixes #224 and enables fine-grained log routing with Docker.
I've added another env var option.
LOGS_RECEIVER_URLS
will enable adding multiple receiver URLs in a comma separated list. These URLs need to contain the token/index of the Elasticsearch endpoint as well.The existing
LOGS_RECEIVER_URL
env var is now limited to one endpoint and requires adding theLOGS_TOKEN
as a separate env var.It is now possible to add
LOGS_TOKEN
andLOGS_RECEIVER_URL
to the env vars of containers you want to ship logs for. Setting them on a container-basis will overwrite default settings. Using it withLA_CONFIG_OVERRIDE=true
withLOGS_ENABLED_DEFAULT=false
in the Logagent container env vars will let you disable log shipping for all containers except for container where you setLOGS_ENABLED=true
,LOGS_TOKEN
, andLOGS_RECEIVER_URL
.