Issue with date field loaded in Kibana through elasticsearch

Hi,

I have used logstash and loaded data through elasticsearch. I created indexpattern to the loaded index and trying to create visualization.
I'm unable to create Date Histogram, since the date fields (closed_at, work_start) are showing up as string in Kibana.

These fields were configured in Logstash as Date type and show up as Date type in Elasticsearch. I had modified the scripted field to return this value as date. But it throws error in visualization. Please help.

Below is the error message:
[esaggs] > Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"aggregation_execution_exception","reason":"Unsupported script value [2015-07-06 11:56:23], expected a number, date, or boolean"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"bas-change","node":"Jqh-N9vqTGKKTWbjIAYXdw","reason":{"type":"aggregation_execution_exception","reason":"Unsupported script value [2015-07-06 11:56:23], expected a number, date, or boolean"}}]},"status":500}

Hello,

Double-check in Discover that it has in fact been encoded as a Date field. Depending on your version of Kibana, it should look something like this:

image

If it looks like a String field instead, the problem is likely specific to your logstash configuration.

Regards,
Aaron

Thanks Aaron. We got this fixed today. We had an issue with the scripted field code and its working fine now.

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