JVM/system memory monitor graphs

,

Kibana version : 7.9

Elasticsearch version : 7.9

APM Server version : 7.9

APM Agent language and version : java 1.8

Fresh install or upgraded from other version? fresh install

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc. :-no

I am trying to build a separate dashboard which looks similar to below screen shot .
Is this dashboard/visualizations available out of the box so that I can reuse and create a dashboard out of this.
Is it possible to save this graphs to my dashboard.

Is it possible to save this graphs to my dashboard.

Unfortunately it is not possible to export the graphs from the curated APM ui to dashboard. This is something we planning to add but I unfortunately do not have a timeline for you.

Feel free to comment and/or subscribe to this issue to get notified when the feature lands.

1 Like

Btw if you are interested this is the queries for calculating CPU and memory:

GET apm*/_search
{
  "aggs": {
    "systemCPUAverage": { "avg": { "field": "system.cpu.total.norm.pct" } },
    "systemCPUMax": { "max": { "field": "system.cpu.total.norm.pct" } },
    "processCPUAverage": {
      "avg": { "field": "system.process.cpu.total.norm.pct" }
    },
    "processCPUMax": { "max": { "field": "system.process.cpu.total.norm.pct" } }
  }
}
GET apm*/_search
{
    "aggs": {
      "memoryUsedAvg": {
        "avg": {
          "script": {
            "lang": "expression",
            "source": "1 - doc['system.memory.actual.free'] / doc['system.memory.total']"
          }
        }
      },
      "memoryUsedMax": {
        "max": {
          "script": {
            "lang": "expression",
            "source": "1 - doc['system.memory.actual.free'] / doc['system.memory.total']"
          }
        }
      }
    }
  }
1 Like

Also, I tend to forget that we also have the apm-contrib repository where some sample dashboards are available.

While not being 100% identical to the ones you can see in the JVM tab, that should get you started faster than starting from scratch !

Good point. Thanks for adding that!

Thanks Can you Also provide the algorithms used for garbage Collection, PS Marksweep and PSScavenge

The metrics jvm.gc.count and jvm.gc.time have a field labels.name that contains the GC algorithm name. See also Metrics | APM Java Agent Reference [1.x] | Elastic.

But if I am creating my own dashboards , then I only have access to fields like jvm.gc.count . I wont be able to access the labels with it correct ?

You should be able to access labels.name. It's just a regular field. You might have to refresh your index pattern to see it though.

Thanks

So what about the graphs Garbage collection per minute and Garbage collection time spent per minute in APM screen .. How are the values calculated ? is it just displaying jvm.gc.time for an algorithm name? I wanted to recreate the graphs

@sqren Could you pls assist on my above query . How are these graphs plotted ? I mean is there nay calculations or just raw data?

Sure, you can find the queries for the java calculations here:

For instance, for gc:

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