私はリーマンとクロージュアも初めてです。必要なのは、新しいイベントが発生したときに、その状態とサービスをチェックし、両方が一致した場合、コンソールに何かを出力することです。ここに私の設定ファイルがあります。
(let [index (default :ttl 300 (update-index (index)))]
; Inbound events will be passed to these streams:
(streams
; Index all events immediately.
index
; Calculate an overall rate of events.
(with {:metric 1 :host nil :state "ok" :service "events/sec"}
(rate 5 index))
; my code starts from here
; _______________________
(where (and (= :service "foo")
(= :state "ok"))
(println "It works"))
;________ENDS HERE ______________
; Log expired events.
(expired
(fn [event] (info "expired" event)))
))
riemann を起動すると、コンソールに "It Works" と表示されます。しかし、その後はありません。どこが間違っているのか教えてください。