Grafana dashboard: Elasticsearch APM - JVM
Description: Some short examples of building out a few panels that reflect core JVM metrics from Elasticsearch APM.


{
  "__inputs": [
    {
      "name": "DS_ELASTICSEARCH",
      "label": "Elasticsearch",
      "description": "",
      "type": "datasource",
      "pluginId": "elasticsearch",
      "pluginName": "Elasticsearch"
    }
  ],
  "__requires": [
    {
      "type": "datasource",
      "id": "elasticsearch",
      "name": "Elasticsearch",
      "version": "1.0.0"
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.2.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 13300,
  "graphTooltip": 0,
  "id": null,
  "links": [
    {
      "asDropdown": true,
      "icon": "external link",
      "tags": [
        "elasticsearch"
      ],
      "title": "APM",
      "type": "dashboards"
    }
  ],
  "panels": [
    {
      "aliasColors": {
        "Avg. committed": "blue",
        "Avg. limit": "super-light-red",
        "Avg. used": "semi-dark-green"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_ELASTICSEARCH}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "unit": "percentunit"
        },
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 5,
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 3,
      "legend": {
        "avg": true,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.2.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Process average",
          "bucketAggs": [
            {
              "$$hashKey": "object:192",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "$$hashKey": "object:190",
              "field": "system.cpu.total.norm.pct",
              "id": "1",
              "meta": {},
              "pipelineAgg": "select metric",
              "settings": {},
              "type": "avg"
            }
          ],
          "query": "",
          "refId": "A",
          "timeField": "@timestamp"
        },
        {
          "alias": "System average",
          "bucketAggs": [
            {
              "$$hashKey": "object:192",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "$$hashKey": "object:190",
              "field": "system.process.cpu.total.norm.pct",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "avg"
            }
          ],
          "query": "",
          "refId": "B",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "CPU Usage",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:142",
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1",
          "min": "0",
          "show": true
        },
        {
          "$$hashKey": "object:143",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "Avg. committed": "blue",
        "Avg. limit": "super-light-red",
        "Avg. used": "semi-dark-green"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_ELASTICSEARCH}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "unit": "percentunit"
        },
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 5,
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 4,
      "legend": {
        "avg": true,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.2.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Average",
          "bucketAggs": [
            {
              "$$hashKey": "object:192",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "$$hashKey": "object:190",
              "field": "system.memory.actual.free",
              "id": "1",
              "inlineScript": "1 - _value / doc[\"system.memory.total\"].value",
              "meta": {},
              "settings": {
                "script": {
                  "inline": "1 - _value / doc[\"system.memory.total\"].value"
                }
              },
              "type": "avg"
            }
          ],
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "System memory usage",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:142",
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1",
          "min": "0",
          "show": true
        },
        {
          "$$hashKey": "object:143",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "Avg. committed": "blue",
        "Avg. limit": "super-light-red",
        "Avg. used": "semi-dark-green"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_ELASTICSEARCH}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "unit": "decbytes"
        },
        "overrides": []
      },
      "fill": 4,
      "fillGradient": 5,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 7
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "avg": true,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.2.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Avg. used",
          "bucketAggs": [
            {
              "$$hashKey": "object:192",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "$$hashKey": "object:190",
              "field": "jvm.memory.heap.used",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "avg"
            }
          ],
          "refId": "A",
          "timeField": "@timestamp"
        },
        {
          "alias": "Avg. limit",
          "bucketAggs": [
            {
              "$$hashKey": "object:192",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "$$hashKey": "object:190",
              "field": "jvm.memory.heap.max",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "avg"
            }
          ],
          "refId": "B",
          "timeField": "@timestamp"
        },
        {
          "alias": "Avg. committed",
          "bucketAggs": [
            {
              "$$hashKey": "object:192",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "$$hashKey": "object:190",
              "field": "jvm.memory.heap.committed",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "avg"
            }
          ],
          "refId": "C",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Heap Memory",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:142",
          "format": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:143",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "Avg. committed": "blue",
        "Avg. limit": "super-light-red",
        "Avg. used": "semi-dark-green"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_ELASTICSEARCH}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "unit": "decbytes"
        },
        "overrides": []
      },
      "fill": 4,
      "fillGradient": 5,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 7
      },
      "hiddenSeries": false,
      "id": 5,
      "legend": {
        "avg": true,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.2.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Avg. committed",
          "bucketAggs": [
            {
              "$$hashKey": "object:192",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "$$hashKey": "object:190",
              "field": "jvm.memory.non_heap.committed",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "avg"
            }
          ],
          "refId": "A",
          "timeField": "@timestamp"
        },
        {
          "alias": "Avg. used",
          "bucketAggs": [
            {
              "$$hashKey": "object:192",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "$$hashKey": "object:190",
              "field": "jvm.memory.non_heap.used",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "avg"
            }
          ],
          "refId": "B",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Non-Heap Memory",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:142",
          "format": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "$$hashKey": "object:143",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "Avg. committed": "blue",
        "Avg. limit": "super-light-red",
        "Avg. used": "semi-dark-green"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_ELASTICSEARCH}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "unit": "short"
        },
        "overrides": []
      },
      "fill": 4,
      "fillGradient": 3,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 15
      },
      "hiddenSeries": false,
      "id": 6,
      "legend": {
        "avg": true,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.2.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Avg.",
          "bucketAggs": [
            {
              "$$hashKey": "object:192",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "$$hashKey": "object:190",
              "field": "jvm.thread.count",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "avg"
            }
          ],
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Thread Count",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:142",
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "$$hashKey": "object:143",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "Avg. committed": "blue",
        "Avg. limit": "super-light-red",
        "Avg. used": "semi-dark-green"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_ELASTICSEARCH}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "unit": "short"
        },
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 5,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 15
      },
      "hiddenSeries": false,
      "id": 7,
      "legend": {
        "avg": true,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.2.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Avg.",
          "bucketAggs": [
            {
              "$$hashKey": "object:192",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "$$hashKey": "object:190",
              "field": "jvm.gc.count",
              "id": "1",
              "meta": {},
              "pipelineAgg": "select metric",
              "settings": {},
              "type": "cardinality"
            }
          ],
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Garbage collection per minute",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:142",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:143",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "Avg. committed": "blue",
        "Avg. limit": "super-light-red",
        "Avg. used": "semi-dark-green"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_ELASTICSEARCH}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "unit": "short"
        },
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 5,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 23
      },
      "hiddenSeries": false,
      "id": 8,
      "legend": {
        "avg": true,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.2.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Avg.",
          "bucketAggs": [
            {
              "$$hashKey": "object:192",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "metrics": [
            {
              "$$hashKey": "object:190",
              "field": "jvm.gc.time",
              "id": "1",
              "meta": {},
              "pipelineAgg": "select metric",
              "settings": {},
              "type": "avg"
            }
          ],
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Garbage collection time spent per minute",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:142",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:143",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "schemaVersion": 26,
  "style": "dark",
  "tags": [
    "elasticsearch"
  ],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Elasticsearch APM - JVM",
  "uid": "2KrFbhpGk",
  "version": 9,
  "description": "Some short examples of building out a few panels that reflect core JVM metrics from Elasticsearch APM."
}