Skip to content

Instantly share code, notes, and snippets.

@aliartiza75
Created July 26, 2020 18:08
Show Gist options
  • Save aliartiza75/37d1a6e86bb8f0208a21b25385f74a04 to your computer and use it in GitHub Desktop.
Save aliartiza75/37d1a6e86bb8f0208a21b25385f74a04 to your computer and use it in GitHub Desktop.
Logstash Config file to dump csv data in elasticsearch
input {
file {
path => "/home/irtiza/data.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
columns => ["name", "address"]
separator => ","
}
mutate {
remove_field => [ "host", "path", "message" ]
}
}
output {
elasticsearch {
hosts => "<elasticsearch-url>:443"
index => "csv-data"
}
stdout {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment