Date histogram aggregation - Sum of field

(Khánh Võ) #1

Hi guys,
I have a problem when using Date histogram aggregation in Kibana:
My index: [logs]-YYYY.MM.DD
When I search from logs-2018.10.21 to logs-2018.10.23, I have a result:

When I search from logs-2018.10.21 to logs-2018.10.24, I have a result:

When I search from logs-2018.10.21 to logs-2018.10.25, I have a result:

Look at result from 2018.10.23, 2018.10.24. it's changes.
Why does sum of field change and how do I fix it?

I'm using ES 1.7.6 with Kibana 4.1, I tried on ES 5.6.6 with Kibana 5 but result the same.

(Christian Dahlqvist) #2

What happens if you create a date histogram for one index at a time? Indices in Elasticsearch are generally assigned based on UTC time zone while Kibana by default adjusts to the local time zone. The day reported in Kibana could therefore span multiple indices (depending on which time zone you are in) and is not necessarily aligned with the underlying indices. This could explain why the previous days data changes when you add another index. I do however not understand why the data for the 23rd changed when you added the index for the 25th, so it is also possible that you have data for the incorrect period in some of your indices.

(Khánh Võ) #3

I found my mistake.
Thank you so much.

(Christian Dahlqvist) #4

What was the cause of this?

(Khánh Võ) #5

When I run batch job to processing data of logs-2018.10.23 at 25th, I still use logs-2018.10.25 so document of logs-2018.10.23 is wrong.

(system) #6

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