Skip to content

Instantly share code, notes, and snippets.

View bmhatfield's full-sized avatar
🍌
I'm a banana.

Brian Hatfield bmhatfield

🍌
I'm a banana.
View GitHub Profile
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 {
@bmhatfield
bmhatfield / gist:5454382
Created April 24, 2013 18:31
Attributes
time: 1366828063
service: "myservice"
host: "myhost.foobar.com"
ttl: 300.0
attributes {
key: "zoinks"
value: "4"
}
attributes {
key: "forks"
; 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"}))