All Projects → ericmcbride → Wufei

ericmcbride / Wufei

Licence: mit
Async Kuberenetes Namespace Log Recorder / Streamer

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Wufei

Investigator
Interactive and asynchronous logging tool for Node.js. An easier way to log & debug complex requests directly from the command line (experimental).
Stars: ✭ 155 (+474.07%)
Mutual labels:  cli, async, logging
Horusec
Horusec is an open source tool that improves identification of vulnerabilities in your project with just one command.
Stars: ✭ 311 (+1051.85%)
Mutual labels:  cli, ci
Php Watcher
Monitor for any changes in your php application and automatically restart it (suitable for async apps).
Stars: ✭ 303 (+1022.22%)
Mutual labels:  cli, async
Quill
Asynchronous Low Latency C++ Logging Library
Stars: ✭ 422 (+1462.96%)
Mutual labels:  async, logging
Aiologger
Asynchronous logging for python and asyncio
Stars: ✭ 284 (+951.85%)
Mutual labels:  async, logging
Travis Watch
Stream live travis test results of the current commit to your terminal!
Stars: ✭ 294 (+988.89%)
Mutual labels:  cli, ci
Ava
Node.js test runner that lets you develop with confidence 🚀
Stars: ✭ 19,458 (+71966.67%)
Mutual labels:  cli, async
Php Console Spinner
Colorful highly configurable spinner for php cli applications (suitable for async apps)
Stars: ✭ 225 (+733.33%)
Mutual labels:  cli, async
Mario
Powerful Python pipelines for your shell
Stars: ✭ 469 (+1637.04%)
Mutual labels:  cli, async
Gotestsum
'go test' runner with output optimized for humans, JUnit XML for CI integration, and a summary of the test results.
Stars: ✭ 570 (+2011.11%)
Mutual labels:  ci, testing-tools
G3log
G3log is an asynchronous, "crash safe", logger that is easy to use with default logging sinks or you can add your own. G3log is made with plain C++14 (C++11 support up to release 1.3.2) with no external libraries (except gtest used for unit tests). G3log is made to be cross-platform, currently running on OSX, Windows and several Linux distros. See Readme below for details of usage.
Stars: ✭ 677 (+2407.41%)
Mutual labels:  async, logging
Pygogo
A Python logging library with superpowers
Stars: ✭ 265 (+881.48%)
Mutual labels:  cli, logging
xray-action
... a GitHub action to import test results into "Xray" - A complete Test Management tool for Jira.
Stars: ✭ 16 (-40.74%)
Mutual labels:  ci, testing-tools
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+16718.52%)
Mutual labels:  cli, ci
symfony-lts-docker-starter
🐳 Dockerized your Symfony project using a complete stack (Makefile, Docker-Compose, CI, bunch of quality insurance tools, tests ...) with a base according to up-to-date components and best practices.
Stars: ✭ 39 (+44.44%)
Mutual labels:  ci, testing-tools
Tty Command
Execute shell commands with pretty output logging and capture stdout, stderr and exit status.
Stars: ✭ 348 (+1188.89%)
Mutual labels:  cli, logging
Captain
Captain - Convert your Git workflow to Docker 🐳 containers
Stars: ✭ 739 (+2637.04%)
Mutual labels:  cli, ci
Lighthouse Ci
A useful wrapper around Google Lighthouse CLI
Stars: ✭ 198 (+633.33%)
Mutual labels:  cli, ci
Cypress Terminal Report
Better terminal and file output for cypress test logs.
Stars: ✭ 200 (+640.74%)
Mutual labels:  cli, ci
Xcodegen
A Swift command line tool for generating your Xcode project
Stars: ✭ 5,032 (+18537.04%)
Mutual labels:  cli, ci

WUFEI

Wufei is an async Rust CLI Tool for the aggregation of Kubernetes logs. This tool will write kubernetes logs for each pod down to a container level to a file or to stdout depending on the developers needs and also has the ability to log new pods that are spun up in the namespace as well. There is an informer written to let Wufei know when new pods spin up!

Heavily inspired by https://github.com/johanhaleby/kubetail Kubetail.

Wufei

Installation

As of right now, Wufei is NOT part of cargo. Its on my todo list. Right now just do cargo build in the root of the the project, and then access the wufei in target/debug/wufei

cargo run -- --namespace=<my-kube-namespace> --color

Example Output

Video coming soon

CLI Arguments

Wufei 0.3.1
Eric McBride <[email protected]> github.com/ericmcbride
Tail ALL your kubernetes logs at once, or record them to files

USAGE:
    wufei [FLAGS] [OPTIONS]

FLAGS:
        --color       Pods for the logs will appear in color in your terminal
    -f, --file        Record the logs to a file. Note: Logs will not appear in stdout
        --gather      Dont follow the logs, but gather all of them at once
    -h, --help        Prints help information
        --previous    Grab previous logs
        --update      Runs an informer, that will add new pods to the tailed logs
    -V, --version     Prints version information

OPTIONS:
        --json-key <json-key>        key to search for in the json, prints out the value. Only single key supported
    -n, --namespace <namespace>      Namespace for logs [default: kube-system]
    -o, --outfile <outfile>          Outfile of where the logs are being recorded [default: /tmp/wufei/]
        --selector <selector>        Select pods by label example: version=v1
        --since <since>              Only return logs newer then a duration in seconds like 1, 60, or 180
        --tail-lines <tail-lines>    If set, the number of lines from the end of the logs to show [default: 1]

Wufei requires a namespace.

  • The color flog --color will display pod names in colors in stdout.

  • The file flag --file will write the logs to /tmp/wufei/ based on pod name.

  • The update flag --update will spin up an informer that will listen for new pods to spin up

  • The previous flag --previous will show a previous containers logs. Specify --tail-lines or it will only show you the last line from it.

  • The --gather flag will gather all logs. To be used with --tail-lines or you will just get 1 log back.

  • The namespace option --namespace is the namespace the developer wants to use to tail logs from

  • The outfile option --outfile is used when the file flag is used, to change the location of where the files are used

  • The selector option --selector will allow a single key/value pair to tail logs by. Example would be --selector='version=v1'

  • The since option --since will return logs newer then the duration in seconds.

  • The tail-lines option --tail-lines will show the number of lines from the ends of the log to show. Defaults to 1

  • The json-key option --json-key allows the user to seach logs for a key in a valid json blob. The only thing wufei will print out are logs that contain the key. If nothing is printing out, nothing matches

Examples:

cargo run -- --namespace=default --color
cargo run -- --namespace=default --selector='version=v1' --update
cargo run -- --namespace=default --file --outfile=/tmp/new_outfile --update
cargo run -- --namespace=default --selector=`version=v1` --file
cargo run -- --namespace=default --previous --tail-lines=20 --color
cargo run -- --namespace=default --previous --color
cargo run -- --namespace=default --previous --since=1800
cargo run -- --namespace=default --previous --tail-lines=20 --color --selector='version=v1'
cargo run -- --namespace=default --color --json-key=X-REQUEST-ID
cargo run -- --namespace=default --file --json-key=user_id --select='version=v2'
cargo run -- --namespace=default --tail-lines=10000000 --gather --file

WUFEI USES YOUR CURRENT KUBE CONTEXT

export $KUBECONFIG=:$KUBECONFIG/path/to/your/config

LIST CONTEXTS

kubectl config view

USE CONTEXT

kubectl config use-context my-context

TOO MANY OPEN FILES ERROR

This error will pop up, depending on the settings on your operating system. This is due to security reasons. Below is how you would fix this on a Mac.

OS/X

ulimit -n 2048

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].