Created
May 12, 2021 05:56
-
-
Save DarkcoderSe/82a15c38d4f20dc9339d7f513a0b4303 to your computer and use it in GitHub Desktop.
Logstash configuration file to index data
This file contains hidden or 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/darkcoder/Node/etlapp/db/cdm_uq_hospitals2.csv" | |
start_position => "beginning" | |
sincedb_path => "/dev/null" | |
} | |
} | |
filter { | |
csv { | |
separator => "," | |
columns => ["id","facility_id","code","description","price","original_code","facility_name","address","city","state","zip_code","phone_number","latitude","longitude"] | |
} | |
if [latitude] and [longitude] { | |
mutate { convert => {"latitude" => "float"} } | |
mutate { convert => {"longitude" => "float"} } | |
mutate { rename => {"latitude" => "[location][lat]"} } | |
mutate { rename => {"longitude" => "[location][lon]"} } | |
} | |
} | |
output { | |
elasticsearch { | |
hosts => ["localhost:9200"] | |
index => "indexA1" | |
manage_template => true | |
} | |
stdout {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment