Skip to content

Instantly share code, notes, and snippets.

@jrask
Created June 17, 2016 04:55
Show Gist options
  • Save jrask/6f5e85842073e16a92ce9efba3b643f2 to your computer and use it in GitHub Desktop.
Save jrask/6f5e85842073e16a92ce9efba3b643f2 to your computer and use it in GitHub Desktop.
Sample of running lumbermill locally and testing grok
package lumbermill
import lumbermill.api.Codecs
import rx.Observable
import static lumbermill.Core.*
// Simply replace with correct contents and play around
Observable.just(Codecs.TEXT_TO_JSON.from('Hello World'))
.flatMap (
grok.parse (
field : 'message',
pattern : '%{NUMBER:notexisting}',
tagOnFailure : true,
tag : 'myCustomFailureTag')
)
.doOnNext(console.stdout())
.subscribe()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment