tnn1t1s / riemann-elastic

riemann to elastic search in a way that's useful to logstash kibana
Other
13 stars 7 forks source link

Any reason es-index shouldn't work from (expired) ? #6

Open dirtyvagabond opened 8 years ago

dirtyvagabond commented 8 years ago

Hi @tnn1t1s , thanks for riemann-elastic!

I've wired it into my Riemann instance and I'm able to use es-index to forward Riemann events to ES from (streams) and they show up in the ES index. However, when i try to forward events from (expired), i don't see those show up in ES.

Here is what works:

...
(streams
  (elastic/es-index "riemann-elastic" :index "myindex")
...
)

But this doesn't work:

...
  (expired
    (elastic/es-index "riemann-elastic" :index "myindex")
    ...
  )
...

Is there any reason why calling es-index from (expired) shouldn't work?

Any hints or clues greatly appreciated...

tnn1t1s commented 8 years ago

I think you want to do something like

(let [index (default :ttl 3 (tap :index (index)))](streams %28expired #%28prn "Expired" %) (elastic/es-index "riemann-elastic" :index "myindex))