Grafana dashboard: OpenNMS Java 8 CPU Dashboard
Description: Java Virtual Machine CPU metrics monitored by OpenNMS

You can find the OpenNMS configuration and the Grafana Dashboard source in our [GitHub repository](https://github.com/opennms-config-modules/java-virtual-machine).

{
  "__inputs": [
    {
      "name": "DS_OPENNMS_HORIZON PM",
      "label": "OpenNMS Horizon PM",
      "description": "",
      "type": "datasource",
      "pluginId": "opennms-helm-performance-datasource",
      "pluginName": "OpenNMS Performance"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "5.2.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": "5.0.0"
    },
    {
      "type": "datasource",
      "id": "opennms-helm-performance-datasource",
      "name": "OpenNMS Performance",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Java Virtual Machine CPU metrics monitored by OpenNMS",
  "editable": true,
  "gnetId": 4033,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1533920986186,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_OPENNMS_HORIZON PM}",
      "fill": 0,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 10,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": false,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {}
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "aggregation": "AVERAGE",
          "attribute": "ProcessCpuLoad",
          "filter": {
            "clauses": [],
            "limit": 1000
          },
          "hide": true,
          "nodeId": "$java8Node",
          "refId": "A",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        },
        {
          "aggregation": "AVERAGE",
          "attribute": "SystemCpuLoad",
          "filter": {
            "clauses": [],
            "limit": 1000
          },
          "hide": true,
          "nodeId": "$java8Node",
          "refId": "B",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        },
        {
          "aggregation": "AVERAGE",
          "attribute": "AvailableProcessors",
          "filter": {
            "clauses": [],
            "limit": 1000
          },
          "hide": true,
          "label": "",
          "nodeId": "$java8Node",
          "refId": "E",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        },
        {
          "expression": "100 / AvailableProcessors * (SystemCpuLoad*10)",
          "label": "System CPU Load",
          "refId": "C",
          "type": "expression"
        },
        {
          "expression": "100 / AvailableProcessors * (ProcessCpuLoad*10)",
          "label": "Process CPU Load",
          "refId": "D",
          "type": "expression"
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 100
        },
        {
          "colorMode": "warning",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 80
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "CPU Load Statistics",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "percent",
          "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_OPENNMS_HORIZON PM}",
      "fill": 0,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 11,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": false,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "aggregation": "AVERAGE",
          "attribute": "PSMSDuration",
          "filter": {
            "clauses": [],
            "limit": 1000
          },
          "label": "Mark Sweep",
          "nodeId": "$java8Node",
          "refId": "A",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        },
        {
          "aggregation": "AVERAGE",
          "attribute": "PSSDuration",
          "filter": {
            "clauses": [],
            "limit": 1000
          },
          "label": "Scavenge",
          "nodeId": "$java8Node",
          "refId": "B",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Garbage Collection Duration",
      "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": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_OPENNMS_HORIZON PM}",
      "fill": 0,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 9
      },
      "id": 1,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": false,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "aggregation": "AVERAGE",
          "attribute": "DaemonThreadCount",
          "filter": {
            "clauses": [],
            "limit": 1000
          },
          "label": "Daemon",
          "nodeId": "$java8Node",
          "refId": "A",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        },
        {
          "aggregation": "AVERAGE",
          "attribute": "ThreadCount",
          "filter": {
            "clauses": [],
            "limit": 1000
          },
          "label": "Live",
          "nodeId": "$java8Node",
          "refId": "B",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        },
        {
          "aggregation": "AVERAGE",
          "attribute": "PeakThreadCount",
          "filter": {
            "clauses": [],
            "limit": 1000
          },
          "label": "Peak",
          "nodeId": "$java8Node",
          "refId": "C",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Thread Statistics",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "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_OPENNMS_HORIZON PM}",
      "fill": 0,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 9
      },
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": false,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "aggregation": "AVERAGE",
          "attribute": "CurThreadCpuTime",
          "filter": {
            "clauses": [],
            "limit": 1000
          },
          "label": "CPU",
          "nodeId": "$java8Node",
          "refId": "A",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        },
        {
          "aggregation": "AVERAGE",
          "attribute": "CurThreadUserTime",
          "filter": {
            "clauses": [],
            "limit": 1000
          },
          "label": "User",
          "nodeId": "$java8Node",
          "refId": "B",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Current Thread Time",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "ns",
          "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_OPENNMS_HORIZON PM}",
      "fill": 1,
      "gridPos": {
        "h": 7,
        "w": 24,
        "x": 0,
        "y": 18
      },
      "id": 8,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": false,
        "max": true,
        "min": true,
        "show": true,
        "sort": "avg",
        "sortDesc": false,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "aggregation": "AVERAGE",
          "attribute": "MaxFileDescCount",
          "filter": {
            "clauses": [],
            "limit": 0
          },
          "label": "Max",
          "nodeId": "$java8Node",
          "refId": "A",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        },
        {
          "aggregation": "AVERAGE",
          "attribute": "OpenFileDescCount",
          "filter": {
            "clauses": [],
            "limit": 0
          },
          "label": "Open",
          "nodeId": "$java8Node",
          "refId": "B",
          "resourceId": "interfaceSnmp[java8-jvm]",
          "type": "attribute"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Operating System File Descriptors",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "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
      }
    }
  ],
  "refresh": "1m",
  "schemaVersion": 16,
  "style": "dark",
  "tags": [
    "opennms",
    "java",
    "jmx"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_OPENNMS_HORIZON PM}",
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "java8Node",
        "options": [],
        "query": "nodeFilter(serviceName like 'JMX-Java8-JVM%')",
        "refresh": 2,
        "regex": "",
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-7d",
    "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": "OpenNMS Java 8 CPU Dashboard",
  "uid": "000000009",
  "version": 1
}