Created
March 13, 2020 04:40
-
-
Save sospartan/6c6b1072703fd5fe11318a99dfaee8eb to your computer and use it in GitHub Desktop.
logstash config to replay day by day
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
input { | |
generator { | |
lines => [ | |
"recap" | |
] | |
count => 1 | |
} | |
} | |
filter { | |
ruby { | |
code => " | |
require 'time' | |
dates=*(Date.new(2019, 07, 01)..Date.today()) | |
dates.each { |x| x.strftime('%Y-%m-%d') } | |
event.set('message', dates.join(',')); | |
" | |
} | |
split { | |
field => "message" | |
terminator => "," | |
} | |
} | |
output { | |
stdout {codec => json_lines} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment