apiVersion: v1
data:
  node_exporter_basics.json: |-
    {
      "annotations": {
        "list": [
          {
            "builtIn": 1,
            "datasource": "-- Grafana --",
            "enable": true,
            "hide": true,
            "iconColor": "rgba(0, 211, 255, 1)",
            "name": "Annotations & Alerts",
            "type": "dashboard"
          }
        ]
      },
      "description": "Basic node exporter dashboard",
      "editable": true,
      "gnetId": 9916,
      "graphTooltip": 1,
      "id": 4,
      "iteration": 1552843684303,
      "links": [],
      "panels": [
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorPrefix": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "decimals": 0,
          "format": "s",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 4,
            "w": 4,
            "x": 0,
            "y": 0
          },
          "hideTimeOverride": false,
          "id": 8,
          "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": "s",
          "postfixFontSize": "80%",
          "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": "node_time_seconds{instance=\"$instance\"} - node_boot_time_seconds{instance=\"$instance\"}",
              "format": "time_series",
              "instant": true,
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "thresholds": "",
          "timeFrom": null,
          "timeShift": null,
          "title": "Uptime",
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        },
        {
          "cacheTimeout": null,
          "gridPos": {
            "h": 8,
            "w": 4,
            "x": 4,
            "y": 0
          },
          "id": 10,
          "links": [],
          "options": {
            "maxValue": 100,
            "minValue": 0,
            "showThresholdLabels": false,
            "showThresholdMarkers": true,
            "thresholds": [
              {
                "color": "#7EB26D",
                "index": 0,
                "value": null
              },
              {
                "color": "#F2CC0C",
                "index": 1,
                "value": 70
              },
              {
                "color": "#E02F44",
                "index": 2,
                "value": 90
              }
            ],
            "valueMappings": [],
            "valueOptions": {
              "decimals": 0,
              "prefix": "",
              "stat": "current",
              "suffix": "",
              "unit": "percentunit"
            }
          },
          "targets": [
            {
              "expr": "1 - node_filesystem_avail_bytes{instance=\"$instance\",mountpoint=~\"/(data)?\",fstype!=\"rootfs\"} / node_filesystem_size_bytes{instance=\"$instance\",mountpoint=~\"/(data)?\",fstype!=\"rootfs\"}",
              "format": "time_series",
              "instant": true,
              "intervalFactor": 1,
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Root filesystem usage",
          "type": "gauge"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "format": "bytes",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 8,
            "w": 4,
            "x": 8,
            "y": 0
          },
          "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": "80%",
          "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": "node_filesystem_size_bytes{instance=\"$instance\", mountpoint=~\"/(data)?\",fstype!=\"rootfs\"}",
              "format": "time_series",
              "instant": true,
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "thresholds": "",
          "timeFrom": null,
          "timeShift": null,
          "title": "Root filesystem size",
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "description": "",
          "fill": 1,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 0
          },
          "id": 2,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "paceLength": 10,
          "percentage": false,
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(avg by (mode, instance) (irate(node_cpu_seconds_total{instance=\"$instance\", mode!=\"idle\"}[5m])), \"instance\", \"$1\", \"instance\", \"([^:]+):.+\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "{{ instance }}/{{ mode }}",
              "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": [
            {
              "decimals": 3,
              "format": "percentunit",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": false,
          "colors": [
            "#299c46",
            "rgba(237, 129, 40, 0.89)",
            "#d44a3a"
          ],
          "format": "none",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "gridPos": {
            "h": 4,
            "w": 4,
            "x": 0,
            "y": 4
          },
          "id": 14,
          "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": "80%",
          "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": "count(node_cpu_seconds_total{instance=\"$instance\", mode=\"idle\"})",
              "format": "time_series",
              "instant": true,
              "intervalFactor": 1,
              "refId": "A"
            }
          ],
          "thresholds": "",
          "timeFrom": null,
          "timeShift": null,
          "title": "CPU cores",
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "fill": 1,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 8
          },
          "id": 4,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "paceLength": 10,
          "percentage": false,
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [
            {
              "alias": "/.+\\/total/",
              "color": "#73BF69",
              "fill": 0,
              "stack": "A"
            },
            {
              "alias": "/.+\\/swap/",
              "color": "#F2495C",
              "stack": "A"
            },
            {
              "alias": "/.+\\/used/",
              "stack": "B"
            },
            {
              "alias": "/.+\\/cache.+/"
            }
          ],
          "stack": true,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace((node_memory_MemTotal_bytes{instance=\"$instance\"}), \"instance\", \"$1\", \"instance\", \"([^:]+):.+\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "{{ instance }}/total",
              "refId": "A"
            },
            {
              "expr": "label_replace(node_memory_MemTotal_bytes{instance=\"$instance\"} - node_memory_MemFree_bytes{instance=\"$instance\"}, \"instance\", \"$1\", \"instance\", \"([^:]+):.+\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "{{ instance }}/used",
              "refId": "B"
            },
            {
              "expr": "label_replace((node_memory_SwapTotal_bytes{instance=\"$instance\"} - node_memory_SwapFree_bytes{instance=\"$instance\"}), \"instance\", \"$1\", \"instance\", \"([^:]+):.+\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "{{ instance }}/swap",
              "refId": "D"
            },
            {
              "expr": "label_replace((node_memory_Cached_bytes{instance=\"$instance\"} + node_memory_Buffers_bytes{instance=\"$instance\"}), \"instance\", \"$1\", \"instance\", \"([^:]+):.+\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "{{ instance }}/cache+buffers",
              "refId": "E"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Memory usage",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "bytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": "0",
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "cacheTimeout": null,
          "dashLength": 10,
          "dashes": false,
          "fill": 1,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 8
          },
          "id": 6,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "links": [],
          "nullPointMode": "null",
          "paceLength": 10,
          "percentage": false,
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [
            {
              "alias": "/Tx:.+/",
              "transform": "negative-Y"
            }
          ],
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "label_replace(irate(node_network_receive_bytes_total{instance=\"$instance\",device!~\"lo\"}[5m]), \"instance\", \"$1\", \"instance\", \"([^:]+):.+\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Rx: {{ instance }}/{{ device }}",
              "refId": "A"
            },
            {
              "expr": "label_replace(irate(node_network_transmit_bytes_total{instance=\"$instance\",device!~\"lo\"}[5m]), \"instance\", \"$1\", \"instance\", \"([^:]+):.+\")",
              "format": "time_series",
              "intervalFactor": 1,
              "legendFormat": "Tx: {{ instance }}/{{ device }}",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Network IO",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "format": "Bps",
              "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": "10s",
      "schemaVersion": 18,
      "style": "dark",
      "tags": [
        "linux",
        "node"
      ],
      "templating": {
        "list": [
          {
            "allValue": ".+",
            "current": {
              "text": "grafana:9100",
              "value": "grafana:9100"
            },
            "datasource": "prometheus",
            "definition": "node_exporter_build_info",
            "hide": 0,
            "includeAll": false,
            "label": null,
            "multi": false,
            "name": "instance",
            "options": [],
            "query": "node_exporter_build_info",
            "refresh": 1,
            "regex": ".+instance=\"(.+:[0-9]{1,5})\".+",
            "skipUrlSync": false,
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
          }
        ]
      },
      "time": {
        "from": "now-5m",
        "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": "utc",
      "title": "node_exporter_basics",
      "uid": "8dZuHwjmk",
      "version": 1
    }
kind: ConfigMap
metadata:
  name: grafana-dashboards
  namespace: monitoring
