我是Riemann和clojure的新人。我尝试根据更改的状态配置警报。但这些州似乎永远不会被更新/索引。所以当我到达改变状态块时,状态为零。我可以在splitp块中添加警报,但这似乎是多余的。也许我们需要在关键和警告之间进行不同类型的通知,但就目前而言,我希望看到这项工作(如果可能的话)。
(let [index (default :ttl 20 (index))]
(streams
index
(where (not (state "expired"))
(where (service "load/load/shortterm")
(splitp < metric
0.05 (with :state "critical" index)
0.02 (with :state "warning" index)
(with :state "ok" index))
)
#(info %)
(changed-state {:init "ok"}
(stable 60 :state
#(info "CHANGED STATE" %)
(email "user@host.com")))
)
)
)
感谢您的帮助!
Riemann v0.2.9,收集v5.5.0,OS CentOS 6.5