Created
July 22, 2014 11:49
-
-
Save bfritz/3eec6a6fb3dc97afa541 to your computer and use it in GitHub Desktop.
logstash ruby date range tagging for backfill
This file contains hidden or 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
filter { | |
ruby { | |
init => 'AFTER_EVENT = LogStash::Event.new; AFTER_EVENT.timestamp="2014-06-30T23:59:59.748Z"; BEFORE_EVENT = LogStash::Event.new; BEFORE_EVENT.timestamp="2014-07-22T02:01:56.000Z"' | |
code => 'if event.unix_timestamp > AFTER_EVENT.unix_timestamp && event.unix_timestamp < BEFORE_EVENT.unix_timestamp then event.tags.push("backfill") end' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment