안녕하세요. 제가 geo_point 데이터를 2개 쓰고 싶어서 아래와 같이 작성하였는데요. logstash를 실행하면 elasticsearch에 잘 전달한 것 같은데 kibana를 보면 데이터가 들어와있지 않습니다. 어떤 오류인지 모르겠습니다.
input {
file {
path => "/Users/user/Downloads/coronavirusdataset_20200601/PatientRoute.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ","
columns => ["patient_id","global_num","date","province","city","type","lat","lon","city_lat","city_lon"]
}
mutate {convert => ["lat", "float"]}
mutate {convert => ["lon", "float"]}
mutate {convert => ["city_lat", "float"]}
mutate {convert => ["city_lon", "float"]}
mutate {convert => ["global_num", "float"]}
mutate {
add_field => {"[location-specific][lat]" => "%{lat}"}
add_field => {"[location-specific][lon]" => "%{lon}"}
add_field => {"[location-city][city_lat]" => "%{city_lat}"}
add_field => {"[location-city][city_lon]" => "%{city_lon}"}
}
mutate {
convert => {"[location-specific][lat]" => "float"}
convert => {"[location-specific][lon]" => "float"}
convert => {"[location-city][city_lat]" => "float"}
convert => {"[location-city][city_lon]" => "float"}
}
output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "map_test"
user => "elastic"
password => "비밀번호"
}
stdout { codec => rubydebug {metadata => true}}
stdout { codec => dots }
}
kibana dev tools로 미리 index 설정해두고 logstash 실행시켰습니다.
PUT map_test/_mapping
{
"properties": {
"location-specific": {
"type": "geo_point"
},
"location-city": {
"type": "geo_point"
}
}
}