I am newbie and facing a very strange issue. I did a lot of search but could not find solution to it. I am actually trying to define a string variable in my riemann config file. I am using syntax as given below
(streams
(def mystr "system manager is launching br123 on dir01")
;(prn mystr)
;(def myfind (re-find #"system manager is launching (\S+) on (\S+)" mystr))
;(pr-str myfind)
;(pr-str (get myfind 1))
)
Everytime, I run riemann, it gives me below error java.lang.String cannot be cast to clojure.lang.IFn
Can anyone please tell me what I am doing wrong?
Regards
define your constants outside the (streams .... )
expression.
the streams macro is trying to run it as if it where a function. I like to define all constants at the top of the config file though that's just personal preference.