Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Clojure 添加clj-time.core时,Rieman中的汇总功能不起作用_Clojure_Riemann - Fatal编程技术网

Clojure 添加clj-time.core时,Rieman中的汇总功能不起作用

Clojure 添加clj-time.core时,Rieman中的汇总功能不起作用,clojure,riemann,Clojure,Riemann,我使用riemann触发电子邮件警报,该警报应仅在每天凌晨3点至晚上8点触发。当我添加clj-time.core函数时,汇总函数不起作用 不知道我错在哪里。感谢您的帮助 (tcp-server {:host "127.0.0.1" :port 5555}) (let [userindex1 (default :ttl 300 (update-index (index)))]) (let [email (mailer {....email configuration})]

我使用riemann触发电子邮件警报,该警报应仅在每天凌晨3点至晚上8点触发。当我添加clj-time.core函数时,汇总函数不起作用

不知道我错在哪里。感谢您的帮助

(tcp-server {:host "127.0.0.1" :port 5555})

(let [userindex1 (default :ttl 300 (update-index (index)))])  
  (let [email (mailer {....email configuration})]
            (streams
        (where (service "log")
            (smap
              (fn [events]
               (let [count-of-transaction (count (filter #(= "error" (:type %)) events))]
                  (event
                  {
                     :status "Failure"
                     :metric  count-of-failures 
                     :total-fail (< count-of-failures 2)})))

              (where (let [now (clj-time.core/now)]
                    (and (<= 3 (clj-time.core/hour now) 20)
                         (= (:status event) "Failure")
                         (:total-fail event)))
                (rollup 1 200
                (email "xxx@xx.com")
                 ))prn))))
(tcp服务器{:主机“127.0.0.1”:端口5555})
(let[userindex1(默认值:TTL300(更新索引))))
(让[电子邮件(邮件{…电子邮件配置})]
(溪流
(其中(服务“日志”)
(smap)
(fn[事件]
(let[事务计数(计数(过滤器#(=“错误”(:类型%)事件))]
(事件
{
:状态“失败”
:故障的度量计数
:总失败次数(<失败次数2)})
(其中(让[现在(clj time.core/now)]

(和(什么不起作用?错误消息是什么?它不会抛出任何错误消息,但只要满足条件,它就会在我添加此代码时触发电子邮件
(让[now(clj time.core/now)])(和(什么不起作用?错误消息是什么?它不会抛出任何错误消息,但只要满足条件,它就会在我添加此代码时触发电子邮件
(让[now(clj time.core/now)](以及(