我是关闭的新手,并试图设置Riemann来监视服务器资源和应用程序事件。我有一个 Riemann 服务器设置,并正在尝试添加一个 Riemann 客户端,它将事件转发到 Riemann 服务器。
这是我的黎曼客户端配置文件:
; -*- mode: clojure; -*-
; vim: filetype=clojure
(logging/init :file "/var/log/riemann/riemann.log")
(require 'riemann.client)
; Listen on the local interface over TCP (5555), UDP (5555), and websockets (5556)
(let [host "0.0.0.0"]
(tcp-server :host host)
(udp-server :host host)
(ws-server :host host))
; Expire old events from the index.
(periodically-expire 10 {:keep-keys [:host, :service, :tags, :state, :description, :metric]})
(let [index (index)
downstream (batch 100 1/10
(async-queue! :agg { :queue-size 1e3
:core-pool-size 4
:max-pool-size 32}
(forward
(riemann.client/tcp-client :host "10.11.5.10"))))]
(streams ; Inbound events will be passed to these streams:
(default :ttl 60 ; Keep events in the index for 1 minute by default.
index
#(info %)
(where (service #"^riemann.*") ; Send any events with service starting with riemann downstream
downstream))))
每次我尝试启动 Riemann 时,都会在日志中打印以下异常:
ERROR [2016-05-17 14:58:58,118] main - riemann.bin - Couldn't start
clojure.lang.ArityException: Wrong number of args (3) passed to: client$batch
at clojure.lang.AFn.throwArity(AFn.java:437)
at clojure.lang.AFn.invoke(AFn.java:47)
at riemann.config$eval36.invoke(riemann.config:23)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.Compiler.loadFile(Compiler.java:7020)
at clojure.lang.RT$3.invoke(RT.java:318)
at riemann.config$include.invoke(config.clj:285)
at riemann.bin$_main.doInvoke(bin.clj:61)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at riemann.bin.main(Unknown Source)
我从 pg 中提取了这个配置文件(几乎是逐字逐句)。詹姆斯·特恩布尔 (James Turnbull) 的《监测的艺术》第93页。所以我很困惑我可能做错了什么。有人可以帮我理解为什么这个配置文件会抛出错误数量的 args 错误吗?
谢谢