Last active
March 15, 2020 13:08
-
-
Save iamhowardtheduck/d6415382677d81dd8d458bb231a8da7b to your computer and use it in GitHub Desktop.
Coronavirus "COVID-19-euro.conf" Logstash Pipeline
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 { | |
file { | |
path => "/var/log/COVID-19-Euro/*.csv" | |
start_position => "beginning" | |
} } | |
filter { | |
csv { | |
skip_empty_columns => true | |
skip_empty_rows => true | |
autodetect_column_names => true | |
columns => ["Date","CountryName","NewCase","NewDeath","Country","RXcode","EU"] | |
convert => { | |
"NewCase" => "integer" | |
"NewDeath" => "integer" | |
} | |
} | |
if [Deaths] == "Deaths" { drop { } } | |
grok { match => [ "Date", "(?<Year>\d{4})\/(?<Month>\d{2})\/(?<Day>\d{2})" ] } | |
date { match => [ "Date", "yyyy/MM/dd" ] } | |
} | |
# Replace *'s with your info | |
output { | |
elasticsearch { | |
hosts => ["***********"] | |
index => "covid-19-euro" | |
ilm_enabled => true | |
ilm_policy => "Coronavirus" | |
manage_template => false | |
user => "********" | |
password => "*******" | |
ssl_certificate_verification => false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment