Kibana ins't displaying correct dates


#1

Hi,

I'm stuck on a problem since 1 or 2 days and i can't get the solution. My problem is with date fields in my data, Kibana isn't displaying the good value of month. There is a difference of 10 months between each equivalent date, i'm quite sure that the problem isn't caused by timezone or date format, I searched a long time on topics but i found no solutions (I may be wrong).
If someone have an idea that could be cool :wink:

Here is the value of my data in elastic (I just masked data confidential & non relevant for this topic) :

image

Here is the same data in Kibana :

My dates settings on Kibana :

Thanks.


Elastic index mapping changing my date month value
(Marius Dragomir) #2

Can you look at the request made by kibana to ES and the answer when the date is not right? And then if you can, post it here, removing the sensitive data that you have.


#3

Thanks for your response Marius,

I'm new on the ELK stack, Can you tell me where I can get this request and the answer ?


#4

You are maybe talking about this request ?


#5

I think that I found where the problem come from. I tried to recreate my elastic index without any mapping and the dates were the same as the data that I receive. After that I reapplied the index mapping and the error came back.

This is the mapping :

I tried to delete date format string to only keep the type 'date'. But Elastic return me an error, and I've to set those 3 fields in date type.

Does someone have an idea why the index mapping bring this problem ?

Thanks,
Nevox


#6

I discovered new things. I think that its not the mapping itself that cause this problem but Kibana. While searching in Kibana request body, I discovered that Kibana received a 'field' object for each data and in this object contain all the fields that i mapped in date format + the timestamp.

Here is the screenshots of the answer of the request made by Kibana :

image

And here the same data in Kibana (Here we can also see the 'Fields' object):

I think that Kibana replace all the date fields values with the values in this object. I don't why because I never tell Elastic to send this object or Kibana to replace the values.

I searched a lot on the internet but I didn't found a similar topic. If someone have an idea of why Kibana is doing that, it would be awesome :stuck_out_tongue:

Thanks,
Nevox


(Bryan Stuhlsatz) #7

You are not using the date format correctly. See: https://www.elastic.co/guide/en/elasticsearch/reference/1.4/mapping-date-format.html

dd-MM-yyyy

Also keep in mind that what you see in kibana visualizations timeframe might differ from what you see if you used Dev Tools or a rest client, as the latter will show the epoc time. Kibana will display the time in reference to your timezone.


#8

Oh yeah you're right, my bad. Thanks a lot for the reply :wink:


Elastic index mapping changing my date month value