Grafana dashboard: dask
Description: Monitor an auto-scaling Dask cluster, including a dynamic view of active workers. 

This dashboard displays metrics collected from an auto-scaling Dask cluster, including a dynamic view of active workers. While we use [Dask Kubernetes deployment](https://kubernetes.dask.org/en/latest/) for deployment, other scenarios are also possible.

The dask metrics are exposed to Prometheus as described in https://distributed.dask.org/en/latest/prometheus.html
Corresponding scrapers are defined in `prometheus.yml`. For example, scheduler metrics from dashboard.dask:8787/metrics are collected using:
```
    - job_name: 'dask-scheduler'
      scrape_interval: 5s
      static_configs:
        - targets: ['dashboard.dask:8787']
```

Worker metrics from workers spawned with [Dask Kubernetes](https://kubernetes.dask.org/en/latest/) can be collected in-cluster via the following job:
```
    - job_name: 'dask-workers'
      kubernetes_sd_configs:
        - role: pod
      relabel_configs:
        - source_labels: [__meta_kubernetes_pod_label_app, __meta_kubernetes_pod_label_dask_org_component]
          regex: dask;worker
          action: keep
```

{
  "__inputs": [
    {
      "name": "DS_DS_PROMETHEUS",
      "label": "DS_Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.2.4"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 11522,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1579191096287,
  "links": [],
  "panels": [
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorPostfix": true,
      "colorPrefix": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "#FADE2A",
        "#FF9830"
      ],
      "datasource": "${DS_DS_PROMETHEUS}",
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 0,
        "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,
      "options": {},
      "pluginVersion": "6.2.4",
      "postfix": " clients",
      "postfixFontSize": "100%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(184, 119, 217, 0.44)",
        "full": false,
        "lineColor": "#B877D9",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "dask_scheduler_clients",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": "5, 10",
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "type": "singlestat",
      "valueFontSize": "200%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_DS_PROMETHEUS}",
      "fill": 5,
      "gridPos": {
        "h": 4,
        "w": 14,
        "x": 3,
        "y": 0
      },
      "id": 6,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": true,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "expr": "dask_scheduler_clients",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "Clients",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Clients",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "short",
          "label": "",
          "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
      }
    },
    {
      "content": "\n# active workers (last $active_interval)",
      "datasource": "-- Grafana --",
      "gridPos": {
        "h": 2,
        "w": 7,
        "x": 17,
        "y": 0
      },
      "id": 37,
      "links": [],
      "mode": "markdown",
      "options": {},
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "type": "text"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_DS_PROMETHEUS}",
      "decimals": null,
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 17,
        "y": 2
      },
      "id": 35,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.2.4",
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "repeat": "active_worker_instance",
      "repeatDirection": "v",
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "dask_worker_threads{instance=~\"$active_worker_instance\"}",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Threads  @ $active_worker_instance",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "datasource": "${DS_DS_PROMETHEUS}",
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 20,
        "y": 2
      },
      "id": 16,
      "interval": "",
      "links": [],
      "options": {
        "displayMode": "lcd",
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "max": 100,
            "min": 0,
            "title": ""
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "red",
              "index": 1,
              "value": 80
            }
          ],
          "values": false
        },
        "orientation": "vertical"
      },
      "repeat": "active_worker_instance",
      "repeatDirection": "v",
      "targets": [
        {
          "expr": "dask_worker_tasks{instance=~\"$active_worker_instance\"}",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{state}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Tasks @ $active_worker_instance",
      "type": "bargauge"
    },
    {
      "datasource": "${DS_DS_PROMETHEUS}",
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 0,
        "y": 4
      },
      "id": 8,
      "links": [],
      "options": {
        "displayMode": "basic",
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "max": 1000,
            "min": 0
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "#E24D42",
              "index": 1,
              "value": 100
            },
            {
              "color": "#6ED0E0",
              "index": 2,
              "value": 200
            },
            {
              "color": "yellow",
              "index": 3,
              "value": 500
            },
            {
              "color": "#EF843C",
              "index": 4,
              "value": 1000
            }
          ],
          "values": false
        },
        "orientation": "horizontal"
      },
      "targets": [
        {
          "expr": "dask_scheduler_tasks",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{state}}",
          "refId": "A"
        },
        {
          "expr": "dask_scheduler_tasks_forgotten_total",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "forgotten",
          "refId": "B"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Tasks: scheduler",
      "type": "bargauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "cacheTimeout": null,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_DS_PROMETHEUS}",
      "fill": 5,
      "gridPos": {
        "h": 5,
        "w": 14,
        "x": 3,
        "y": 4
      },
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": true,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "percentage": false,
      "pluginVersion": "6.1.6",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "expr": "dask_scheduler_tasks",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "{{state}}",
          "refId": "A"
        },
        {
          "expr": "dask_scheduler_tasks_forgotten_total",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "forgotten",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Tasks: scheduler",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "short",
          "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
      }
    },
    {
      "datasource": "${DS_DS_PROMETHEUS}",
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 0,
        "y": 9
      },
      "id": 38,
      "links": [],
      "options": {
        "displayMode": "basic",
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "max": 1000,
            "min": 0
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "#E24D42",
              "index": 1,
              "value": 100
            },
            {
              "color": "#6ED0E0",
              "index": 2,
              "value": 200
            },
            {
              "color": "yellow",
              "index": 3,
              "value": 500
            },
            {
              "color": "#EF843C",
              "index": 4,
              "value": 1000
            }
          ],
          "values": false
        },
        "orientation": "horizontal"
      },
      "targets": [
        {
          "expr": "sum(dask_worker_tasks) by (state)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "{{state}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Tasks: workers",
      "type": "bargauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "cacheTimeout": null,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_DS_PROMETHEUS}",
      "fill": 5,
      "gridPos": {
        "h": 5,
        "w": 14,
        "x": 3,
        "y": 9
      },
      "id": 39,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": true,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "percentage": false,
      "pluginVersion": "6.1.6",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "expr": "sum(dask_worker_tasks) by (state)",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "{{state}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Tasks: workers",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "short",
          "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,
      "colorPostfix": true,
      "colorValue": true,
      "colors": [
        "#F2495C",
        "#73BF69",
        "#FF9830"
      ],
      "datasource": "${DS_DS_PROMETHEUS}",
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 0,
        "y": 14
      },
      "id": 42,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.2.4",
      "postfix": " workers",
      "postfixFontSize": "100%",
      "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": true
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "dask_scheduler_workers{state=~\"connected\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": "1, 14",
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "type": "singlestat",
      "valueFontSize": "200%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_DS_PROMETHEUS}",
      "description": "",
      "fill": 5,
      "gridPos": {
        "h": 6,
        "w": 14,
        "x": 3,
        "y": 14
      },
      "id": 4,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": true,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "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": "dask_scheduler_workers",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "{{state}}",
          "refId": "A"
        },
        {
          "expr": "dask_scheduler_desired_workers",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "desired",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Workers",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": "20",
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_DS_PROMETHEUS}",
      "gridPos": {
        "h": 8,
        "w": 3,
        "x": 0,
        "y": 17
      },
      "id": 10,
      "links": [],
      "options": {
        "displayMode": "lcd",
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "max": 20,
            "min": 0
          },
          "mappings": [],
          "override": {},
          "thresholds": [
            {
              "color": "green",
              "index": 0,
              "value": null
            },
            {
              "color": "yellow",
              "index": 1,
              "value": 10
            },
            {
              "color": "red",
              "index": 2,
              "value": 15
            }
          ],
          "values": false
        },
        "orientation": "horizontal"
      },
      "pluginVersion": "6.2.4",
      "targets": [
        {
          "expr": "dask_scheduler_workers",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "{{state}}",
          "refId": "B"
        },
        {
          "expr": "dask_scheduler_desired_workers",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "desired",
          "refId": "C"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Workers",
      "type": "bargauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_DS_PROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 5,
        "w": 14,
        "x": 3,
        "y": 20
      },
      "id": 33,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": true,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "repeat": null,
      "repeatDirection": "h",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "dask_worker_connections",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "{{instance}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Worker Connections",
      "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,
      "cacheTimeout": null,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_DS_PROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 0,
        "y": 25
      },
      "id": 41,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {},
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "max",
          "color": "#F2495C"
        },
        {
          "alias": "avg",
          "color": "#73BF69",
          "dashes": true,
          "spaceLength": 5
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "max(dask_worker_latency_seconds) without (instance)",
          "format": "time_series",
          "instant": false,
          "intervalFactor": 1,
          "legendFormat": "max",
          "refId": "A"
        },
        {
          "expr": "avg(dask_worker_latency_seconds) without (instance)",
          "format": "time_series",
          "instant": false,
          "intervalFactor": 1,
          "legendFormat": "avg",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [
        {
          "colorMode": "background6",
          "fill": true,
          "fillColor": "rgba(234, 112, 112, 0.12)",
          "line": false,
          "lineColor": "rgba(237, 46, 24, 0.60)",
          "op": "time"
        }
      ],
      "timeShift": null,
      "title": "Worker latency",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 3,
          "format": "s",
          "label": "",
          "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_DS_PROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 5,
        "w": 14,
        "x": 3,
        "y": 25
      },
      "id": 31,
      "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",
      "options": {},
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "repeat": null,
      "repeatDirection": "h",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "dask_worker_latency_seconds",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "{{instance}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Worker Latency",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 3,
          "format": "s",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "decimals": null,
          "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": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_DS_PROMETHEUS}",
        "definition": "query_result(max_over_time(dask_worker_threads[${__range_s}s]))",
        "hide": 0,
        "includeAll": true,
        "label": "workers",
        "multi": true,
        "name": "worker_instance",
        "options": [],
        "query": "query_result(max_over_time(dask_worker_threads[${__range_s}s]))",
        "refresh": 2,
        "regex": "/\"([^\"]+)\"/",
        "skipUrlSync": false,
        "sort": 3,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "auto": false,
        "auto_count": 30,
        "auto_min": "10s",
        "current": {
          "text": "1m",
          "value": "1m"
        },
        "hide": 0,
        "label": "active interval",
        "name": "active_interval",
        "options": [
          {
            "selected": true,
            "text": "1m",
            "value": "1m"
          },
          {
            "selected": false,
            "text": "10m",
            "value": "10m"
          },
          {
            "selected": false,
            "text": "30m",
            "value": "30m"
          },
          {
            "selected": false,
            "text": "1h",
            "value": "1h"
          },
          {
            "selected": false,
            "text": "3h",
            "value": "3h"
          },
          {
            "selected": false,
            "text": "6h",
            "value": "6h"
          },
          {
            "selected": false,
            "text": "12h",
            "value": "12h"
          },
          {
            "selected": false,
            "text": "1d",
            "value": "1d"
          }
        ],
        "query": "1m,10m,30m,1h,3h,6h,12h,1d",
        "refresh": 2,
        "skipUrlSync": false,
        "type": "interval"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_DS_PROMETHEUS}",
        "definition": "query_result(max_over_time(dask_worker_threads[$active_interval]))",
        "hide": 0,
        "includeAll": true,
        "label": "active workers",
        "multi": true,
        "name": "active_worker_instance",
        "options": [],
        "query": "query_result(max_over_time(dask_worker_threads[$active_interval]))",
        "refresh": 2,
        "regex": "/instance=\"([^\"]+)\"/",
        "skipUrlSync": false,
        "sort": 3,
        "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": "",
  "title": "dask",
  "uid": "a_khcwhWk",
  "version": 7,
  "description": "Monitor an auto-scaling Dask cluster, including a dynamic view of active workers. "
}