Created
July 26, 2020 18:08
-
-
Save aliartiza75/37d1a6e86bb8f0208a21b25385f74a04 to your computer and use it in GitHub Desktop.
Logstash Config file to dump csv data in elasticsearch
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 => "/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