Skip to content

Instantly share code, notes, and snippets.

View portertech's full-sized avatar

Sean Porter portertech

View GitHub Profile
Handling a channel-level exception.
AMQP class id : 40
AMQP method id: 10
Status code : 404
Error message : NOT_FOUND - no exchange 'metricsfoo' in vhost '/sensu'
@portertech
portertech / vagrant_images.txt
Created April 16, 2012 06:20
Vagrant Boxes
http://h4x.s3.amazonaws.com/vagrant/ubuntu-11.10-server-i386.box
http://h4x.s3.amazonaws.com/vagrant/ubuntu-11.10-server-amd64.box
require File.join(File.dirname(__FILE__), 'config')
module Sensu
class Client
def self.run(options={})
EM.run do
client = self.new(options)
client.setup_amqp
client.setup_keepalives
client.setup_subscriptions
{
"timestamp": 1313529745,
"swap": {
"in": "0",
"out": "0"
},
"memory": {
"inactive": "89088",
"active": "3488596",
"swap_used": "0",
. .
. . IMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
.IMMMMMMMMMMMMMM8I . ... . =MMMM
:MMMMMMMMMZ . 7MMMMZ . 7MD . IMMD .
MMMMM. . . . .~ .M, . MMM .
MMMM, N. .IDMMMO777ZNMMMMMO =MM . M:. NMM.
. ZMMM . . :7NMMDI= . MM IM MMM
MMM IMM77IDMMM, . M8 ..MM M ,N MMM
M8 M M . M ,O . 7. MM
.M8 D ,.
# File 'lib/redis.rb', line 119
def hgetall(key)
Hash[*@client.call(:hgetall, key)]
end
end
end
end
end
end
end
end
@portertech
portertech / durp-#{Time.now.to_i.to_s}
Created May 30, 2011 14:31
Chef run failed on durp @ #{Time.now.getutc}
test
tester
var ip_address = '';
if ("ec2" in attributes['automatic']) {
ip_address = attributes['automatic']['ec2']['public_ipv4'];
} else {
ip_address = attributes['automatic']['ipaddress'];
}
-> % gem install nagios-dashboard
Fetching: nagios-dashboard-0.0.2.gem (100%)
Successfully installed nagios-dashboard-0.0.2
1 gem installed