How Can I make my csv fields available on the Filter drop down in Kibana when discovering the data via the index?

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
}
}
}
}
}
}
}
}

Did you refresh the fields in Kibana?

Yes, and when I select the filter drop down box, all I see is _ID

Are the mappings and conf file set up correctly?

It must be something with either that csv filter plugin OR the configuration because I am also using the Jenkins-logstash plugin without any issues, and all fields are showing from the filter drop down

Since I upgraded to 6.0 this is no longer an issue.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.