Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn add-prefix [pfx event] (str pfx "." (riemann.graphite/graphite-path-percentiles event)))
- (let [index (index)
- graph-riemann-metric (graphite {:host "localhost" :path (partial add-prefix "riemann.metrics")})
- graph-other-prefix (graphite {:host "localhost" :path (partial add-prefix "other.prefix")})]
- (streams
- (adjust [:host (fn [host] (clojure.string/replace host #"\." "_"))]
- (smap (fn [event] (assoc event :time (unix-time)))
- (by :host
- (with {:service "host_messages_per_second" :metric 1}
- (rate 1
- index
- graph-riemann-metric
- graph-other-prefix)))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement