# Memory and CPU on one graph or gauge

**URL:** https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039
**Category:** Kibana
**Created:** [March 27, 2019, 4:36am UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039 "2019-03-27T04:36:42Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)
#### Post date: [March 27, 2019, 4:36am UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/1 "2019-03-27T04:36:42Z")

</div>

Hi

I am trying to create a custom dashboard for monitoring system metrics using metric beat.

I want to show both memory and cpu usage on one graph or gauge. Can you please tell me possible solution.

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [March 27, 2019, 3:48pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/2 "2019-03-27T15:48:03Z")

</div>

@syedsfayaz using the "Gauge" visualization, each metric gets it's own gauge, so these will not appear on the same gauge. It's possible to have two gauges, one for CPU and one for memory, like the following:

 ![27%20AM](https://us1.discourse-cdn.com/elastic/original/3X/d/a/da29f97ba5a3e246114b748c81e4461362773a32.png)

The gauge visualization is currently built around one metric per gauge. Do you have an example of how you'd want multiple metric to appear on the same gauge? If so, creating an [feature request](https://github.com/elastic/kibana/issues/new?template=Feature_request.md) for this would help us prioritize adding this functionality.

---

<div class="post-metadata">

### Author: ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)
#### Post date: [March 27, 2019, 4:46pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/3 "2019-03-27T16:46:57Z")

</div>

@Brandon_Kobel Thanks for your reply. This looks good and I can use it.

I want to create a dashboard with similar gauges for different hosts. Right now I'm creating one index "metricbeat\*" for data coming from different servers. How can I clone same gauge and show data for different hosts. Attached image for reference.

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

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [March 27, 2019, 8:53pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/4 "2019-03-27T20:53:40Z")

</div>

You can use the "Buckets" section of the visualization definition to have gauges displayed for every host, but it's not grouped by "host":

 ![02%20PM](https://us1.discourse-cdn.com/elastic/original/3X/b/3/b39e7b7a5a9e4d53715a07e06e7431e60a4412c4.png)

Have you looked into using the [Infrastructure](https://www.elastic.co/guide/en/kibana/current/xpack-infra.html) application?

---

<div class="post-metadata">

### Author: ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)
#### Post date: [March 27, 2019, 9:02pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/5 "2019-03-27T21:02:19Z")

</div>

So, if I can't add different gauge showing data from different servers. I know I can configure them if I use different index name for every metricbeats data I am getting. But @Christian_Dahlqvist suggested its not the correct way i doing it.

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [March 27, 2019, 9:06pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/6 "2019-03-27T21:06:23Z")

</div>

If you have a hard-coded list of hosts which you'd like to see the gauges for, it's possible to add a filter to a Visualization and then save it and add it to a dashboard:

 ![40%20PM](https://us1.discourse-cdn.com/elastic/original/3X/7/7/77e087ded408c6dd9f3f06e2706c321811a62146.png)

You could then duplicate the Visualization for each of the different hosts, but that's not really a maintainable solution.

---

<div class="post-metadata">

### Author: ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)
#### Post date: [March 27, 2019, 9:10pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/7 "2019-03-27T21:10:31Z")

</div>

I agree its very difficult to maintain this. Do you suggest any solution, I can filter data by beat.name as well.

---

<div class="post-metadata">

### Author: ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)
#### Post date: [March 27, 2019, 9:13pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/8 "2019-03-27T21:13:10Z")

</div>

I see this in the metricbeats.yml. Is there a way I can utilize this putting in an environment name and filtering dashboard by env name.  
Is there a way in kibana I can create series of Gauges for a list of servers in an environment?

```
# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:

# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]

# Optional fields that you can specify to add additional information to the
# output.
#fields:
# env: staging
```

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [March 27, 2019, 9:50pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/9 "2019-03-27T21:50:14Z")

</div>

> Is there a way in kibana I can create series of Gauges for a list of servers in an environment?

Even with the Dashboard filtering by environment, we're still going to want to list the gauges for every host within that environment.

I'm afraid the best we're going to get without resorting to submitting a [feature request](https://github.com/elastic/kibana/issues/new?template=Feature_request.md), is to create a Visualization which will show the Memory gauge for all hosts, and to create another Visualization which will show the CPU gauge for all hosts, and add them both to the Dashboard side-by-side or stacked-vertically so that the hosts align with each other.

---

<div class="post-metadata">

### Author: ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)
#### Post date: [March 27, 2019, 9:54pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/10 "2019-03-27T21:54:08Z")

</div>

@Brandon_Kobel So you mean I will have to create individual visualization for every host name and add it on a dashboard.

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [March 27, 2019, 9:56pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/11 "2019-03-27T21:56:33Z")

</div>

No, that's not what I was recommending. If you use a Visualization configuration similar to the following, it will display a Memory gauge for each host:

 ![38%20PM](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c4b21ae8613f57e3d5279913e3895a2398e9adf1.png)

You can then do the same for CPU:

 ![09%20PM](https://us1.discourse-cdn.com/elastic/original/3X/0/2/02fd21c869afd28092e2cf7e1b1535c6143775f1.png)

And then you can add both of these Visualizations to a dashboard.

---

<div class="post-metadata">

### Author: ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)
#### Post date: [March 27, 2019, 10:01pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/12 "2019-03-27T22:01:43Z")

</div>

Thank you. Let me try it.

---

<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 24, 2019, 10:01pm UTC](https://discuss.elastic.co/t/memory-and-cpu-on-one-graph-or-gauge/174039/13 "2019-04-24T22:01:46Z")

</div>

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