(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| VERSION="0.9.9" | |
| BUILD="betable1" | |
| set -e -x | |
| # Keep track of the original working directory. | |
| OLDESTPWD="$PWD" | |
| # Work in a temporary directory. | |
| cd "$(mktemp -d)" |
| global | |
| log 127.0.0.1 local0 | |
| log 127.0.0.1 local1 notice | |
| maxconn 4096 | |
| user haproxy | |
| group haproxy | |
| daemon | |
| listen rabbitmq 0.0.0.0:5672 | |
| mode tcp |
| package gocard | |
| import ( | |
| "fmt" | |
| "io" | |
| "crypto/md5" | |
| "crypto/sha1" | |
| "crypto/sha256" | |
| "crypto/sha512" | |
| ) |
| [solarized-dark] | |
| background = #002b36 | |
| foreground = #839496 | |
| majorLine = #fdf6e3 | |
| minorLine = #eee8d5 | |
| lineColors = #268bd2,#859900,#dc322f,#d33682,#db4b16,#b58900,#2aa198,#6c71c4 | |
| fontName = Sans | |
| fontSize = 10 | |
| fontBold = False | |
| fontItalic = False |
| #################################### | |
| # BASIC REQUIREMENTS | |
| # http://graphite.wikidot.com/installation | |
| # http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
| # Last tested & updated 10/13/2011 | |
| #################################### | |
| cd | |
| sudo apt-get update | |
| sudo apt-get upgrade |
| # pfreixes, 2012-07-27 | |
| # Add to /etc/bash_completion.d/supervisorctl | |
| _supervisor() | |
| { | |
| local cur prev opts base | |
| COMPREPLY=() | |
| cur="${COMP_WORDS[COMP_CWORD]}" | |
| prev="${COMP_WORDS[COMP_CWORD-1]}" |
| $ python xlog.py sample.log | |
| {'appname': 'test.app', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '68898', 'priority': '132', 'message': 'bla bla bla warn'} | |
| {'appname': 'test.app', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '68902', 'priority': '131', 'message': 'bla bla bla error'} | |
| {'appname': 'Dock', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '154', 'priority': '11', 'message': 'CGSReleaseWindowList: called with 5 invalid window(s)'} | |
| {'appname': 'WindowServer', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '79', 'priority': '11', 'message': 'CGXSetWindowListAlpha: Invalid window 0'} | |
| $ python xlog.py sample.log | grep test.app | |
| {'priority': '132', 'timestamp': '2020-03-04 12:42:40', 'hostname': 'codezone.local', 'appname': 'test.app', 'pid': '68898', 'message': 'bla bla bla warn'} |
Operation: Decouple whisper from graphite.
Method: Create a graphite function that does a date histogram facet query against elasticsearch for a given query string for the time period viewed in the current graph.
Reason: graphite has some awesome math functions. Wouldn't it be cool if we could use those on logstash results?
The screenshot below is using logstash to watch the twitter stream of keywords "iphone" "apple" and "samsung" - then I graph them each, so we get an idea of popularity. As a bonus, I also do a movingAverage() on the iphone curve to show you why this is awesome.
| module Helpers | |
| def capture_exception(e, env) | |
| if ENV['SENTRY_DSN'] | |
| evt = Raven::Event.capture_rack_exception(e, env) | |
| Raven.send(evt) if evt | |
| end | |
| end | |
| end |