# How to display two lines for same field but from different hosts in same visualization?

**URL:** <https://discuss.elastic.co/t/how-to-display-two-lines-for-same-field-but-from-different-hosts-in-same-visualization/152153>\
**Category:** Kibana\
**Created:** [October 12, 2018, 4:40am UTC](https://discuss.elastic.co/t/how-to-display-two-lines-for-same-field-but-from-different-hosts-in-same-visualization/152153 "2018-10-12T04:40:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pramodchoudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pramodchoudhari/32/126902_2.png) [@pramodchoudhari](https://discuss.elastic.co/u/pramodchoudhari)\
**Post date:** [October 12, 2018, 4:40am UTC](https://discuss.elastic.co/t/how-to-display-two-lines-for-same-field-but-from-different-hosts-in-same-visualization/152153/1 "2018-10-12T04:40:05Z")

</div>

how to display two lines for same field but from different hosts in same visualization using kibana?  
i have peakload values from two different hosts and i want them to be displayed in same visualization each line representing peakload values for each host.

suppose there is **host1** and **host2**.  
then **line1** should represent **peakload** values for **host1** and **line2** should represent **peakload** values for host2.  
how should i do it?  
**Both the lines should be present in same visualization**

 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/a/e/aeaea99d2601e6186c325ecc86b47ba93a211fb3.png)

what should i write in json input so that it will fetch data only from host1  
Please Help!!

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [October 15, 2018, 11:36pm UTC](https://discuss.elastic.co/t/how-to-display-two-lines-for-same-field-but-from-different-hosts-in-same-visualization/152153/2 "2018-10-15T23:36:27Z")

</div>

It's close! This will take the max peak load out of all documents. We'll want to scroll down add two aggregations on the x-axis. The first will be date histogram, and the second will be sub bucket using split series with a terms aggregation on the host field.

---

<div class="post-metadata">

**Author:** ![pramodchoudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pramodchoudhari/32/126902_2.png) [@pramodchoudhari](https://discuss.elastic.co/u/pramodchoudhari)\
**Post date:** [October 17, 2018, 3:48am UTC](https://discuss.elastic.co/t/how-to-display-two-lines-for-same-field-but-from-different-hosts-in-same-visualization/152153/4 "2018-10-17T03:48:22Z")

</div>

Can you please explain the use of split series?.so that I can use it in future.

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [October 17, 2018, 10:33pm UTC](https://discuss.elastic.co/t/how-to-display-two-lines-for-same-field-but-from-different-hosts-in-same-visualization/152153/5 "2018-10-17T22:33:32Z")

</div>

Sure. We're breaking our metrics down into groups.

First we start with all of our documents in one group. In your screenshot above we're asking for maximum RxPeakKbps, so it's going to give us the maximum overall. When we scroll down and add bucket aggregations, we're splitting these metrics up into more groups.

So we'll say make groups of equal size over our time range, and this'll give us an x value (time range), and y (max RxPeakKbps for this time range). Splitting the series will take each group(time range) and split it further into groups by hostname, giving us two RxPeakKbps to plot.

It'll look something like this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/7/0768b2b268b7dc5e7c377f9e249bc49db4d0f0f5.png)

---

<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:** [November 14, 2018, 10:33pm UTC](https://discuss.elastic.co/t/how-to-display-two-lines-for-same-field-but-from-different-hosts-in-same-visualization/152153/6 "2018-11-14T22:33:36Z")

</div>

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