(defn sendto-riemann
"Send events to downstream riemann server"
[]
(let [host (or (System/getenv "SEQUENCE_RIEMANN_HOST") "0.0.0.0")
port (or (System/getenv "SEQUENCE_RIEMANN_PORT") "5555")]
(riemann.streams/batch 100 1/10
(riemann.config/async-queue! :agg {:queue-size 1000
:core-pool-size 4
:max-pool-size 32}
(riemann.streams/forward
(riemann.client/tcp-client :host host :port (read-string port)))))))
(defn sendto-influxdb
"Send events to influxDB"
[]
(let [influxdb-creds {
:version :0.9
:host (or (System/getenv "INFLUXDB_HOST") "localhost")
:port (or (System/getenv "INFLUXDB_PORT") "8086")
:db (or (System/getenv "INFLUXDB_DB") "riemann")
:username (or (System/getenv "INFLUXDB_USER") "riemann")
:password (or (System/getenv "INFLUXDB_PASSWD") "riemann")}]
(riemann.streams/batch 100 1/10
(riemann.config/async-queue! :agg {:queue-size 1000
:core-pool-size 4
:max-pool-size 32
:keep-alive-time 10000}
(riemann.influxdb/influxdb influxdb-creds)))))
(tagged "flow"
(sendto-influxdb))
(tagged "sequence"
(sendto-riemann))
clojure.lang.Compiler$CompilerException: java.lang.IllegalArgumentException: won't conj service: #object[riemann.service.ExecutorServiceService 0x3b5a19ed "riemann.service.ExecutorServiceService@3b5a19ed"] would conflict with (#object[riemann.service.ExecutorServiceService 0x15d236fd "riemann.service.ExecutorServiceService@15d236fd"]), compiling:(/Users/projs/riemann/src/fee.clj:56:1) at clojure.lang.Compiler.load(Compiler.java:7391) at clojure.lang.Compiler.loadFile(Compiler.java:7317) at clojure.lang.RT$3.invoke(RT.java:320) at riemann.config$include.invokeStatic(config.clj:406) at riemann.config$include.invoke(config.clj:384) at riemann.bin$_main.invokeStatic(bin.clj:99) at riemann.bin$_main.invoke(bin.clj:85) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.AFn.applyTo(AFn.java:144) at riemann.bin.main(Unknown Source)Caused by: java.lang.IllegalArgumentException: won't conj service: #object[riemann.service.ExecutorServiceService 0x3b5a19ed "riemann.service.ExecutorServiceService@3b5a19ed"] would conflict with (#object[riemann.service.ExecutorServiceService 0x15d236fd "riemann.service.ExecutorServiceService@15d236fd"]) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at clojure.lang.Reflector.invokeConstructor(Reflector.java:180) at riemann.core$conj_service.invokeStatic(core.clj:98) at riemann.core$conj_service.invoke(core.clj:81) at riemann.core$conj_service.invokeStatic(core.clj:84) at riemann.core$conj_service.invoke(core.clj:81) at clojure.lang.Atom.swap(Atom.java:51) at clojure.core$swap_BANG_.invokeStatic(core.clj:2261) at clojure.core$swap_BANG_.invoke(core.clj:2253) at riemann.config$service_BANG_.invokeStatic(config.clj:114) at riemann.config$service_BANG_.invoke(config.clj:81) at riemann.config$async_queue_BANG_.invokeStatic(config.clj:260) at riemann.config$async_queue_BANG_.doInvoke(config.clj:232) at clojure.lang.RestFn.invoke(RestFn.java:442) at cheetah.riemann.downstream$sendto_riemann.invokeStatic(downstream.clj:9) at cheetah.riemann.downstream$sendto_riemann.invoke(downstream.clj:3) at riemann.config$eval311.invokeStatic(fee.clj:67) at riemann.config$eval311.invoke(fee.clj:56) at clojure.lang.Compiler.eval(Compiler.java:6927) at clojure.lang.Compiler.load(Compiler.java:7379) ... 9 common frames omitted
Ah, you've named both async-queue services the same thing: :agg. Riemann is saying it can't run two with the same name at the same time.
--
You received this message because you are subscribed to the Google Groups "Riemann Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to riemann-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.