Grafana dashboard: JVM Metrics

Shows JVM metrics collected by inspectIT OpenCensus Edition:
- JVM CPU metrics
- JVM memory metrics
- JVM garbage collection metrics

*This dashboard is for usage with a Prometheus data source.*

{
  "__inputs": [
    {
      "name": "DS_LOCALPROMETHEUS",
      "label": "LocalPrometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "5.4.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": "5.0.0"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": "5.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 9598,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1567608124582,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 7,
      "panels": [],
      "repeat": "service",
      "title": "$service",
      "type": "row"
    },
    {
      "aliasColors": {
        "process_cpu_usage": "#badff4",
        "process_cpu_usage ": "#badff4",
        "system_cpu_usage": "#1f78c1",
        "system_cpu_usage ": "#1f78c1"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_LOCALPROMETHEUS}",
      "fill": 2,
      "gridPos": {
        "h": 6,
        "w": 7,
        "x": 0,
        "y": 1
      },
      "id": 11,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "process_cpu_usage{service=\"$service\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "process_cpu_usage",
          "query": "from(bucket: \"telegraf\")\n|> range($range)\n|> filter(fn: (r) =>\n  r._measurement == \"process_cpu_usage\" AND\n  r.service == \"$service\" AND\n  r._field == \"gauge\")\n|> keep(columns: [\"_value\", \"_time\", \"_measurement\"])",
          "refId": "A",
          "resultFormat": "time_series"
        },
        {
          "expr": "system_cpu_usage{service=\"$service\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "system_cpu_usage",
          "query": "from(bucket: \"telegraf\")\n|> range($range)\n|> filter(fn: (r) =>\n  r._measurement == \"system_cpu_usage\" AND\n  r.service == \"$service\" AND\n  r._field == \"gauge\")\n|> keep(columns: [\"_value\", \"_time\", \"_measurement\"])\n",
          "refId": "B",
          "resultFormat": "time_series"
        }
      ],
      "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": [
        {
          "decimals": null,
          "format": "percentunit",
          "label": null,
          "logBase": 1,
          "max": "1.05",
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_LOCALPROMETHEUS}",
      "fill": 10,
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 7,
        "y": 1
      },
      "id": 39,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "used",
          "color": "#82b5d8"
        },
        {
          "alias": "committed",
          "color": "#447ebc"
        },
        {
          "alias": "max",
          "color": "#bf1b00",
          "fill": 0,
          "linewidth": 4
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "max",
          "expr": "sum(jvm_memory_max{service=\"$service\", area=\"heap\"})",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "max",
          "measurement": "jvm_memory_max",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT mean(\"gauge\") FROM \"jvm_memory_max\" WHERE (\"service\" =~ /^$service$/) AND $timeFilter GROUP BY time(1m) fill(null)",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "gauge"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            },
            {
              "condition": "AND",
              "key": "area",
              "operator": "=",
              "value": "heap"
            }
          ]
        },
        {
          "alias": "committed",
          "expr": "sum(jvm_memory_committed{service=\"$service\", area=\"heap\"})",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "committed",
          "measurement": "jvm_memory_committed",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT mean(\"gauge\") FROM \"jvm_memory_max\" WHERE (\"service\" =~ /^$service$/) AND $timeFilter GROUP BY time(1m) fill(null)",
          "rawQuery": false,
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "gauge"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            },
            {
              "condition": "AND",
              "key": "area",
              "operator": "=",
              "value": "heap"
            }
          ]
        },
        {
          "alias": "used",
          "expr": "sum(jvm_memory_used{service=\"$service\", area=\"heap\"})",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "used",
          "measurement": "jvm_memory_used",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT mean(\"gauge\") FROM \"jvm_memory_max\" WHERE (\"service\" =~ /^$service$/) AND $timeFilter GROUP BY time(1m) fill(null)",
          "rawQuery": false,
          "refId": "C",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "gauge"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            },
            {
              "condition": "AND",
              "key": "area",
              "operator": "=",
              "value": "heap"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Memory - Heap",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "daemon": "#0a50a1",
        "daemon ": "#0a50a1",
        "live-non-daemon ": "#82b5d8",
        "non-daemon ": "#82b5d8",
        "non-deamon": "#82b5d8",
        "peak": "#bf1b00",
        "peak ": "#bf1b00"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_LOCALPROMETHEUS}",
      "fill": 4,
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 13,
        "y": 1
      },
      "id": 42,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "jvm_threads_daemon{service=\"$service\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "daemon",
          "query": "from(bucket: \"telegraf\")\n|> range($range)\n|> filter(fn: (r) =>\n  r._measurement == \"jvm_threads_daemon\" AND\n  r.service == \"$service\" AND\n  r._field == \"gauge\")\n|> map(fn:(r) => ({\n        _time: r._time,\n        _value: r._value,\n        _measurement: \"daemon\"\n    }))\n|> keep(columns: [\"_value\", \"_time\", \"_measurement\"])",
          "refId": "B"
        },
        {
          "alias": "$tag_state",
          "expr": "jvm_threads_live{service=\"$service\"} - jvm_threads_daemon{service=\"$service\"}",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            },
            {
              "params": [
                "state"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "intervalFactor": 1,
          "legendFormat": "non-deamon",
          "measurement": "jvm_threads_states",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "lnd = () => {\nlive = from(bucket: \"telegraf\")\n|> range($range)\n|> filter(fn: (r) =>\n  r._measurement == \"jvm_threads_live\" AND\n  r.service == \"$service\" AND\n  r._field == \"gauge\")\n|> keep(columns: [\"_value\", \"_time\", \"_measurement\"])\n  \ndaemon = from(bucket: \"telegraf\")\n|> range($range)\n|> filter(fn: (r) =>\n  r._measurement == \"jvm_threads_daemon\" AND\n  r.service == \"$service\" AND\n  r._field == \"gauge\")\n|> keep(columns: [\"_value\", \"_time\", \"_measurement\"])\n  \nreturn join(tables:{live:live, daemon:daemon},on:[\"_time\",\"_stop\",\"_start\", \"host\"])\n    |> map(fn:(r) => ({\n        _time: r._time,\n        _value: (r._value_live - r._value_daemon),\n        _measurement: \"non-daemon\"\n    }))\n}\n\nlnd()",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "gauge"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            }
          ]
        },
        {
          "expr": "jvm_threads_peak{service=\"$service\"} - jvm_threads_live{service=\"$service\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "peak",
          "query": "stackedPeak = () => {\npeak = from(bucket: \"telegraf\")\n|> range($range)\n|> filter(fn: (r) =>\n  r._measurement == \"jvm_threads_peak\" AND\n  r.service == \"$service\" AND\n  r._field == \"gauge\")\n|> keep(columns: [\"_value\", \"_time\", \"_measurement\"])\n\nlive = from(bucket: \"telegraf\")\n|> range($range)\n|> filter(fn: (r) =>\n  r._measurement == \"jvm_threads_live\" AND\n  r.service == \"$service\" AND\n  r._field == \"gauge\")\n|> keep(columns: [\"_value\", \"_time\", \"_measurement\"])\n  \n\n  \nreturn join(tables:{live:live, peak:peak},on:[\"_time\",\"_stop\",\"_start\", \"host\"])\n    |> map(fn:(r) => ({\n        _time: r._time,\n        _value: (r._value_peak - r._value_live),\n        _measurement: \"peak\"\n    }))\n}\n\nstackedPeak()",
          "refId": "C"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [
        {
          "colorMode": "background6",
          "fill": true,
          "line": false,
          "op": "time"
        }
      ],
      "timeShift": null,
      "title": "# Live Threads",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "none",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_LOCALPROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 6,
        "w": 5,
        "x": 19,
        "y": 1
      },
      "id": 46,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "Allocated Memory",
          "bars": true,
          "color": "#ef843c",
          "lines": false
        },
        {
          "alias": "Promoted Memory",
          "bars": true,
          "color": "#629e51",
          "lines": false
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Live Data Size",
          "expr": "jvm_gc_live_data_size{service=\"$service\"}",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "Live Data Size",
          "measurement": "jvm_gc_live_data_size",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT \"gauge\" FROM \"jvm_gc_live_data_size\" WHERE (\"service\" =~ /^$service$/) ",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "gauge"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            }
          ]
        },
        {
          "alias": "Max Data Size",
          "expr": "jvm_gc_max_data_size{service=\"$service\"}",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "Max Data Size",
          "measurement": "jvm_gc_max_data_size",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT \"gauge\" FROM \"jvm_gc_live_data_size\" WHERE (\"service\" =~ /^$service$/) ",
          "rawQuery": false,
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "gauge"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            }
          ]
        },
        {
          "alias": "Allocated Memory",
          "expr": "idelta(jvm_gc_memory_allocated{service=\"$service\"}[$__range])",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            }
          ],
          "intervalFactor": 1,
          "legendFormat": "Allocated Memory",
          "measurement": "jvm_gc_memory_allocated",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT difference(sum(\"counter\")) FROM \"jvm_gc_memory_allocated\" WHERE (\"service\" =~ /^$service$/) AND $timeFilter GROUP BY time(15s)",
          "rawQuery": false,
          "refId": "D",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "counter"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [],
                "type": "non_negative_difference"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            }
          ]
        },
        {
          "alias": "Promoted Memory",
          "expr": "idelta(jvm_gc_memory_promoted{service=\"$service\"}[$__range])",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            }
          ],
          "intervalFactor": 1,
          "legendFormat": "Promoted Memory",
          "measurement": "jvm_gc_memory_promoted",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT difference(sum(\"counter\")) FROM \"jvm_gc_memory_allocated\" WHERE (\"service\" =~ /^$service$/) AND $timeFilter GROUP BY time(15s)",
          "rawQuery": false,
          "refId": "F",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "counter"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [],
                "type": "non_negative_difference"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Garbage Collection Memory",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "ms",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_LOCALPROMETHEUS}",
      "format": "percentunit",
      "gauge": {
        "maxValue": 1,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 6,
        "w": 4,
        "x": 0,
        "y": 7
      },
      "id": 49,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "process_cpu_usage{service=\"$service\"}",
          "format": "time_series",
          "groupBy": [],
          "instant": true,
          "interval": "",
          "intervalFactor": 1,
          "measurement": "process_cpu_usage",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "gauge"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            }
          ]
        }
      ],
      "thresholds": "0.8,0.9",
      "title": "Current CPU Usage",
      "type": "singlestat",
      "valueFontSize": "70%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_LOCALPROMETHEUS}",
      "format": "none",
      "gauge": {
        "maxValue": 1,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 4,
        "y": 7
      },
      "id": 4,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "repeat": null,
      "repeatDirection": "h",
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "jvm_classes_loaded{service=\"$service\"}",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "instant": true,
          "intervalFactor": 1,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "from(bucket: \"telegraf\")\n  |> range(start: -1m)\n  |> filter(fn: (r) =>\n    r._measurement == \"jvm_classes_loaded\" AND\n    r.service == \"$service\" AND\n    r._field == \"gauge\")\n  |> keep(columns: [\"_value\", \"_time\", \"service\"])\n  |> last()\n",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": "0.9,0.95",
      "title": "Loaded Classes",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "avg"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_LOCALPROMETHEUS}",
      "fill": 10,
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 7,
        "y": 7
      },
      "id": 40,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "used",
          "color": "#82b5d8"
        },
        {
          "alias": "committed",
          "color": "#447ebc"
        },
        {
          "alias": "max",
          "color": "#bf1b00",
          "fill": 0,
          "linewidth": 4
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "max",
          "expr": "sum(jvm_memory_max{service=\"$service\", area=\"nonheap\"})",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "intervalFactor": 1,
          "legendFormat": "max",
          "measurement": "jvm_memory_max",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT mean(\"gauge\") FROM \"jvm_memory_max\" WHERE (\"service\" =~ /^$service$/) AND $timeFilter GROUP BY time(1m) fill(null)",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "gauge"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            },
            {
              "condition": "AND",
              "key": "area",
              "operator": "=",
              "value": "nonheap"
            }
          ]
        },
        {
          "alias": "committed",
          "expr": "sum(jvm_memory_committed{service=\"$service\", area=\"nonheap\"})",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "intervalFactor": 1,
          "legendFormat": "committed",
          "measurement": "jvm_memory_committed",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT mean(\"gauge\") FROM \"jvm_memory_max\" WHERE (\"service\" =~ /^$service$/) AND $timeFilter GROUP BY time(1m) fill(null)",
          "rawQuery": false,
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "gauge"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            },
            {
              "condition": "AND",
              "key": "area",
              "operator": "=",
              "value": "nonheap"
            }
          ]
        },
        {
          "alias": "used",
          "expr": "sum(jvm_memory_used{service=\"$service\", area=\"nonheap\"})",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "intervalFactor": 1,
          "legendFormat": "used",
          "measurement": "jvm_memory_used",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT mean(\"gauge\") FROM \"jvm_memory_max\" WHERE (\"service\" =~ /^$service$/) AND $timeFilter GROUP BY time(1m) fill(null)",
          "rawQuery": false,
          "refId": "C",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "gauge"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            },
            {
              "condition": "AND",
              "key": "area",
              "operator": "=",
              "value": "nonheap"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Memory - Non-Heap",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_LOCALPROMETHEUS}",
      "fill": 4,
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 13,
        "y": 7
      },
      "id": 41,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$tag_state",
          "expr": "jvm_threads_states{service=\"$service\"}",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "15s"
              ],
              "type": "time"
            },
            {
              "params": [
                "state"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "intervalFactor": 1,
          "legendFormat": "{{state}}",
          "measurement": "jvm_threads_states",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT mean(\"gauge\") FROM \"jvm_memory_max\" WHERE (\"service\" =~ /^$service$/) AND $timeFilter GROUP BY time(1m) fill(null)",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "gauge"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": [
            {
              "key": "service",
              "operator": "=~",
              "value": "/^$service$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "# Threads by States",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "none",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "Major GC": "#bf1b00"
      },
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_LOCALPROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 6,
        "w": 5,
        "x": 19,
        "y": 7
      },
      "id": 47,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(idelta(jvm_gc_pause{service=\"$service\", action=\"end of minor GC\"}[$__range]))",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Minor GC",
          "refId": "A"
        },
        {
          "expr": "idelta(jvm_gc_pause{service=\"$service\", action=\"end of major GC\"}[$__range])",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Major GC",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Garbage Collection Pauses",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "ms",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_LOCALPROMETHEUS}",
      "format": "none",
      "gauge": {
        "maxValue": 1,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 4,
        "y": 10
      },
      "id": 12,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "repeatDirection": "h",
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "jvm_classes_unloaded{service=\"$service\"}",
          "format": "time_series",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "instant": true,
          "intervalFactor": 1,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "from(bucket: \"telegraf\")\n  |> range(start: -1m)\n  |> filter(fn: (r) =>\n    r._measurement == \"jvm_classes_unloaded\" AND\n    r.service == \"$service\" AND\n    r._field == \"gauge\")\n  |> keep(columns: [\"_value\", \"_time\", \"service\"])\n  |> last()\n",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": "0.9,0.95",
      "title": "Unloaded Classes",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "content": "----",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 13
      },
      "id": 51,
      "links": [],
      "mode": "html",
      "title": "",
      "transparent": true,
      "type": "text"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 16,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_LOCALPROMETHEUS}",
        "definition": "label_values(service)",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "service",
        "options": [],
        "query": "label_values(service)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "JVM Metrics",
  "uid": "D65bST8iz",
  "version": 1
}