Add dev-logging stack to enable scraping logs in structured form with lnav #163
Open
soenkeliebau wants to merge 3 commits intomainfrom
Open
Add dev-logging stack to enable scraping logs in structured form with lnav #163soenkeliebau wants to merge 3 commits intomainfrom
soenkeliebau wants to merge 3 commits intomainfrom
Conversation
…outputting them to the vector pod's console in json format. This is in order to be able to scrape the logs with lnav from there and display them in a nice format.
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.
This adds the "dev-logging" stack, which consists of only the vector aggregator, configured to log everything it receives to the console of the pod in json format.
This is designed to be used in conjunction with https://github.com/stackabletech/lnav_scripts/blob/main/vector-json.json to allow streaming logs directly from the vector pod to lnav with
kubectl logs vector-aggregator-0 -f | grep "^{" | lnavNote: The grep "^{" is necessary to get rid of vector startup logs that also land in its stdout. I'm sure there is a more elegant way for this, but it does the trick for now.