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