All Projects → boz → Kail

boz / Kail

Licence: mit
kubernetes log viewer

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Kail

Logvac
Simple, lightweight, api-driven log aggregation service with realtime push capabilities and historical persistence.
Stars: ✭ 61 (-95.15%)
Mutual labels:  logging, logs, devtools
Stern
⎈ Multi pod and container log tailing for Kubernetes -- Friendly fork of https://github.com/wercker/stern
Stars: ✭ 268 (-78.71%)
Mutual labels:  logging, logs, tail
Clockwork Chrome
Clockwork - php dev tools integrated to your browser - Chrome extension
Stars: ✭ 415 (-67.04%)
Mutual labels:  logging, devtools
Stern
⎈ Multi pod and container log tailing for Kubernetes
Stars: ✭ 5,614 (+345.91%)
Mutual labels:  logging, tail
Gollum
An n:m message multiplexer written in Go
Stars: ✭ 883 (-29.86%)
Mutual labels:  logging, logs
Honeypot
Low interaction honeypot that displays real time attacks
Stars: ✭ 348 (-72.36%)
Mutual labels:  logs, tail
Go Syslog
Blazing fast syslog parser
Stars: ✭ 370 (-70.61%)
Mutual labels:  logging, logs
Logbook
An extensible Java library for HTTP request and response logging
Stars: ✭ 822 (-34.71%)
Mutual labels:  logging, logs
Vortex
🌀 Discord Moderation Bot
Stars: ✭ 283 (-77.52%)
Mutual labels:  logging, logs
Serverless Es Logs
A Serverless plugin to transport logs to ElasticSearch
Stars: ✭ 51 (-95.95%)
Mutual labels:  logging, logs
Testlogcollectors
A framework for capturing log statements during tests. Compatible with most popular logging frameworks. Works with JUnit and TestNG
Stars: ✭ 31 (-97.54%)
Mutual labels:  logging, logs
Tail
[Revamped] Go package for reading from continuously updated files (tail -f)
Stars: ✭ 81 (-93.57%)
Mutual labels:  logging, tail
Clockwork
Clockwork - php dev tools in your browser - server-side component
Stars: ✭ 4,076 (+223.75%)
Mutual labels:  logging, devtools
Node Tail
The zero dependency Node.js module for tailing a file
Stars: ✭ 335 (-73.39%)
Mutual labels:  logs, tail
Cw
The best way to tail AWS CloudWatch Logs from your terminal
Stars: ✭ 368 (-70.77%)
Mutual labels:  logs, tail
Logagent Js
Extensible log shipper with input/output plugins, buffering, parsing, data masking, and small memory/CPU footprint
Stars: ✭ 333 (-73.55%)
Mutual labels:  logging, logs
Cabin
🌲 Cabin is the best JavaScript and Node.js logging service and logging npm package
Stars: ✭ 622 (-50.6%)
Mutual labels:  logging, logs
Rz Go
Ripzap - Fast and 0 allocs leveled JSON logger for Go ⚡️. Dependency free.
Stars: ✭ 256 (-79.67%)
Mutual labels:  logging, logs
Cartus
A structured logging abstraction with multiple backends.
Stars: ✭ 21 (-98.33%)
Mutual labels:  logging, logs
Saw
Fast, multi-purpose tool for AWS CloudWatch Logs
Stars: ✭ 1,071 (-14.93%)
Mutual labels:  logs, tail

kail: kubernetes tail Build Status

Kubernetes tail. Streams logs from all containers of all matched pods. Match pods by service, replicaset, deployment, and others. Adjusts to a changing cluster - pods are added and removed from logging as they fall in or out of the selection.

asciicast

Usage

With no arguments, kail matches all pods in the cluster. You can control the matching pods with arguments which select pods based on various criteria.

All flags can be set by an environment variable - KAIL_POD=foo kail is the same as kail --pod foo.

Selectors

Flag Selection
-l, --label LABEL-SELECTOR match pods based on a standard label selector
-p, --pod NAME match pods by name
-n, --ns NAMESPACE-NAME match pods in the given namespace
--svc NAME match pods belonging to the given service
--rc NAME match pods belonging to the given replication controller
--rs NAME match pods belonging to the given replica set
-d, --deploy NAME match pods belonging to the given deployment
--sts NAME match pods belonging to the given statefulset
-j, --job NAME match pods belonging to the given job
--node NODE-NAME match pods running on the given node
--ing NAME match pods belonging to services targeted by the given ingress
-c, --containers CONTAINER-NAME restrict which containers logs are shown for
--ignore LABEL-SELECTOR Ignore pods that the selector matches. (default: kail.ignore=true)
--current-ns Match pods in the namespace specified in Kubernetes' "current context"
--ignore-ns NAME Ignore pods in the given namespaces. Overridden by --ns, --current-ns. (default: kube-system)

Name Selection

When selecting objects by NAME (--svc, --pod, etc...), you can either qualify it with a namespace to restrict the selection to the given namespace, or select across all namespaces by giving just the object name.

Example:

# match pods belonging to a replicaset named 'workers' in any namespace.
$ kail --rs workers

# match pods belonging to the replicaset named 'workers' only in the 'staging' namespace
$ kail --rs staging/workers

Combining Selectors

If the same flag is used more than once, the selectors for that flag are "OR"ed together.

# match pods belonging to a replicaset named "workers" or "db"
$ kail --rs workers --rs db

Different flags are "AND"ed together:

# match pods belonging to both the service "frontend" and the deployment "webapp"
$ kail --svc frontend --deploy webapp

Other Flags

Flag Description
-h, --help Display help and usage
--context CONTEXT-NAME Use the given Kubernetes context
--dry-run Print initial matched pods and exit
--log-level LEVEL Set the logging level (default: error)
--log-file PATH Write output to PATH (default: /dev/stderr)
--since DURATION Display logs as old as given duration. Ex: 5s, 2m, 1.5h or 2h45m (defaults: 1s)
See here for more information on the duration format.

Installing

Homebrew

$ brew tap boz/repo
$ brew install boz/repo/kail

Downloading

Kail binaries for Linux and OSX can be found on the latest release page. Download and install into your $GOPATH/bin with:

$ bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$GOPATH/bin"

Running in a cluster with kubectl

The docker image abozanich/kail is available for running kail from within a kubernetes pod via kubectl.

Note: be sure to include the kail.ignore=true label, otherwise... it's logging all the way down.

Example:

# match all pods - synonymous with 'kail' from the command line
$ kubectl run -it --rm -l kail.ignore=true --restart=Never --image=abozanich/kail kail

# match pods belonging to service 'api' in any namespace - synonymous with 'kail --svc api'
$ kubectl run -it --rm -l kail.ignore=true --restart=Never --image=abozanich/kail kail -- --svc api

Building

Install build and dev dependencies

Install source code and golang dependencies

$ go get -d github.com/boz/kail
$ cd $GOPATH/src/github.com/boz/kail
$ make install-deps

Build binary

$ make

Install run against a demo cluster

$ minikube start
$ ./_example/demo.sh start
$ ./kail

# install image into minikube and run via kubectl
$ make image-minikube
$ kubectl run -it --rm -l kail.ignore=true --restart=Never --image=kail kail

Stress testing

Start minikube with a fair amount of CPU and memory.

$ minikube start --cpus 4 --memory 8192

Start stress.yml resources.

$ kubectl create -f _example/stress.yml

Wait a while for the pods to run

$ kubectl get pods --namespace stress | grep Running | wc -l
100

Run kail

./kail --ns stress
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].