# Create mutliples area with jmx data

**URL:** https://discuss.elastic.co/t/create-mutliples-area-with-jmx-data/253117
**Category:** Kibana
**Created:** [October 23, 2020, 10:32am UTC](https://discuss.elastic.co/t/create-mutliples-area-with-jmx-data/253117 "2020-10-23T10:32:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dyl](https://avatars.discourse-cdn.com/v4/letter/d/5fc32e/32.png) [@dyl](https://discuss.elastic.co/u/dyl)
#### Post date: [October 23, 2020, 10:32am UTC](https://discuss.elastic.co/t/create-mutliples-area-with-jmx-data/253117/1 "2020-10-23T10:32:35Z")

</div>

Hello, i'm trying to create a vizualise which contains two area of jmx metrics of my java application :

- Heap used
- Heap max.

To do it, I use jmx plugin. This is my logstash pipeline :

```
input
{
  jmx {
    path => "/etc/logstash/conf.d/jmx_conf/"
    polling_frequency => 15
    type => jmx
  }
}
filter
{
}
output
{
  elasticsearch
  {
    hosts => "http://localhost:9200"
    index => "supervision_jmx"
  }
  stdout { codec => rubydebug }
}

```

My json configuration is :

```
{
   "host" : "192.168.XXX.XXX",
   "port" : 65030,
   "alias" : "lpdocfld1",
   "queries" : [
   {
      "object_name" : "java.lang:type=Memory",
      "object_alias" : "Heap_Memory",
      "attributes" : ["HeapMemoryUsage"]
   } ]
}

```

So when I start the pipeline, I get this :

```
[INFO] 2020-10-23 12:26:11.052 [[main]<jmx] jmx - Loading configuration files in path {:path=>"/etc/logstash/conf.d/jmx_conf/"}
.
.
{
                   "type" => "jmx",
             "@timestamp" => 2020-10-23T10:26:11.081Z,
                   "host" => "192.168.XXX.XXX",
                   "path" => "/etc/logstash/conf.d/jmx_conf/",
            "metric_path" => "lpdocfld1.Heap_Memory.HeapMemoryUsage.max",
               "@version" => "1",
    "metric_value_number" => 8589934592
}
{
                   "type" => "jmx",
             "@timestamp" => 2020-10-23T10:26:11.082Z,
                   "host" => "192.168.XXX.XXX",
                   "path" => "/etc/logstash/conf.d/jmx_conf/",
            "metric_path" => "lpdocfld1.Heap_Memory.HeapMemoryUsage.used",
               "@version" => "1",
    "metric_value_number" => 4497189888
}
.
.

```

So now Into kibana I create Index pattern by default. So my problem :

When I want to create a Area vizualize, in X-asis, I put date histogram no problem.  
But in Y-axis, I want to have two areas :

- The first one with ":metric\_path: lpdocfld1.Heap\_Memory.HeapMemoryUsage.used"
- The seconde with ":metric\_path:lpdocfld1.Heap\_Memory.HeapMemoryUsage.max"

I see that is possible into this site :

[jmx\_afresco](https://www.zylk.net/en/web-2-0/blog/-/blogs/kibana-dashboard-for-monitoring-alfresco-jmx-metrics)

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

But if y add a filter which say : metric\_path is "XXXX.used", i've got no data of "XXXX.max".

I think the solution is to play with "Advanced \> JSON input" in Y-axis, but I don't know the correct syntax to achieve that.

Can someone could help me ?

Thank you.

---

<div class="post-metadata">

### Author: ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)
#### Post date: [October 30, 2020, 8:11am UTC](https://discuss.elastic.co/t/create-mutliples-area-with-jmx-data/253117/2 "2020-10-30T08:11:20Z")

</div>

Hi there,  
What you can do is to split your series by the metric\_path using a filter aggregation as shown here:

 ![Screenshot 2020-10-30 at 09.07.46](https://us1.discourse-cdn.com/elastic/original/3X/f/8/f8168118f610626afea0456bfbcf44819649eea4.png)

If you add instead a filter on the top bar, then all your data will be filtered out except for documents that match that query.

---

<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 27, 2020, 8:11am UTC](https://discuss.elastic.co/t/create-mutliples-area-with-jmx-data/253117/3 "2020-11-27T08:11:24Z")

</div>

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