This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time: 1366828063 | |
service: "myservice" | |
host: "myhost.foobar.com" | |
ttl: 300.0 | |
attributes { | |
key: "zoinks" | |
value: "4" | |
} | |
attributes { | |
key: "forks" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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"})) |
NewerOlder