Skip to content

Instantly share code, notes, and snippets.

@sarguru
Created December 29, 2013 20:44
Show Gist options
  • Save sarguru/8174635 to your computer and use it in GitHub Desktop.
Save sarguru/8174635 to your computer and use it in GitHub Desktop.
tag doesnt work
; (5556)
(let [host "0.0.0.0"]
(tcp-server :host host)
(udp-server :host host)
(ws-server :host host)
(graphite-server :host host))
(streams
( where (service =~ "%servers%")
( tag "graphite" )
)
(tagged-all "graphite" prn )
(let [client (tcp-client :host "192.168.19.1")]
(by [:host :service]
(forward client))))
@sarguru
Copy link
Author

sarguru commented Dec 29, 2013

Using local /usr/local/java/jdk-7u25

INFO [2013-12-29 17:26:14,091] main - riemann.bin - PID 13269

ERROR [2013-12-29 17:26:14,120] main - riemann.bin - Couldn't start
java.lang.IllegalStateException: replace already refers to: #'clojure.string/replace in namespace: riemann.graphite
at clojure.lang.Namespace.warnOrFailOnReplace(Namespace.java:88)
at clojure.lang.Namespace.reference(Namespace.java:110)
at clojure.lang.Namespace.refer(Namespace.java:168)
at clojure.core$refer.doInvoke(core.clj:3850)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at riemann.graphite$eval31$loading__4910__auto____32.invoke(riemann.config:8)
at riemann.graphite$eval31.invoke(riemann.config:8)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.eval(Compiler.java:6608)
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)

@sarguru
Copy link
Author

sarguru commented Dec 29, 2013

(defn graphite-path-sarguru [event]
(let [service (:service event)
        host (:host event)
        split-service (if service (split service #" ") [])
        split-host (if host (split host #"\.") [])]
     (string/join "." ( split-service)))
 )


(def graph (graphite {:host "10.128.35.105" :path "graphite-path-sarguru"}))

@sarguru
Copy link
Author

sarguru commented Dec 29, 2013

(defn graphite-path-sarguru [event]
(let [service (:service event)]
     service )
 )


(def graph (graphite {:host "10.128.35.105" :path "graphite-path-sarguru"}))

@sarguru
Copy link
Author

sarguru commented Dec 29, 2013

(defn graphite-path-sarguru [event]
(let [service (:service event)]
     service )
 )


(def graph (graphite {:host "10.128.35.105" :path graphite-path-sarguru}))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment