 (ns samsara.trackit.reporter
   (:import  [java.util.concurrent TimeUnit]
             [com.codahale.metrics MetricFilter])
-  (:require [metrics.reporters.graphite :as graphite]
-            [metrics.reporters.console :as console]
-            #_[metrics.reporters.ganglia :as ganglia])
-  (:import  [com.codahale.metrics.ganglia GangliaReporter]
-            [info.ganglia.gmetric4j.gmetric GMetric GMetric$UDPAddressingMode])
-  (:import  [com.codahale.metrics.riemann RiemannReporter Riemann]
-            [com.aphyr.riemann.client RiemannClient TcpTransport])
+  (:require [metrics.reporters.console :as console]))
 
-  #_(:import  [com.bealetech.metrics.reporting StatsdReporter Statsd]))
 
 (defmulti start-reporting (fn [registry cfg] (:type cfg)))
 

    :or  {reporting-frequency-seconds 10, host "localhost", port 2003, prefix "trackit"
          rate-unit TimeUnit/SECONDS, duration-unit TimeUnit/MILLISECONDS} :as cfg}]

  (graphite/start
   (graphite/reporter registry cfg)
   reporting-frequency-seconds))

(comment
  (defmethod start-reporting :statsd

      :or  {reporting-frequency-seconds 10, host "localhost", port 8125, prefix "trackit"
            rate-unit TimeUnit/SECONDS, duration-unit TimeUnit/MILLISECONDS} :as cfg}]

))


(defmethod start-reporting :riemann
  [registry
   {:keys [reporting-frequency-seconds host port prefix rate-unit duration-unit]
    :or  {reporting-frequency-seconds 10, host "localhost", port 5555, prefix "trackit"
          rate-unit TimeUnit/SECONDS, duration-unit TimeUnit/MILLISECONDS} :as cfg}]

)



(defmethod start-reporting :ganglia
  [registry
   {:keys [reporting-frequency-seconds host port prefix rate-unit duration-unit]
    :or  {reporting-frequency-seconds 60, host "localhost", port 8649, prefix "trackit"
          rate-unit TimeUnit/SECONDS, duration-unit TimeUnit/MILLISECONDS} :as cfg}]

)
