Created
June 17, 2016 04:55
-
-
Save jrask/6f5e85842073e16a92ce9efba3b643f2 to your computer and use it in GitHub Desktop.
Sample of running lumbermill locally and testing grok
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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