Skip to content

Sherlock Holmes and the mystery of the "Murdered Pods"

Notifications You must be signed in to change notification settings

nickschuch/sherlock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sherlock

Maintainer: Nick Schuch

When a Pod is murdered, Sherlock isn't far away to solve the mystery.

Components

  • Watson - Daemon for storing data
  • Sherlock - Command line for developers

How it works

When a Pod exits, Watson will store data in S3:

  • Object
  • Logs
  • Events

This data can then be loaded by sherlock.

Listing

$ sherlock list
INCIDENT ID             	TIMESTAMP                    	NAMESPACE  	POD                            	CONTAINER
eNVFSnCJdXEHYyQJsNjTSKDN	2017-09-17 06:41:52 +0000 UTC	kube-system	project1-3908849101-nmxpx	    app 
qzTvepsIRXQXkEMfbJNeJDDI	2017-09-17 06:42:27 +0000 UTC	kube-system	project1-3908849101-nmxpx	    app

Inspecting

$ sherlock inspect eNVFSnCJdXEHYyQJsNjTSKDN

events.log 	 ........................................................................................................
events.log 	 ........................................................................................................
events.log 	 ........................................................................................................
events.log 	 ........................................................................................................
events.log 	 ........................................................................................................
events.log 	 ........................................................................................................
events.log 	 ........................................................................................................
events.log 	 ........................................................................................................
events.log 	 ........................................................................................................
events.log 	 ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
object.yaml  ........................................................................................................
output.log 	 ........................................................................................................
output.log 	 ........................................................................................................
output.log 	 ........................................................................................................
output.log 	 ........................................................................................................
output.log 	 ........................................................................................................
output.log 	 ........................................................................................................
output.log 	 ........................................................................................................
output.log 	 ........................................................................................................

Ignores

You may want to ignore some pods. This can be done by adding the following annotation to it.

apiVersion: v1
kind: Pod
metadata:
  annotations:
    sherlock.nickschuch.github.com/watson-ignore: "true"
  ...

Resources

Development

Principles

  • Code lives in the workspace directory

Tools

Workflow

(While in the workspace directory)

Installing a new dependency

gb vendor fetch github.com/foo/bar

Running quality checks

make lint test

Building binaries

make build