【发布时间】:2015-11-03 19:02:38
【问题描述】:
我正在尝试使用查询在 riemann-dashboard 上显示图表 “pingDelay > 0”。
我已经使用以下代码索引了我的数据
(let [index (index)]
(defn write-dht-metric [e]
(let [dhtstate (re-find #"dht_status: health\.(\S+), msg count (\d+) \((\d+) bytes\).*peak \{ping = (\d+)" (:pgmsg e))]
(if (not= dhtstate nil)
(do
(prn "RESULT>" dhtstate)
(index {:host "dht-info"
:service (:service e)
:time (unix-time)
:dhtStatus (get dhtstate 1)
:msgCount (get dhtstate 2)
:pingDelay (get dhtstate 3)}
)
)
)
)
)
)
但是,我在图表上没有得到任何东西。早些时候,我认为可能是因为我的“pingDelay”在字符串“12345”中,所以我也尝试了“:pingDelay #(Long.(get dhtstate 3))”,但没有成功。
谁能帮我看看我必须做些什么才能让它工作?
问候
【问题讨论】:
标签: clojure riemann riemann-dashboard