Skip to content

Instantly share code, notes, and snippets.

Avatar
🍌
I'm a banana.

Brian Hatfield bmhatfield

🍌
I'm a banana.
View GitHub Profile
View gist:6003399
var fields map[string]interface{} = make(map[string]interface{})
func main() {
fields["device"] = json.RawMessage(`{"OMG": 13}`)
jsn, err := json.Marshal(fields)
if err == nil {
fmt.Println(string(jsn))
} else {
View gist:5454382
time: 1366828063
service: "myservice"
host: "myhost.foobar.com"
ttl: 300.0
attributes {
key: "zoinks"
value: "4"
}
attributes {
key: "forks"
View gist:5260740
; Expire old events from the index every 15 seconds.
(periodically-expire 10 {:keep-keys [:host :service :tags]})
(def rollup-ttl 60)
(def throttle-ttl 120)
(defn event-log [prefix]
(fn [e] (info prefix (str e))))
(def email (mailer {:from "riemann@domain"}))
You can’t perform that action at this time.