# Average number of logs

**URL:** https://discuss.elastic.co/t/average-number-of-logs/143134
**Category:** Kibana
**Created:** [August 6, 2018, 9:42am UTC](https://discuss.elastic.co/t/average-number-of-logs/143134 "2018-08-06T09:42:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sachinbal](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sachinbal](https://discuss.elastic.co/u/sachinbal)
#### Post date: [August 6, 2018, 9:42am UTC](https://discuss.elastic.co/t/average-number-of-logs/143134/1 "2018-08-06T09:42:46Z")

</div>

Hi,

Can anyone please help me create such a visualization report in kibana. I want to find out the average number of logs generated by the system per hour per day in a week. I am attaching an image of the report which I need.  
 ![avg%20number%20of%20logs](https://us1.discourse-cdn.com/elastic/original/3X/f/b/fb7c5a1d15131b76f80e3ae4b6f6e0fd8cc5f6d4.png)

The column on the left is the hourly breakup of time from 8 am to 9 pm. The remaining columns correspond to weekdays.

Thanks  
Sachin

---

<div class="post-metadata">

### Author: ![christophilus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophilus/32/42991_2.png) [@christophilus](https://discuss.elastic.co/u/christophilus)
#### Post date: [August 6, 2018, 2:26pm UTC](https://discuss.elastic.co/t/average-number-of-logs/143134/2 "2018-08-06T14:26:39Z")

</div>

It would be tricky to get it to lay out exactly like that, but you should be able to get the data you want. You might be able to accomplish that layout using scripted fields. You can also export data from any visualization, so as long as you get the data you want, you can export it to CSV by clicking the "formatted" link when viewing the visualization.

To get the data you are looking for, you need to do an average aggregation, combined with an hourly date histogram. Here's an example:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/1/51cd94b62bc8130143758faad7869145903567dd.png)

So, it simply lists out the date + time along with the average.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 3, 2018, 2:26pm UTC](https://discuss.elastic.co/t/average-number-of-logs/143134/3 "2018-09-03T14:26:44Z")

</div>

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