Skip to content

Instantly share code, notes, and snippets.

Pull down the george/add_test_infrastructure branch and checkit out.
Then setup BASE_DIR to point to the superdirectory of blueflood-chef, and copy the jar files staging there:
export BASE_DIR=/Users/georgej/incoming
scp monitor00.iad.stage.bf.k1k.me:/opt/riemann/lib/riemann-acknowledge.jar $BASE_DIR
scp monitor00.iad.stage.bf.k1k.me:/opt/riemann/lib/riemann-extra.jar $BASE_DIR
scp monitor00.iad.stage.bf.k1k.me:/opt/riemann/lib/riemann-starter-0.1.0-SNAPSHOT.jar $BASE_DIR
scp monitor00.iad.stage.bf.k1k.me:/opt/riemann/lib/riemann.jar $BASE_DIR
(deftest flap-event-generation
(is (= (:flap-event
(inject! (map #(merge {:service "a" :host "a"} %)
[{:state "ok", :time 1}
{:state "ok", :time 10}
{:state "critical", :time 20}
{:state "ok", :time 30}
{:state "ok", :time 40}
{:state "critical", :time 140}
{:state "ok", :time 240}
if I have:
(defn g1 [e]
(prn "foo" e))
in my config, start rieman, change it to
(defn g1 [e]
(prn "bar" e)),
and reload, will (g1) subsequently print "bar"?
I'm saying that this will work:
(let [index x service-threshold y] (load-stream threshold-stream))
but this won't:
(let [index x service-threshold2 y] (load-stream threshold-stream))
because the name is wrong in the let
# Usage:
# heat -v stack-create $YOUR_STACK_NAME \
# --template-file /path/to/grafana.template \
# -P rax_tenant=$RAX_TENANT_ID \
# -P rax_username=$RAX_USER_NAME \
# -P rax_apikey=$RAX_API_KEY
# -P host_name=$WHAT_YOU_WANT_TO_CALL_IT
#
# What to expect:
# Usage:
# heat -v stack-create $YOUR_STACK_NAME \
# --template-file /path/to/grafana.template \
# -P rax_tenant=$RAX_TENANT_ID \
# -P rax_username=$RAX_USER_NAME \
# -P rax_apikey=$RAX_API_KEY
# -P host_name=$WHAT_YOU_WANT_TO_CALL_IT
#
# What to expect:
(defun gbj-backup-shell (&optional arg)
"makes a copy of the current shell with timestamp appended to the filename"
(interactive)
(let*
(
(save-dir "~/build/shells/")
(orig-file arg)
(mod-str nil)
)
(if (not orig-file)
(lexical-let
((curbuf 0)
(buflist '("shell1"
"shell2"
"shell3"
"shell4"
"shell5"
"shell7"
"shell8"
"shell9"
First create a server with a socket repl using
clojure.contrib.server-socket:
(defn start-server[host port]
(create-repl-server port)
(repl))
Then create a bunch of netbots and have each use a repl to communicate
with the server repl. Have that repl request a new job from
(ns gjahad.socket-repl
(:use clojure.main)
(:use clojure.contrib.server-socket)
(:import java.net.Socket)
(:import java.net.InetAddress)
(:import clojure.lang.LineNumberingPushbackReader)
(:import java.io.InputStreamReader)
(:import java.io.OutputStreamWriter))
(def *port* 4455)