Repository navigation
Feature: also send logs to VictoriaLogs - #9
Merged
Merged
Conversation
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.
Lets the shipper send logs to OpenSearch, VictoriaLogs, or both, depending on which env vars are set, while YieldSeeker moves its logs off OpenSearch.
outputs/opensearch.yamlis added whenOPENSEARCH_URLis set,outputs/victorialogs.yamlwhenVICTORIALOGS_HOSTis set. If neither is set the container exits withError: set OPENSEARCH_URL and/or VICTORIALOGS_HOST.entrypoint.shbuildsfluent-bit.generated.yamlfromfluent-bit.yamlplus the selected outputs, then execs fluent-bit. The fluent-bit image has no shell, so the Dockerfile copies a staticbusybox(2.6 MB) in; the-debugvariant was 2.26 GB. Image is 188 MB (was 186 MB).httpto${VICTORIALOGS_HOST}:9428/insert/jsonline(json_lines, gzip),_stream_fields=name,containerId,_msg_field=message,log(apiPath,requestId, etc. stay as their own fields),_time_field=date. OpenSearch output unchanged.deploy.yaml:run-ys-appboxpassesVICTORIALOGS_HOSTin addition toOPENSEARCH_URL.Merge after the logbox exists (tokenpage/yieldseeker-app#771), since merging deploys to the appbox.
Tested locally (Docker): neither var -> exits 1 with the error; only
OPENSEARCH_URL-> only the opensearch output; onlyVICTORIALOGS_HOST-> only the http output, and a test line arrived in a local VictoriaLogs; both -> both outputs. Earlier run: app, API, nginx and plain-text lines all arrived with the expected time, stream and fields.