我是黎曼和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")))
)
)
)
谢谢你的帮助!
黎曼 v0.2.9,collectd v5.5.0,操作系统 CentOS 6.5