   "
   [{:keys [host service]
     :or {host "" service ""}}]
-  (let [host (s/replace host "." ",")
+  (let [host (host->xymon host)
         service (s/replace service #"(\.| )" "_")]
     (format "enable %s.%s" host service)))
 

            [clojure.tools.logging :refer [error]]
            [clojure.math.numeric-tower :refer [ceil]])
  (:import java.net.Socket))

(defn event->status
  "Formats an event as a Xymon status message:

  [{:keys [ttl host service state description]
    :or {host "" service "" description "" state "unknown"}}]
  (let [ttl-prefix (if ttl (str "+" (int (ceil (/ ttl 60)))) "")
        host       (host->xymon host)
        service    (s/replace service #"(\.| )" "_")]
    (format "status%s %s.%s %s %s\n"
            ttl-prefix host service state description)))
