Below have pasted the .conf file and the mappings output:
root@ubuntu-16:/etc/logstash/conf.d# cat bzip4-v4.conf
input {
file {
path => "/opt/sample-data/csv/bzip4/*.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
convert => {
"column1" => "boolean"
"column2" => "integer"
}
}
}
output {
elasticsearch { hosts => ["localhost:9200"]
embedded => "true"
action => "index"
index => "bzip4-v4"
document_type => "csv"
document_id => "%{property_id}"
user => "logstash_internal"
password => "xxxxxxxx"
hosts => ["10.0.2.15:9200"]
}
stdout {codec => rubydebug}
}
==================================================================
The index is created but when I Discover the data in Kibana, and select filter, I cannot see my two fields 'column1' and 'column2' as searchable fields in the filter drop down. Here is the mapping:
root@ubuntu-16:/etc/logstash/conf.d# curl -u elastic:changeme -XGET 'localhost:9200/bzip4-v4/_mapping/?pretty'
{
"bzip4-v4" : {
"mappings" : {
"logs" : {
"properties" : {
"@timestamp" : {
"type" : "date"
},
"@version" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"column1" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"column2" : {
"type" : "long"
},
"host" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"message" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"path" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
}
}
}
}