homelab-nomad/metrics/grafana/provisioning/dashboards/default/nomad.json

1106 lines
25 KiB
JSON

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "Nomad built-in telemetry https://github.com/dereknex/nomad-grafana",
"editable": true,
"gnetId": 6278,
"graphTooltip": 1,
"id": 8,
"iteration": 1659118948293,
"links": [],
"panels": [
{
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 24,
"title": "Allocations",
"type": "row"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#d44a3a",
"rgba(237, 129, 40, 0.89)",
"#299c46"
],
"datasource": "Prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"format": "percentunit",
"gauge": {
"maxValue": 1,
"minValue": 0,
"show": true,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 5,
"w": 5,
"x": 0,
"y": 1
},
"id": 33,
"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": "host",
"repeatDirection": "v",
"scopedVars": {
"host": {
"selected": true,
"text": "n2",
"value": "n2"
}
},
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"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"
}
],
"thresholds": "",
"title": "CPU",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#d44a3a",
"rgba(237, 129, 40, 0.89)",
"#299c46"
],
"datasource": "Prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"format": "percentunit",
"gauge": {
"maxValue": 1,
"minValue": 0,
"show": true,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 5,
"w": 5,
"x": 5,
"y": 1
},
"id": 40,
"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": "host",
"repeatDirection": "v",
"scopedVars": {
"host": {
"selected": true,
"text": "n2",
"value": "n2"
}
},
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"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"
}
],
"thresholds": "",
"title": "Memory",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#d44a3a",
"rgba(237, 129, 40, 0.89)",
"#299c46"
],
"datasource": "Prometheus",
"decimals": 2,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"format": "percentunit",
"gauge": {
"maxValue": 1,
"minValue": 0,
"show": true,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 5,
"w": 5,
"x": 10,
"y": 1
},
"id": 48,
"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": "host",
"repeatDirection": "v",
"scopedVars": {
"host": {
"selected": true,
"text": "n2",
"value": "n2"
}
},
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"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"
}
],
"thresholds": "",
"title": "Disk",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current"
},
{
"backgroundColor": "rgba(128,128,128,0.1)",
"colorMaps": [
{
"color": "#CCC",
"text": "N/A"
}
],
"crosshairColor": "#8F070C",
"datasource": "Prometheus",
"display": "timeline",
"expandFromQueryS": 0,
"extendLastValue": true,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"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,
"scopedVars": {
"host": {
"selected": true,
"text": "n2",
"value": "n2"
}
},
"showDistinctCount": false,
"showLegend": false,
"showLegendNames": false,
"showLegendPercent": true,
"showLegendValues": false,
"showTimeAxis": true,
"showTransitionCount": false,
"targets": [
{
"expr": "nomad_client_allocations_migrating{datacenter=~\"$datacenter\", host=~\"$host\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Migrating",
"refId": "A"
},
{
"expr": "nomad_client_allocations_blocked{datacenter=~\"$datacenter\", host=~\"$host\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Blocked",
"refId": "B"
},
{
"expr": "nomad_client_allocations_pending{datacenter=~\"$datacenter\", host=~\"$host\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Pending",
"refId": "C"
},
{
"expr": "nomad_client_allocations_running{datacenter=~\"$datacenter\", host=~\"$host\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Running",
"refId": "D"
},
{
"expr": "nomad_client_allocations_terminal{datacenter=~\"$datacenter\", host=~\"$host\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Terminal",
"refId": "E"
}
],
"textSize": 14,
"textSizeTime": 12,
"timeTextColor": "#d8d9da",
"title": "Summary",
"type": "natel-discrete-panel",
"units": "short",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueTextColor": "#000000",
"writeAllValues": false,
"writeLastValue": true,
"writeMetricNames": true
},
{
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 6
},
"id": 2,
"title": "Host Status",
"type": "row"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#299c46",
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"datasource": "Prometheus",
"decimals": 1,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"format": "dtdurations",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 5,
"w": 4,
"x": 0,
"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": "host",
"repeatDirection": "v",
"scopedVars": {
"host": {
"selected": true,
"text": "n2",
"value": "n2"
}
},
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false
},
"tableColumn": "",
"targets": [
{
"expr": "nomad_client_uptime{datacenter=~\"$datacenter\", host=~\"$host\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "",
"refId": "A"
}
],
"thresholds": "",
"title": "Uptime($host)",
"type": "singlestat",
"valueFontSize": "50%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#cca300",
"#508642",
"#508642"
],
"datasource": "Prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"format": "percent",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": true,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 5,
"w": 5,
"x": 4,
"y": 7
},
"id": 7,
"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": "host",
"repeatDirection": "v",
"scopedVars": {
"host": {
"selected": true,
"text": "n2",
"value": "n2"
}
},
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"expr": "nomad_client_host_cpu_idle{datacenter=\"$datacenter\", host=\"$host\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "",
"refId": "A"
}
],
"thresholds": "20,80",
"title": "CPU Idle($host)",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "current"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 5,
"w": 5,
"x": 9,
"y": 7
},
"hiddenSeries": false,
"id": 11,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.6",
"pointradius": 5,
"points": false,
"renderer": "flot",
"repeat": "host",
"repeatDirection": "v",
"scopedVars": {
"host": {
"selected": true,
"text": "n2",
"value": "n2"
}
},
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "nomad_client_host_memory_total{datacenter=~\"$datacenter\", host=~\"$host\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "Total",
"refId": "B"
},
{
"expr": "nomad_client_host_memory_free{datacenter=~\"$datacenter\", host=~\"$host\"}",
"format": "time_series",
"instant": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "Free",
"refId": "A"
},
{
"expr": "nomad_client_host_memory_used{datacenter=~\"$datacenter\", host=~\"$host\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "Used",
"refId": "C"
},
{
"expr": "nomad_client_host_memory_available{datacenter=~\"$datacenter\", host=~\"$host\"}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "Available",
"refId": "D"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Memory ($host)",
"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": "Prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 5,
"w": 5,
"x": 14,
"y": 7
},
"hiddenSeries": false,
"id": 13,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.6",
"pointradius": 5,
"points": false,
"renderer": "flot",
"repeat": "host",
"repeatDirection": "v",
"scopedVars": {
"host": {
"selected": true,
"text": "n2",
"value": "n2"
}
},
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "max(nomad_client_host_disk_size{datacenter=~\"$datacenter\", host=~\"$host\"}) by (disk)",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "Total - {{disk}}",
"refId": "B"
},
{
"expr": "avg(nomad_client_host_disk_available{datacenter=~\"$datacenter\", host=~\"$host\"}) by (disk)",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "Available - {{disk}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Disk Usage ($host)",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"decimals": 0,
"format": "decbytes",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "decbytes",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 5,
"w": 5,
"x": 19,
"y": 7
},
"hiddenSeries": false,
"id": 15,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.6",
"pointradius": 5,
"points": false,
"renderer": "flot",
"repeat": "host",
"repeatDirection": "v",
"scopedVars": {
"host": {
"selected": true,
"text": "n2",
"value": "n2"
}
},
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "avg(nomad_client_host_disk_inodes_percent{datacenter=~\"$datacenter\", host=~\"$host\"}) by (disk)",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{disk}}",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Disk Inodes ($host)",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"decimals": null,
"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
}
}
],
"refresh": "1m",
"schemaVersion": 26,
"style": "dark",
"tags": [
"nomad",
"host",
"cluster"
],
"templating": {
"list": [
{
"allValue": null,
"current": {
"selected": false,
"text": "dc1",
"value": "dc1"
},
"datasource": "Prometheus",
"definition": "",
"error": null,
"hide": 0,
"includeAll": false,
"label": "DC",
"multi": false,
"name": "datacenter",
"options": [],
"query": "label_values(nomad_client_uptime, datacenter)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"selected": true,
"tags": [],
"text": [
"n2"
],
"value": [
"n2"
]
},
"datasource": "Prometheus",
"definition": "",
"error": null,
"hide": 0,
"includeAll": true,
"label": "Host",
"multi": true,
"name": "host",
"options": [],
"query": "label_values(nomad_client_uptime{datacenter=~\"$datacenter\"}, host)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"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": "CiP3mZVik",
"version": 5
}