Skip to content

Instantly share code, notes, and snippets.

View joemiller's full-sized avatar

joe miller joemiller

View GitHub Profile
@joemiller
joemiller / sensu-handler-input-example.json
Created February 2, 2012 11:33
example json data passed into Sensu handlers via STDIN
{
"client":{
"name":"host01",
"address":"10.2.1.11",
"subscriptions":[
"all",
"env_qa",
"frontend",
"proxy",
"apache"
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAsKGN1Y5tKAc2BX4WlKAsD9tGoeTLwFd5/EObwezcGrIhPKKrXKabY7ZCgGga4G17v/Jdifg1pjk/Qgc/9LaqobrEWLqTqoSWpMaqmyNk+3XQLIms28iJ2Y+pzDboquaC+rdcp8CBOnAtKST+aNH719sEhPhXmBXCAvjXQPLkbn8= jmiller@joe
@joemiller
joemiller / config.json
Created February 2, 2012 18:47
sensu handler set example
"handlers": {
"default_notification_set": {
"type": "set",
"handlers": ["default", "pagerduty", "irc", "twitter", "campfire", "gelf"]
},
"default": {
"type": "pipe",
"command": "/etc/sensu/handlers/default"
},
"pagerduty": {
@joemiller
joemiller / result-with-hang
Created February 13, 2012 21:15
thin-benchmarks.git strange results
$ ./ab -n 10000 -c 30 http://localhost:3000/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
@joemiller
joemiller / gist:1878067
Created February 21, 2012 18:44
graphite install on cent5 (with amqp support)
{panel}{toc}{panel}
----
h2. Purpose
The purpose of this document is to document the procedure for installing Graphite and its components on a graphite server.
Reference: [http://graphite.readthedocs.org/en/latest/install.html]
History:&nbsp;
@joemiller
joemiller / gist:1953710
Created March 1, 2012 22:34
git flux up example
$ git flux up
Updating Feature branches:
OPS-000_fix_sensu_version up to date
OPS-000_fix_syslog_conf_drodden up to date
OPS-000_sensu_stash_check up to date
OPS-691_add_configs up to date
OPS-691_newsmm_changes up to date
OPS-712_puppet_configs up to date
OPS-778_fars_app up to date
@joemiller
joemiller / forreal.rb
Created March 2, 2012 20:33
ghetto remote rpm inventory
require 'rubygems'
require 'sinatra'
get '/' do
`rpm -qa 2>&1`
end
@joemiller
joemiller / config.json
Created March 16, 2012 23:49
rabbitmq config sample from sensu config.json
{
"rabbitmq": {
"ssl": {
"private_key_file": "/etc/sensu/ssl/client_key.pem",
"cert_chain_file": "/etc/sensu/ssl/client_cert.pem"
},
"port": 5671,
"host": "localhost",
"user": "sensu",
"password": "mypass",
@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
@joemiller
joemiller / Vagrantfile
Created March 28, 2012 15:51
Sensu "New Pacakging" experiments
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "centos-57-x86-64"
# config.vm.box_url = "http://domain.com/path/to/above.box" # TODO..
# config.vm.boot_mode = :gui