Skip to content

Instantly share code, notes, and snippets.

@mfournier
Last active August 29, 2015 13:58
Show Gist options
  • Select an option

  • Save mfournier/9973032 to your computer and use it in GitHub Desktop.

Select an option

Save mfournier/9973032 to your computer and use it in GitHub Desktop.
(streams
(where (service "riemann streams rate")
(fixed-time-window 10
(smap (fn [events]
(let [event_count (count events) now (quot (System/currentTimeMillis) 1000)]
(prn {:host "foo" :service "bar" :metric event_count :time now})
(index {:host "foo" :service "bar" :metric event_count :time now})
)
))
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment