# Is there any method to show specific host into one single chart in the dashboard?

**URL:** <https://discuss.elastic.co/t/is-there-any-method-to-show-specific-host-into-one-single-chart-in-the-dashboard/283166>\
**Category:** Kibana\
**Created:** [September 2, 2021, 12:46pm UTC](https://discuss.elastic.co/t/is-there-any-method-to-show-specific-host-into-one-single-chart-in-the-dashboard/283166 "2021-09-02T12:46:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![afan](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@afan](https://discuss.elastic.co/u/afan)\
**Post date:** [September 2, 2021, 12:46pm UTC](https://discuss.elastic.co/t/is-there-any-method-to-show-specific-host-into-one-single-chart-in-the-dashboard/283166/1 "2021-09-02T12:46:06Z")

</div>

I am trying to build the dashboard right now and able to show the CPU/memory usage by single specific host as below.

![example1](https://us1.discourse-cdn.com/elastic/original/3X/f/0/f09fef52940dc77b8afb00adfc38e0408a9ae740.jpeg)

however, I would like to group some specific hostnames (just like uat servers or app servers) to show into one single chart.

Is there any method to let me do that? I tried to use "add filter" but seems unable to do that. May I ask if anyone could guide me to do that please?

Thank you.

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [September 2, 2021, 1:14pm UTC](https://discuss.elastic.co/t/is-there-any-method-to-show-specific-host-into-one-single-chart-in-the-dashboard/283166/2 "2021-09-02T13:14:43Z")

</div>

Hi @afan,

how is your data structured?

The first option it comes to mind would be to use Lens filtered metric (either via quick function or via formula):

 ![Screenshot 2021-09-02 at 15.13.00](https://us1.discourse-cdn.com/elastic/original/3X/9/1/9152cdef4ac8815c9b9b86dd56cef6a2ef6b1f20.jpeg)

I've built them via the `Filter by` advanced option:

 ![Screenshot 2021-09-02 at 15.12.44](https://us1.discourse-cdn.com/elastic/original/3X/1/2/12b9440795b0e22392b21a26123038eafd88553c.png)  
 ![Screenshot 2021-09-02 at 15.12.25](https://us1.discourse-cdn.com/elastic/original/3X/2/e/2ec84d3fc467ce407e4b30b806492cfccc2bba22.jpeg)

And one by Formula:

 ![Screenshot 2021-09-02 at 15.12.14](https://us1.discourse-cdn.com/elastic/original/3X/2/5/25999fe666ac19120413c1d355dcd6a45dccab98.jpeg)

I've built this example using the `logs` sample data.

---

<div class="post-metadata">

**Author:** ![afan](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@afan](https://discuss.elastic.co/u/afan)\
**Post date:** [September 2, 2021, 2:34pm UTC](https://discuss.elastic.co/t/is-there-any-method-to-show-specific-host-into-one-single-chart-in-the-dashboard/283166/3 "2021-09-02T14:34:11Z")

</div>

If I try to use your suggestion way, I found that if I input host.hostname, it just returns to "equal" or "exists" for looking my hostname. Seems like I couldn't use something like "contain" to select multiple specific hostname for my graph.

 ![example2](https://us1.discourse-cdn.com/elastic/original/3X/c/8/c8dfa76904cbf7e4280368a174ad769a84fca2e8.jpeg)

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [September 2, 2021, 2:51pm UTC](https://discuss.elastic.co/t/is-there-any-method-to-show-specific-host-into-one-single-chart-in-the-dashboard/283166/4 "2021-09-02T14:51:50Z")

</div>

I'd say then that you have two options here:

- if you know all the names of the `hostname`s involved in a group you could create a KQL query joining them via the OR operator: `host.hostname : "A" OR host.hostname: "B" ...etc`
- alternatively if you can express it via regex you could use a `Lucene` query [with a RegExp](https://www.elastic.co/guide/en/elasticsearch/reference/current/regexp-syntax.html) - note that there are some limitations here, see the [notes here](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html)

You can click on the `KQL` button in the popup to switch to `Lucene`.

---

<div class="post-metadata">

**Author:** ![afan](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@afan](https://discuss.elastic.co/u/afan)\
**Post date:** [September 9, 2021, 10:41am UTC](https://discuss.elastic.co/t/is-there-any-method-to-show-specific-host-into-one-single-chart-in-the-dashboard/283166/5 "2021-09-09T10:41:41Z")

</div>

Thank you Marco and I managed to plot such graph just like this as below. Thanks so much. 🙂

![pic3](https://us1.discourse-cdn.com/elastic/original/3X/7/1/7108a789315dce8512e5d9aeccea0a863fbc9e34.jpeg)

---

<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:** [October 7, 2021, 10:41am UTC](https://discuss.elastic.co/t/is-there-any-method-to-show-specific-host-into-one-single-chart-in-the-dashboard/283166/6 "2021-10-07T10:41:53Z")

</div>

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