Clojure 添加clj-time.core时,Rieman中的汇总功能不起作用
我使用riemann触发电子邮件警报,该警报应仅在每天凌晨3点至晚上8点触发。当我添加clj-time.core函数时,汇总函数不起作用 不知道我错在哪里。感谢您的帮助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})]
(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)](以及(