Skip to content

Instantly share code, notes, and snippets.

@apoorv74
Last active October 4, 2016 08:07
Show Gist options
  • Save apoorv74/5eecdce2f993c4e34d43baf889b601d9 to your computer and use it in GitHub Desktop.
Save apoorv74/5eecdce2f993c4e34d43baf889b601d9 to your computer and use it in GitHub Desktop.
This is a logstash configuration file
input{
stdin{}
}
filter{
csv{
separator=>","
columns=>["lon","lat","no_discount","discount","total_transactions"]
}
mutate{
remove_field=>["message","host","@timestamp","@version"]
}
mutate{
convert=>{"lon"=>"float"}
convert=>{"lat"=>"float"}
convert=>{"no_discount"=>"float"}
convert=>{"discount"=>"float"}
convert=>{"total_transactions"=>"float"}
}
mutate{
rename=>{
"lon"=>"[location][lon]"
"lat"=>"[location][lat]"
}
}
}
output{
stdout
{
codec=>rubydebug
}
elasticsearch
{
index=>"logstash-discount2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment