1

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))))

前もって感謝します

4

0 に答える 0