Skip to content

Instantly share code, notes, and snippets.

@cherti
cherti / alert.sh
Created December 9, 2016 13:47
send a dummy alert to prometheus-alertmanager
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
@kennystone
kennystone / gist:810182
Created February 3, 2011 20:57
em/sinatra example
require 'sinatra/base'
require 'eventmachine'
require 'thin'
EventMachine.run do
class Dude < Sinatra::Base
get '/' do
'oh hai'
end