# How to create line graph with multiple sub fields

**URL:** https://discuss.elastic.co/t/how-to-create-line-graph-with-multiple-sub-fields/124425
**Category:** Kibana
**Created:** [March 18, 2018, 12:37am UTC](https://discuss.elastic.co/t/how-to-create-line-graph-with-multiple-sub-fields/124425 "2018-03-18T00:37:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![micruzz82](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@micruzz82](https://discuss.elastic.co/u/micruzz82)
#### Post date: [March 18, 2018, 12:37am UTC](https://discuss.elastic.co/t/how-to-create-line-graph-with-multiple-sub-fields/124425/1 "2018-03-18T00:37:36Z")

</div>

Hi all

i'm new to kibana and need some help with visualizations

I am monitoring multiple interfaces on multiple network switches and each of the interfaces give the relevant metrics.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/3/d3fe8c5a38220e0989f6b77d713f6a303eca9e43.png)

What I wanted to do is at the top level display the switches and if you select any switch it should display the interfaces and for the interface should display the relevant metrics over time.

Any help would be much appreciated.

Thanks

---

<div class="post-metadata">

### Author: ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)
#### Post date: [March 19, 2018, 12:20pm UTC](https://discuss.elastic.co/t/how-to-create-line-graph-with-multiple-sub-fields/124425/2 "2018-03-19T12:20:32Z")

</div>

Hi,

to achieve what you want, you would need to use a terms aggregation on a field containing the ID of the switch or network interface (I can't find that in your above document). On the x-axis you would then create a date histogram on the `@timestamp` field and on the y-axis you can then visualize any metric you want (like average of trasnfered bytes, etc.).

Please also have a look into the [Getting started](https://www.elastic.co/guide/en/kibana/current/getting-started.html) documentation to find more information on how to setup your first chart.

Cheers,  
Tim

---

<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: [April 16, 2018, 12:20pm UTC](https://discuss.elastic.co/t/how-to-create-line-graph-with-multiple-sub-fields/124425/3 "2018-04-16T12:20:35Z")

</div>

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