{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "Nomad built-in telemetry https://github.com/dereknex/nomad-grafana",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 6278,
  "graphTooltip": 1,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "rS2OIfv4z"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 24,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "refId": "A"
        }
      ],
      "title": "Allocations",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "rS2OIfv4z"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 1,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 0,
        "y": 1
      },
      "id": 33,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "9.2.4",
      "repeat": "host",
      "repeatDirection": "v",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_allocated_cpu{datacenter=~\"$datacenter\", host=~\"$host\"}/(nomad_client_unallocated_cpu{datacenter=~\"$datacenter\", host=~\"$host\"}+nomad_client_allocated_cpu{datacenter=~\"$datacenter\", host=~\"$host\"})",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "CPU ($host)",
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "rS2OIfv4z"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 1,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 5,
        "y": 1
      },
      "id": 40,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "9.2.4",
      "repeat": "host",
      "repeatDirection": "v",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_allocated_memory{datacenter=~\"$datacenter\", host=~\"$host\"}/(nomad_client_unallocated_memory{datacenter=~\"$datacenter\", host=~\"$host\"}+nomad_client_allocated_memory{datacenter=~\"$datacenter\", host=~\"$host\"})",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Memory ($host)",
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "rS2OIfv4z"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2,
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 1,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 10,
        "y": 1
      },
      "id": 48,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "9.2.4",
      "repeat": "host",
      "repeatDirection": "v",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_allocated_disk{datacenter=~\"$datacenter\", host=~\"$host\"}/(nomad_client_unallocated_disk{datacenter=~\"$datacenter\", host=~\"$host\"}+nomad_client_allocated_disk{datacenter=~\"$datacenter\", host=~\"$host\"})",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Disk ($host)",
      "type": "gauge"
    },
    {
      "backgroundColor": "rgba(128,128,128,0.1)",
      "colorMaps": [
        {
          "color": "#CCC",
          "text": "N/A"
        }
      ],
      "crosshairColor": "#8F070C",
      "datasource": {
        "type": "prometheus",
        "uid": "rS2OIfv4z"
      },
      "display": "timeline",
      "expandFromQueryS": 0,
      "extendLastValue": true,
      "gridPos": {
        "h": 5,
        "w": 9,
        "x": 15,
        "y": 1
      },
      "highlightOnMouseover": false,
      "id": 58,
      "legendSortBy": "-ms",
      "lineColor": "rgba(0,0,0,0.1)",
      "links": [],
      "metricNameColor": "#000000",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "repeat": "host",
      "repeatDirection": "v",
      "rowHeight": 24,
      "showDistinctCount": false,
      "showLegend": false,
      "showLegendNames": false,
      "showLegendPercent": true,
      "showLegendValues": false,
      "showTimeAxis": true,
      "showTransitionCount": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_allocations_migrating{datacenter=~\"$datacenter\", host=~\"$host\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Migrating",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_allocations_blocked{datacenter=~\"$datacenter\", host=~\"$host\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Blocked",
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_allocations_pending{datacenter=~\"$datacenter\", host=~\"$host\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Pending",
          "refId": "C"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_allocations_running{datacenter=~\"$datacenter\", host=~\"$host\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Running",
          "refId": "D"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_allocations_terminal{datacenter=~\"$datacenter\", host=~\"$host\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Terminal",
          "refId": "E"
        }
      ],
      "textSize": 14,
      "textSizeTime": 12,
      "timeOptions": [
        {
          "name": "Years",
          "value": "years"
        },
        {
          "name": "Months",
          "value": "months"
        },
        {
          "name": "Weeks",
          "value": "weeks"
        },
        {
          "name": "Days",
          "value": "days"
        },
        {
          "name": "Hours",
          "value": "hours"
        },
        {
          "name": "Minutes",
          "value": "minutes"
        },
        {
          "name": "Seconds",
          "value": "seconds"
        },
        {
          "name": "Milliseconds",
          "value": "milliseconds"
        }
      ],
      "timePrecision": {
        "name": "Minutes",
        "value": "minutes"
      },
      "timeTextColor": "#d8d9da",
      "title": "Summary ($host)",
      "type": "natel-discrete-panel",
      "units": "short",
      "use12HourClock": false,
      "useTimePrecision": false,
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueTextColor": "#000000",
      "writeAllValues": false,
      "writeLastValue": true,
      "writeMetricNames": true
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "rS2OIfv4z"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 16
      },
      "id": 2,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "refId": "A"
        }
      ],
      "title": "Host Status",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "rS2OIfv4z"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 1,
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "dtdurations"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 4,
        "x": 0,
        "y": 17
      },
      "id": 4,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "none",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.2.4",
      "repeat": "host",
      "repeatDirection": "v",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_uptime{datacenter=~\"$datacenter\", host=~\"$host\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Uptime ($host)",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "rS2OIfv4z"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "#cca300",
                "value": null
              },
              {
                "color": "#508642",
                "value": 20
              },
              {
                "color": "#508642",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 4,
        "y": 17
      },
      "id": 7,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "9.2.4",
      "repeat": "host",
      "repeatDirection": "v",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "avg(nomad_client_host_cpu_idle{datacenter=\"$datacenter\", host=\"$host\"})",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "CPU Idle ($host)",
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "rS2OIfv4z"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "decbytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 9,
        "y": 17
      },
      "id": 11,
      "links": [],
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "9.2.4",
      "repeat": "host",
      "repeatDirection": "v",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_host_memory_total{datacenter=~\"$datacenter\", host=~\"$host\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Total",
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_host_memory_free{datacenter=~\"$datacenter\", host=~\"$host\"}",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Free",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_host_memory_used{datacenter=~\"$datacenter\", host=~\"$host\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Used",
          "refId": "C"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "nomad_client_host_memory_available{datacenter=~\"$datacenter\", host=~\"$host\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Available",
          "refId": "D"
        }
      ],
      "title": "Memory ($host)",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "rS2OIfv4z"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "decbytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 14,
        "y": 17
      },
      "id": 13,
      "links": [],
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "9.2.4",
      "repeat": "host",
      "repeatDirection": "v",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "max(nomad_client_host_disk_size{datacenter=~\"$datacenter\", host=~\"$host\"}) by (disk)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Total - {{disk}}",
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "avg(nomad_client_host_disk_available{datacenter=~\"$datacenter\", host=~\"$host\"}) by (disk)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Available - {{disk}}",
          "refId": "A"
        }
      ],
      "title": "Disk Usage ($host)",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "rS2OIfv4z"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 19,
        "y": 17
      },
      "id": 15,
      "links": [],
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "9.2.4",
      "repeat": "host",
      "repeatDirection": "v",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "rS2OIfv4z"
          },
          "expr": "avg(nomad_client_host_disk_inodes_percent{datacenter=~\"$datacenter\", host=~\"$host\"}) by (disk)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{disk}}",
          "refId": "A"
        }
      ],
      "title": "Disk Inodes ($host)",
      "type": "timeseries"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 37,
  "style": "dark",
  "tags": [
    "nomad",
    "host",
    "cluster"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "dc1",
          "value": "dc1"
        },
        "datasource": {
          "type": "prometheus",
          "uid": "rS2OIfv4z"
        },
        "definition": "",
        "hide": 0,
        "includeAll": false,
        "label": "DC",
        "multi": false,
        "name": "datacenter",
        "options": [],
        "query": {
          "query": "label_values(nomad_client_uptime, datacenter)",
          "refId": "Prometheus-datacenter-Variable-Query"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": {
          "type": "prometheus",
          "uid": "rS2OIfv4z"
        },
        "definition": "",
        "hide": 0,
        "includeAll": true,
        "label": "Host",
        "multi": true,
        "name": "host",
        "options": [],
        "query": {
          "query": "label_values(nomad_client_uptime{datacenter=~\"$datacenter\"}, host)",
          "refId": "Prometheus-host-Variable-Query"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "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": "Nomad Cluster",
  "uid": "lDPoGyv4z",
  "version": 6,
  "weekStart": ""
}