Scripted Date Aggs


How can I take my @timestamp field and get the hourOfDay count over a period?

In other words I would like to see how many records have a timestamp for each hour of the day.

I am running elasticsearch 2.0

Thanks in advance!

Best way I have found to do this is to point KB to your ES cluster and then build a viz that matches what you want to see, then check the query it creates.

I read that kibana 4.2 no longer supports groovy scripts.

Like in this article

hello ,See your problem, I have a question, I want to filter the time, how to do? thanks

@liweigao Please ask your question in a new separate topic so that this topic does not get sidetracked into two different discussions.

Is a Date Histogram Aggregation what you're looking for? You can set your time interval to be by the hour.

I thought that too but that would give me every hour between the dates rather then say the 11th hour of every day combined.

For example if i did 2015-11-01 through 2015-11-07 I would want the 0-24 hour sum.

2015-11-01 11:00:00 +
2015-11-02 11:00:00 +
2015-11-03 11:00:00 +

You used to be able to do it and it would show 24 bars (one for each hour of the day) and add up that hour from every day in the range.

ok Thank you