   (let [metrics (jenkins/collect-metrics (jenkins/http-source (:credentials config)) (:url config))]
     (doall (map #(store/put-document % mapping) metrics))))
 
-(def collector-details
-  {:name    "jenkins-collector"
-   :version (util/get-project-version 'kuona-jenkins-collector)})
-
 (defn collector-log
   "Posts details of the collector to the API server to record the collector run"
   [api-url collector-details parameters status]

    (http/post url body)))


(defn log-collection [api-url collector-details params f]
  (try+
   (collector-log api-url collector-details params :started)
   
   (f)
   
   (collector-log api-url collector-details params :stopped)
   (catch Object _
     (collector-log api-url collector-details params :failed))))

(ns jenkins-collector.main
  (:require [cheshire.core :refer :all]
            [clj-http.client :as http]
            [clojure.string :as string]
            [clojure.tools.logging :as log]
            [jenkins-collector.jenkins :as jenkins]
            [kuona-core.cli :as cli]
            [kuona-core.metric.store :as store]
            [kuona-core.util :as util]
            [slingshot.slingshot :refer :all])
  (:gen-class))

(def cli-options
