I am fetching the date field in ES as timestamp field in kibana. If the date is "2017-01-17" in ES, the same data in kibana the timestamp range is "2017-01-16 00:00:00.00" to "2017-01-16 20:00:00.000"
Could you please explain , why there is a difference of one day ?
Could we change the default setting of time stamp shown "last 15 minutes" ?
That's very strange. How is this field being mapped? This sounds like it might be related to https://github.com/elastic/kibana/issues/10575. Could you take a look at that issue and tell me if it describes your problem?
Alternatively, this could be some kind of weird timezone issue.
In answer to your second question, you can configure the default timepicker range in Management > Advanced Settings:
Yes, the problem is exactly the issue mentioned in the post.
But , as the solution mentioned in the issue to map
"date1" : { "type" : "date","format":"strict_date"}
i tried this and indexed the data but kibana is showing {date-1} again
In kibana the date field is timestamp with above mapping , when i select any visualization graph with x-axis as date histogram and interval as "daily" . In X-axis the date is repeating more than once. The graph screen shot is attached below.
This is just a side effect of the way we render axes. We render tick marks at regular intervals and then attempt to label them wherever there's space. Because your time range is so short (1 or 2 days), there are multiple tick marks which fall within a single day. So when the label is rendered for those tick marks, is just shows the current day they fall in, which happen to be the same day.
I agree it's kind of confusing, but it's not a bug with your data. If you'd like to see this fixed, would you mind filing an issue on our repo?
Oh, I meant it is a bug with Kibana, but it's not a bug with your data. So you can definitely open an issue if you'd like us to improve the UI.
Are there timezones associated with the dates in ES? Are they the same timezone you're in? I wonder if Kibana is adding time to account for a timezone difference.
In the data, there is no time zones with the date field. I specified a strict_date mapping too before indexing.
Format of "date" field is "yyyy-mm-dd" .
Might be kibana is taking a default time zone it considers as "UTC" along with the date. But, my time zone is not UTC.
How could i mention to kibana to consider just the date ?
Hmm OK. I'd like to verify that the timezones are the problem. Would you mind setting your system timezone to UTC to see if the makes the dates appear correctly?
If so, then we know that timezones are causing this issue. Not sure of the solution, if that's the case. I can ask some of the other engineers.
Yes, when i change the system time to UTC . The dates is correct in kibana.
Kibana is translating the timestamps from elasticsearch (stored as UTC) into the browser's local timezone.
So solution as mentioned in github repo is :
Kibana doesn't currently support dates without time, sending the timestamps in ISO 8601 format with the correct timezone can help elasticsearch to properly translate those times into UTC which Kibana can then properly translate into whatever the local timezone is.
I added a constant time to date field - date = date + " 12:00:00" and the below mapping
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.