Skip to content

Instantly share code, notes, and snippets.

@reyjrar
reyjrar / logstash.conf
Created July 5, 2012 12:48
LogStash Configuration
input {
tcp {
type => "syslog"
port => 8514
}
}
filter {
## DISCARD IMPROPERLY FORMATTED MESSAGES
@ollyg
ollyg / logstash.conf
Created June 20, 2012 13:29
logstash config and filter to fully parse a syslog message (PRI, timestamp, host)
filter {
# strip the syslog PRI part and create facility and severity fields.
# the original syslog message is saved in field %{syslog_raw_message}.
# the extracted PRI is available in the %{syslog_pri} field.
#
# You get %{syslog_facility_code} and %{syslog_severity_code} fields.
# You also get %{syslog_facility} and %{syslog_severity} fields if the
# use_labels option is set True (the default) on syslog_pri filter.
grok {
type => "syslog-relay"
@jordansissel
jordansissel / input (on stdin)
Created June 14, 2012 18:40
logstash: pulling json from a message into the event itself
% ruby bin/logstash agent -e 'filter { grok { pattern => "^.*?\{%{GREEDYDATA:jsoninsides}\}" } mutate { replace => [ "jsoninsides", "{%{jsoninsides}}" ] } json { jsoninsides => "@fields" } mutate { remove => "jsoninsides" } } output { stdout { debug => true } }'
@cwebberOps
cwebberOps / ideal ops.md
Created May 29, 2012 15:48 — forked from bhenerey/ideal ops.md
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@cwebberOps
cwebberOps / hack.sh
Created March 31, 2012 14:21 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@joemiller
joemiller / celluoid-pool-2.rb
Created March 21, 2012 15:05
modified version of @lusis' celluloid pool test using the new celluloid::pool class in 0.9.0
# NOTE: original gist that this is based on is available here: https://gist.github.com/1143369
require 'celluloid'
require 'logger'
require 'uuid'
require 'sinatra/base'
# This is just a simple demo of a possible Pool implementation for Celluloid
# The sinatra interface exists just to do some testing of crashing workers and the like
@tarcieri
tarcieri / charlie_and_ashton.rb
Created November 2, 2011 02:13
An example of circular calls in Celluloid
require 'rubygems'
require 'celluloid'
class Charlie
include Celluloid
def initialize(friend)
@nemesis = friend
end
@yoojinl
yoojinl / actors.rb
Created October 29, 2011 20:19
Actors shmactors.
require 'thread'
require 'celluloid'
$q = Queue.new
class A
include Celluloid
def add
loop do
@lusis
lusis / celluloid-pool.rb
Created August 13, 2011 01:35
Playing around with a fairly naive worker pool implementation in Celluloid
require 'celluloid'
require 'logger'
require 'uuid'
require 'sinatra/base'
# This is just a simple demo of a possible Pool implementation for Celluloid
# The sinatra interface exists just to do some testing of crashing workers and the like
# TODO
# Create a busy worker registry of some kind
@lusis
lusis / fun-with-celluloid.rb
Created August 11, 2011 03:18
Just mucking about with a POC Celluloid worker pool
require 'celluloid'
require 'logger'
require 'uuid'
require 'sinatra/base'
# This is just a simple demo of a possible Pool implementation for Celluloid
# The sinatra interface exists just to do some testing of crashing workers and the like
# TODO
# Create a busy worker registry of some kind