Skip to content

Instantly share code, notes, and snippets.

@iamhowardtheduck
Last active March 15, 2020 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamhowardtheduck/d6415382677d81dd8d458bb231a8da7b to your computer and use it in GitHub Desktop.
Save iamhowardtheduck/d6415382677d81dd8d458bb231a8da7b to your computer and use it in GitHub Desktop.
Coronavirus "COVID-19-euro.conf" Logstash Pipeline
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