Linux metrics (CPU, memory)
6.2 Grafana
{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar Gauge",
      "version": ""
    },
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.2.1"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "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"
      }
    ]
  },
  "editable": true,
  "gnetId": 10301,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1559732690620,
  "links": [],
  "panels": [
    {
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 6,
      "links": [],
      "options": {
        "displayMode": "lcd",
        "fieldOptions": {
          "calcs": [
            "mean"
          ],
          "defaults": {
            "max": 100,
            "min": 0,
            "unit": "percent"
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "#EAB839",
              "index": 1,
              "value": 40
            },
            {
              "color": "red",
              "index": 2,
              "value": 80
            }
          ],
          "values": false
        },
        "orientation": "horizontal"
      },
      "targets": [
        {
          "expr": "topk(10, cpu_usage)",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "{{process}} {{pid}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Topk cpu usage",
      "type": "bargauge"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 8,
      "links": [],
      "options": {
        "displayMode": "lcd",
        "fieldOptions": {
          "calcs": [
            "mean"
          ],
          "defaults": {
            "max": 100,
            "min": 0,
            "unit": "percent"
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "#EAB839",
              "index": 1,
              "value": 40
            },
            {
              "color": "red",
              "index": 2,
              "value": 80
            }
          ],
          "values": false
        },
        "orientation": "vertical"
      },
      "targets": [
        {
          "expr": "topk(10,memory_usage)",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{process}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Memory_usage",
      "type": "bargauge"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 0,
        "y": 8
      },
      "id": 4,
      "links": [],
      "options": {
        "fieldOptions": {
          "calcs": [
            "mean"
          ],
          "defaults": {
            "max": 100,
            "min": 0,
            "unit": "percent"
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "#EAB839",
              "index": 1,
              "value": 40
            },
            {
              "color": "red",
              "index": 2,
              "value": 80
            }
          ],
          "values": false
        },
        "orientation": "auto",
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "6.2.1",
      "targets": [
        {
          "expr": "avg(cpu_usage)",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "{{process}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Average CPU usage",
      "type": "gauge"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 5,
        "y": 8
      },
      "id": 2,
      "links": [],
      "options": {
        "fieldOptions": {
          "calcs": [
            "mean"
          ],
          "defaults": {
            "max": 100,
            "min": 0,
            "unit": "percent"
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "#EAB839",
              "index": 1,
              "value": 40
            },
            {
              "color": "red",
              "index": 2,
              "value": 80
            }
          ],
          "values": false
        },
        "orientation": "auto",
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "6.2.1",
      "targets": [
        {
          "expr": "sum(cpu_usage)",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{process}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "CPU Overall",
      "type": "gauge"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 10,
        "y": 8
      },
      "id": 12,
      "links": [],
      "options": {
        "fieldOptions": {
          "calcs": [
            "mean"
          ],
          "defaults": {
            "max": 100,
            "min": 0,
            "unit": "percent"
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "#EAB839",
              "index": 1,
              "value": 40
            },
            {
              "color": "red",
              "index": 2,
              "value": 80
            }
          ],
          "values": false
        },
        "orientation": "auto",
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "6.2.1",
      "targets": [
        {
          "expr": "avg(memory_usage)",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "{{process}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Memory_usage instant",
      "type": "gauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 5,
        "w": 8,
        "x": 16,
        "y": 8
      },
      "id": 10,
      "interval": "1s",
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "topk(10, cpu_usage)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{process}} {{pid}}",
          "refId": "A"
        }
      ],
      "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": [
        {
          "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": "5s",
  "schemaVersion": 18,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "datasource": "Prometheus",
        "filters": [],
        "hide": 0,
        "label": "Filters",
        "name": "AdhocFilters",
        "skipUrlSync": false,
        "type": "adhoc"
      }
    ]
  },
  "time": {
    "from": "now-15m",
    "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": "Linux metrics (CPU, memory)",
  "uid": "k7htZGMZk",
  "version": 20,
  "description": "6.2 Grafana"
}