# How to create line chart to show disk utilization

**URL:** https://discuss.elastic.co/t/how-to-create-line-chart-to-show-disk-utilization/28124
**Category:** Kibana
**Created:** [August 26, 2015, 3:54pm UTC](https://discuss.elastic.co/t/how-to-create-line-chart-to-show-disk-utilization/28124 "2015-08-26T15:54:36Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [August 26, 2015, 3:54pm UTC](https://discuss.elastic.co/t/how-to-create-line-chart-to-show-disk-utilization/28124/1 "2015-08-26T15:54:36Z")

</div>

Hi Experts,

Need your valuable suggestions here . My plan is to prepare a line chart for disk utilization for 10 servers .  
I have data like , here total memory will always be fixed but utilization will be variable .  
timestamp, servername, total\_memory, Utilization  
Aug 25, abc1, 100, 20  
Aug25,abc2,100,30  
Aug25,abc3,100,50  
.  
.  
.  
.

I want to prepare a histogram , a line chart for all the servers first then I will be filtering it out for individual server , so it would be like in Y axis shows disk utilization in % and X axis shows date and time .

I do not find a perfect solution in kibana for this requirement . Please suggest how i can achieve this .

Thanks  
Vikas

---

<div class="post-metadata">

### Author: ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)
#### Post date: [August 27, 2015, 5:33am UTC](https://discuss.elastic.co/t/how-to-create-line-chart-to-show-disk-utilization/28124/2 "2015-08-27T05:33:04Z")

</div>

This type of vis should work:

- Y-Axis: average Utilization
- X-Axis:
  - First split by terms to get your top servers (by some criteria)
  - Then split by date

 ![](https://us1.discourse-cdn.com/elastic/original/2X/0/0d6813a10b6ace7d9ab33c34c60778632bfbe479.png)

---

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [August 27, 2015, 7:52am UTC](https://discuss.elastic.co/t/how-to-create-line-chart-to-show-disk-utilization/28124/3 "2015-08-27T07:52:37Z")

</div>

Thank You Tanya,

Actually I am facing an issue , in the data i already have a field timestamp . I want to create a histogram on that field only . My CSV file has data like

timestamp,ServerName,Memory,Util  
2015-08-24 07:00,abc1,100,10  
2015-08-24 07:10,abc1,100,50  
2015-08-24 07:20,abc1,100,05  
2015-08-24 07:30,abc1,100,60  
2015-08-24 07:40,abc1,100,90  
2015-08-24 07:50,abc1,100,20  
2015-08-24 08:00,abc1,100,60  
2015-08-24 08:05,abc2,100,30  
2015-08-24 08:10,abc2,100,30  
2015-08-24 08:20,abc2,100,50  
2015-08-24 08:30,abc2,100,60  
2015-08-24 08:40,abc2,100,70  
2015-08-24 08:50,abc2,100,20  
2015-08-24 09:00,abc2,100,30

I followed the steps you mentioned , but because histogram is not picking up my csv time so in the line chart it only shows a dot for top 5 servers .

 ![](https://us1.discourse-cdn.com/elastic/original/2X/3/3a5890ce2027a2eb8251153028c194ccdbd7ec16.png)

---

<div class="post-metadata">

### Author: ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)
#### Post date: [August 27, 2015, 5:50pm UTC](https://discuss.elastic.co/t/how-to-create-line-chart-to-show-disk-utilization/28124/4 "2015-08-27T17:50:34Z")

</div>

You need a 'date' type field in Elasticsearch to construct a Date histogram. It doesn't have to be "@timestamp", but it does have to have the correct type. If it's any other type (e.g. string) it won't work.

---

<div class="post-metadata">

### Author: ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)
#### Post date: [August 28, 2015, 4:56am UTC](https://discuss.elastic.co/t/how-to-create-line-chart-to-show-disk-utilization/28124/5 "2015-08-28T04:56:49Z")

</div>

I am using this this but when I try to create index using this field I got nothing .  
date  
{  
match =\> ["logtime", "yyyy-MM-dd HH:mm:ss"]  
target =\> ["logtime"]  
}

Do I need to change the default date format of kibana as well ?

---

<div class="post-metadata">

### Author: ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)
#### Post date: [September 1, 2015, 6:43am UTC](https://discuss.elastic.co/t/how-to-create-line-chart-to-show-disk-utilization/28124/6 "2015-09-01T06:43:03Z")

</div>

Could you post a sample JSON document and a resulting Elasticsearch mapping for the "logtime" field?

for reference, here is what mine looks like (except mine is named "@timestamp"):

```
      "@timestamp" : {
        "type" : "date",
        "format" : "strict_date_optional_time||epoch_millis"
      },
```

---

<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: [July 6, 2017, 2:13pm UTC](https://discuss.elastic.co/t/how-to-create-line-chart-to-show-disk-utilization/28124/7 "2017-07-06T14:13:59Z")

</div>


