Skip to content

Instantly share code, notes, and snippets.

@dch
Created February 9, 2013 20:42
Show Gist options
  • Save dch/4747037 to your computer and use it in GitHub Desktop.
Save dch/4747037 to your computer and use it in GitHub Desktop.
(graphite-server
:port 2002
:host "0.0.0.0"
:parser-fn (fn [{:keys [service] :as event}]
(if-let [[src host service & tags]
(clojure.string/split service #"\.")]
{:host (clojure.string/replace host #"_" ".")
:service (clojure.string/join "." (concat [service] tags))
:tags (concat tags ["graphite" src service])})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment