Skip to content

Instantly share code, notes, and snippets.

@aliartiza75
Created July 26, 2020 18:10
Show Gist options
  • Save aliartiza75/1269cad85e45aeabbaf056b89bdc63e6 to your computer and use it in GitHub Desktop.
Save aliartiza75/1269cad85e45aeabbaf056b89bdc63e6 to your computer and use it in GitHub Desktop.
logstash configuration 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"
ilm_enabled => false
}
stdout {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment