SaaSHub helps you find the best software and product alternatives Learn more →
Top 8 Go Tail Projects
-
stern
⎈ Multi pod and container log tailing for Kubernetes -- Friendly fork of https://github.com/wercker/stern (by stern)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
That's why I plan on migrating all my shell scripts to Golang programs f.ex. using https://github.com/bitfield/script -- it already has a number of simulations of shell commands and I'd contribute others if I had the time.
sh / bash / zsh scripts are just fragile and that's the inconvenient truth. People who devised the shell interpreters had good intentions but ultimately their creations grew to a scope 1000x bigger than they intended, hence all the "do X but if Y flag is set then do Z... unless flag A is also set in which case do Y and part of Z".
It's horrendous and I seriously don't get what's so difficult in just coding these scripts in a programming language that provides single statically linked binaries (like Golang) and just distribute it with your images -- or run them in CI/CD and have init containers and never include them in the images in the first place.
Inertia, of course. But I'll be actively working against it until I retire.
Project mention: ☸️ Kubernetes: From your docker-compose file to a cluster with Kompose | dev.to | 2024-03-09deploy: stage: deploy image: alpine/k8s:1.29.1 variables: NAMESPACE: $CI_COMMIT_REF_SLUG before_script: # init namespace - kubectl config use-context $KUBE_CONTEXT - kubectl create namespace $NAMESPACE || true # download tools - curl --show-error --silent --location https://github.com/stern/stern/releases/download/v1.22.0/stern_1.22.0_linux_amd64.tar.gz | tar zx --directory /usr/bin/ stern && chmod 755 /usr/bin/stern && stern --version - curl --show-error --silent --location https://github.com/kubernetes/kompose/releases/download/v1.32.0/kompose-linux-amd64 -o /usr/local/bin/kompose && chmod a+x /usr/local/bin/kompose && kompose version # show logs asynchronously. Timeout to avoid hanging indefinitely when an error occurs in script section - timeout 1200 stern -n $NAMESPACE "app-" --tail=0 --color=always & # in background, tail new logs if any (current and incoming) pod with this regex as name - timeout 1200 kubectl -n $NAMESPACE get events --watch-only & # in background, tail new events in background script: # first delete CrashLoopBackOff pods, polluting logs - kubectl -n $NAMESPACE delete pod `kubectl -n $NAMESPACE get pods --selector app.kubernetes.io/component=$MODULE | awk '$3 == "CrashLoopBackOff" {print $1}'` || true # now deploying - kompose convert --out k8s/ - kubectl apply -n $NAMESPACE -f k8s/ - echo -e "\e[93;1mWaiting for the new app version to be fully operational...\e[0m" # waiting for successful deployment - kubectl -n $NAMESPACE rollout status deploy/app-db - kubectl -n $NAMESPACE rollout status deploy/app-back - kubectl -n $NAMESPACE rollout status deploy/app-front # on any error before this line, the script will still wait for these threads to complete, so the initial timeout is important. Adding these commands to after_script does not help - pkill stern || true - pkill kubectl || true after_script: # show namespace content - kubectl config use-context $KUBE_CONTEXT - kubectl -n $NAMESPACE get deploy,service,ingress,pod
We use saw to tail lambda log:
Many code reviews Upgrade code to respect new conventions. #111 ccoVeille posted on Apr 13, 2024 go.mod refers to 1.17, so we can use os.ReadFile and os.WriteFile instead of ioutil.ReadFile and ioutil.WriteFile that are now deprecated. We should use errors.As since go 1.13 otherwise any wrapped errors won't be caught. View on GitHub Use JSONL format for New Line Delimited JSON #112 ccoVeille posted on Apr 13, 2024 https://en.wikipedia.org/wiki/JSON_streaming View on GitHub receiver cleanup #522 ccoVeille posted on Apr 05, 2024 Refactor to use consistent parserState receiver Clean unused receivers View on GitHub Fix test helpers #523 ccoVeille posted on Apr 05, 2024 Test helpers should use t.Helper() This way if an error occurs it would be reported outside the helper View on GitHub
Go Tail related posts
-
stern VS stern - a user suggested alternative
2 projects | 11 Dec 2023 -
Most efficient way to check all containers cluster wide for missing probes?
-
What are some useful Kubernetes tools you can share?
-
Bash script to tail Kubernetes logs from multiple pods at the same time
-
Adventures in K8S Cloud Native App Development
-
What's the best CLI tailing tool for k8s logs?
-
Tail multiple pods on K8s and multiple containers within the pod
-
A note from our sponsor - SaaSHub
www.saashub.com | 31 May 2024
Index
What are some of the best open-source Tail projects in Go? This list will help you:
Project | Stars | |
---|---|---|
1 | script | 5,137 |
2 | stern | 2,919 |
3 | kail | 1,939 |
4 | saw | 1,387 |
5 | ov | 1,342 |
6 | cw | 753 |
7 | ktail | 318 |
8 | logwatcher | 9 |
Sponsored