Convert queues dashboard to grafonnet
Change-Id: Ia3307a923b99ecacaaa8c803aa2af0c9bf4eabcb
diff --git a/dashboards/gerrit-queues.json b/dashboards/gerrit-queues.json
deleted file mode 100644
index d067e6a..0000000
--- a/dashboards/gerrit-queues.json
+++ /dev/null
@@ -1,1162 +0,0 @@
-{
- "__inputs": [
- {
- "name": "DS_PROMETHEUS",
- "label": "Prometheus",
- "description": "",
- "type": "datasource",
- "pluginId": "prometheus",
- "pluginName": "Prometheus"
- }
- ],
- "__requires": [
- {
- "type": "grafana",
- "id": "grafana",
- "name": "Grafana",
- "version": "7.1.5"
- },
- {
- "type": "panel",
- "id": "graph",
- "name": "Graph",
- "version": ""
- },
- {
- "type": "datasource",
- "id": "prometheus",
- "name": "Prometheus",
- "version": "1.0.0"
- }
- ],
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "gnetId": null,
- "graphTooltip": 0,
- "links": [],
- "panels": [
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "${DS_PROMETHEUS}",
- "description": "",
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 7,
- "x": 0,
- "y": 0
- },
- "hiddenSeries": false,
- "id": 2,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "hideEmpty": false,
- "hideZero": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "sideWidth": 150,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "dataLinks": []
- },
- "percentage": false,
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "batch threads",
- "color": "#FFB357"
- },
- {
- "alias": "batch pool size",
- "color": "#FA6400",
- "fill": 0
- },
- {
- "alias": "interactive threads",
- "color": "#C0D8FF"
- },
- {
- "alias": "interactive pool size",
- "color": "#1F60C4",
- "fill": 0
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "queue_ssh_batch_worker_active_threads{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "batch threads",
- "refId": "C"
- },
- {
- "expr": "queue_ssh_batch_worker_pool_size{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "batch pool size",
- "refId": "D"
- },
- {
- "expr": "queue_ssh_interactive_worker_active_threads{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "interactive threads",
- "refId": "A"
- },
- {
- "expr": "queue_ssh_interactive_worker_pool_size{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "interactive pool size",
- "refId": "B"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "SSH threads",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": "Threads",
- "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_PROMETHEUS}",
- "description": "",
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 7,
- "x": 7,
- "y": 0
- },
- "hiddenSeries": false,
- "id": 20,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "sideWidth": 150,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "dataLinks": []
- },
- "percentage": false,
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "active threads",
- "color": "#FFB357"
- },
- {
- "alias": "reserved threads",
- "color": "#56A64B",
- "fill": 0
- },
- {
- "alias": "pool size",
- "color": "#1F60C4",
- "fill": 0
- },
- {
- "alias": "max pool size",
- "color": "#FA6400",
- "fill": 0
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "http_server_jetty_threadpool_active_threads{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "active threads",
- "refId": "A"
- },
- {
- "expr": "http_server_jetty_threadpool_reserved_threads{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "reserved threads",
- "refId": "C"
- },
- {
- "expr": "http_server_jetty_threadpool_max_pool_size{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "max pool size",
- "refId": "B"
- },
- {
- "expr": "http_server_jetty_threadpool_pool_size{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "pool size",
- "refId": "D"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "HTTP threads",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": "threads",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- },
- {
- "format": "short",
- "label": "",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "${DS_PROMETHEUS}",
- "description": "",
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 7,
- "x": 14,
- "y": 0
- },
- "hiddenSeries": false,
- "id": 6,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "sideWidth": 150,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "dataLinks": []
- },
- "percentage": false,
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "batch threads",
- "color": "#FFB357"
- },
- {
- "alias": "batch pool size",
- "color": "#FA6400",
- "fill": 0
- },
- {
- "alias": "interactive threads",
- "color": "#C0D8FF"
- },
- {
- "alias": "interactive pool size",
- "color": "#1F60C4",
- "fill": 0
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "queue_index_batch_active_threads{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "batch threads",
- "refId": "A"
- },
- {
- "expr": "queue_index_batch_pool_size{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "batch pool size",
- "refId": "B"
- },
- {
- "expr": "queue_index_interactive_active_threads{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "interactive threads",
- "refId": "C"
- },
- {
- "expr": "queue_index_interactive_pool_size{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "interactive pool size",
- "refId": "D"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "INDEX threads",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": "Threads",
- "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_PROMETHEUS}",
- "description": "",
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 7,
- "x": 0,
- "y": 8
- },
- "hiddenSeries": false,
- "id": 17,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "sideWidth": 150,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "dataLinks": []
- },
- "percentage": false,
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "batch",
- "color": "#FFB357"
- },
- {
- "alias": "interactive",
- "color": "#C0D8FF"
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "queue_ssh_batch_worker_scheduled_tasks{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "batch",
- "refId": "C"
- },
- {
- "expr": "queue_ssh_interactive_worker_scheduled_tasks{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "interactive",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "SSH queue",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": "Tasks",
- "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,
- "dashLength": 10,
- "dashes": false,
- "datasource": "${DS_PROMETHEUS}",
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 7,
- "x": 7,
- "y": 8
- },
- "hiddenSeries": false,
- "id": 22,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "sideWidth": 150,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "dataLinks": []
- },
- "percentage": false,
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "http",
- "color": "#FFB357"
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "http_server_jetty_threadpool_queue_size{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "http",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "HTTP queue",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "decimals": null,
- "format": "short",
- "label": "Tasks",
- "logBase": 1,
- "max": null,
- "min": "0",
- "show": true
- },
- {
- "format": "short",
- "label": "",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
- }
- ],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
- },
- {
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
- "datasource": "${DS_PROMETHEUS}",
- "description": "",
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 7,
- "x": 14,
- "y": 8
- },
- "hiddenSeries": false,
- "id": 18,
- "legend": {
- "alignAsTable": false,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": false,
- "show": true,
- "sideWidth": 150,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "dataLinks": []
- },
- "percentage": false,
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "batch",
- "color": "#FFB357"
- },
- {
- "alias": "interactive",
- "color": "#C0D8FF"
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "queue_index_batch_scheduled_tasks{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "batch",
- "refId": "C"
- },
- {
- "expr": "queue_index_interactive_scheduled_tasks{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "interactive",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "INDEX queued",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": "Tasks",
- "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,
- "dashLength": 10,
- "dashes": false,
- "datasource": "${DS_PROMETHEUS}",
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 10,
- "x": 0,
- "y": 16
- },
- "hiddenSeries": false,
- "id": 10,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "sideWidth": 150,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "dataLinks": []
- },
- "percentage": false,
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "stream",
- "color": "#C0D8FF"
- },
- {
- "alias": "stream pool",
- "color": "#1F60C4",
- "fill": 0
- },
- {
- "alias": "email",
- "color": "#96D98D"
- },
- {
- "alias": "email pool",
- "color": "#37872D",
- "fill": 0
- },
- {
- "alias": "receive-commit",
- "color": "#FFA6B0"
- },
- {
- "alias": "receive-commit pool",
- "color": "#C4162A",
- "fill": 0
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "queue_ssh_stream_worker_active_threads{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "stream",
- "refId": "A"
- },
- {
- "expr": "queue_ssh_stream_worker_pool_size{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "stream pool",
- "refId": "B"
- },
- {
- "expr": "queue_send_email_active_threads{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "email",
- "refId": "C"
- },
- {
- "expr": "queue_send_email_pool_size{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "email pool",
- "refId": "D"
- },
- {
- "expr": "queue_receive_commits_active_threads{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "receive-commit",
- "refId": "E"
- },
- {
- "expr": "queue_receive_commits_pool_size{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "receive-commit pool",
- "refId": "F"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "misc. threads",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": "Threads",
- "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_PROMETHEUS}",
- "description": "",
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 11,
- "x": 10,
- "y": 16
- },
- "hiddenSeries": false,
- "id": 16,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "sideWidth": 150,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "dataLinks": []
- },
- "percentage": false,
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "rate(http_server_rest_api_count_total_total{instance=\"$instance\",replica=\"$replica\"}[5m])",
- "legendFormat": "REST API request rate",
- "refId": "A"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "REST API request rate",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "decimals": null,
- "format": "reqps",
- "label": "Requests/Second",
- "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_PROMETHEUS}",
- "description": "",
- "fill": 1,
- "fillGradient": 0,
- "gridPos": {
- "h": 8,
- "w": 10,
- "x": 0,
- "y": 24
- },
- "hiddenSeries": false,
- "id": 14,
- "legend": {
- "alignAsTable": true,
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "rightSide": true,
- "show": true,
- "sideWidth": 150,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
- "nullPointMode": "null",
- "options": {
- "dataLinks": []
- },
- "percentage": false,
- "pointradius": 2,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
- {
- "alias": "stream",
- "color": "#8AB8FF"
- },
- {
- "alias": "email",
- "color": "#96D98D"
- },
- {
- "alias": "receive-commit",
- "color": "#FF7383"
- }
- ],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
- "targets": [
- {
- "expr": "queue_ssh_stream_worker_scheduled_tasks{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "stream",
- "refId": "E"
- },
- {
- "expr": "queue_send_email_scheduled_tasks{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "email",
- "refId": "C"
- },
- {
- "expr": "queue_receive_commits_scheduled_tasks{instance=\"$instance\",replica=\"$replica\"}",
- "legendFormat": "receive-commit",
- "refId": "D"
- }
- ],
- "thresholds": [],
- "timeFrom": null,
- "timeRegions": [],
- "timeShift": null,
- "title": "misc. queues",
- "tooltip": {
- "shared": true,
- "sort": 0,
- "value_type": "individual"
- },
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
- },
- "yaxes": [
- {
- "format": "short",
- "label": "Tasks",
- "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": 21,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "allValue": null,
- "current": {
- "text": "",
- "value": ""
- },
- "datasource": "${DS_PROMETHEUS}",
- "definition": "label_values(git_upload_pack_phase_writing_total, instance)",
- "hide": 0,
- "includeAll": false,
- "label": "Gerrit Instance",
- "multi": false,
- "name": "instance",
- "options": [],
- "query": "label_values(git_upload_pack_phase_writing_total, instance)",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- },
- {
- "allValue": null,
- "current": {
- "text": "",
- "value": ""
- },
- "datasource": "${DS_PROMETHEUS}",
- "definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)",
- "hide": 0,
- "includeAll": false,
- "label": "Replica",
- "multi": false,
- "name": "replica",
- "options": [],
- "query": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)",
- "refresh": 2,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "tagValuesQuery": "",
- "tags": [],
- "tagsQuery": "",
- "type": "query",
- "useTags": false
- }
- ]
- },
- "time": {
- "from": "now-6h",
- "to": "now"
- },
- "timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ]
- },
- "timezone": "",
- "title": "Queues",
- "uid": "Zh_ncGsWk",
- "version": 5
-}
diff --git a/dashboards/gerrit/queues/gerrit-queues.jsonnet b/dashboards/gerrit/queues/gerrit-queues.jsonnet
new file mode 100644
index 0000000..c89a891
--- /dev/null
+++ b/dashboards/gerrit/queues/gerrit-queues.jsonnet
@@ -0,0 +1,70 @@
+local grafana = import '../../../vendor/grafonnet/grafana.libsonnet';
+local dashboard = grafana.dashboard;
+local template = grafana.template;
+local graphPanel = grafana.graphPanel;
+local prometheus = grafana.prometheus;
+
+local defaults = import '../../globals/defaults.libsonnet';
+local gridPos = import '../../globals/grid_pos.libsonnet';
+local publishVariables = import '../../globals/publish.libsonnet';
+local variables = import '../globals/variables.libsonnet';
+
+local http_queue_panel = import './panels/http_queue.libsonnet';
+local http_threads_panel = import './panels/http_threads.libsonnet';
+local index_queue_panel = import './panels/index_queue.libsonnet';
+local index_threads_panel = import './panels/index_threads.libsonnet';
+local misc_queue_panel = import './panels/misc_queue.libsonnet';
+local misc_threads_panel = import './panels/misc_threads.libsonnet';
+local rest_api_request_rate_panel = import './panels/rest-api-request-rate.libsonnet';
+local ssh_queue_panel = import './panels/ssh_queue.libsonnet';
+local ssh_threads_panel = import './panels/ssh_threads.libsonnet';
+
+dashboard.new(
+ 'Gerrit - Queues',
+ tags=['gerrit'],
+ schemaVersion=defaults.dashboards.schemaVersion,
+ editable=defaults.dashboards.editable,
+ time_from=defaults.dashboards.timeFrom,
+ time_to=defaults.dashboards.timeTo,
+ refresh=defaults.dashboards.refresh,
+ graphTooltip='shared_tooltip',
+)
+.addTemplate(variables.instance)
+.addTemplate(variables.replica)
+.addPanel(
+ ssh_threads_panel,
+ gridPos=gridPos.new(0, 0, 3)
+)
+.addPanel(
+ http_threads_panel,
+ gridPos=gridPos.new(0, 1, 3)
+)
+.addPanel(
+ index_threads_panel,
+ gridPos=gridPos.new(0, 2, 3)
+)
+.addPanel(
+ ssh_queue_panel,
+ gridPos=gridPos.new(1, 0, 3)
+)
+.addPanel(
+ http_queue_panel,
+ gridPos=gridPos.new(1, 1, 3)
+)
+.addPanel(
+ index_queue_panel,
+ gridPos=gridPos.new(1, 2, 3)
+)
+.addPanel(
+ misc_threads_panel,
+ gridPos=gridPos.new(2, 0)
+)
+.addPanel(
+ rest_api_request_rate_panel,
+ gridPos=gridPos.new(2, 1)
+)
+.addPanel(
+ misc_queue_panel,
+ gridPos=gridPos.new(3, 0)
+)
++ if std.extVar('publish') then publishVariables else {}
diff --git a/dashboards/gerrit/queues/panels/http_queue.libsonnet b/dashboards/gerrit/queues/panels/http_queue.libsonnet
new file mode 100644
index 0000000..26ec00d
--- /dev/null
+++ b/dashboards/gerrit/queues/panels/http_queue.libsonnet
@@ -0,0 +1,23 @@
+local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
+local prometheus = grafana.prometheus;
+
+local lineGraph = import '../../../globals/line-graph.libsonnet';
+
+local HTTP_TARGET = 'http';
+
+lineGraph.new(
+ title='HTTP queue',
+ labelY1='Tasks',
+)
+.addTarget(
+ prometheus.target(
+ 'http_server_jetty_threadpool_queue_size{instance="$instance",replica="$replica"}',
+ legendFormat=HTTP_TARGET,
+ )
+)
+.addSeriesOverride(
+ {
+ alias: HTTP_TARGET,
+ color: '#FFB357',
+ }
+)
diff --git a/dashboards/gerrit/queues/panels/http_threads.libsonnet b/dashboards/gerrit/queues/panels/http_threads.libsonnet
new file mode 100644
index 0000000..8698928
--- /dev/null
+++ b/dashboards/gerrit/queues/panels/http_threads.libsonnet
@@ -0,0 +1,65 @@
+local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
+local prometheus = grafana.prometheus;
+
+local lineGraph = import '../../../globals/line-graph.libsonnet';
+
+local ACTIVE_THREADS_TARGET = 'active threads';
+local RESERVED_THREADS_TARGET = 'reserved threads';
+local MAX_POOL_SIZE_TARGET = 'max pool size';
+local POOL_SIZE_TARGET = 'pool size';
+
+lineGraph.new(
+ title='HTTP threads',
+ labelY1='Threads',
+)
+.addTarget(
+ prometheus.target(
+ 'http_server_jetty_threadpool_active_threads{instance="$instance",replica="$replica"}',
+ legendFormat=ACTIVE_THREADS_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'http_server_jetty_threadpool_reserved_threads{instance="$instance",replica="$replica"}',
+ legendFormat=RESERVED_THREADS_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'http_server_jetty_threadpool_max_pool_size{instance="$instance",replica="$replica"}',
+ legendFormat=MAX_POOL_SIZE_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'http_server_jetty_threadpool_pool_size{instance="$instance",replica="$replica"}',
+ legendFormat= POOL_SIZE_TARGET,
+ )
+)
+.addSeriesOverride(
+ {
+ alias: ACTIVE_THREADS_TARGET,
+ color: '#FFB357',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: RESERVED_THREADS_TARGET,
+ color: '#56A64B',
+ fill: 0,
+ }
+)
+.addSeriesOverride(
+ {
+ alias: MAX_POOL_SIZE_TARGET,
+ color: '#FA6400',
+ fill: 0,
+ }
+)
+.addSeriesOverride(
+ {
+ alias: POOL_SIZE_TARGET,
+ color: '#1F60C4',
+ fill: 0,
+ }
+)
diff --git a/dashboards/gerrit/queues/panels/index_queue.libsonnet b/dashboards/gerrit/queues/panels/index_queue.libsonnet
new file mode 100644
index 0000000..a110580
--- /dev/null
+++ b/dashboards/gerrit/queues/panels/index_queue.libsonnet
@@ -0,0 +1,36 @@
+local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
+local prometheus = grafana.prometheus;
+
+local lineGraph = import '../../../globals/line-graph.libsonnet';
+
+local BATCH_TARGET = 'batch';
+local INTERACTIVE_TARGET = 'interactive';
+
+lineGraph.new(
+ title='INDEX queue',
+ labelY1='Tasks',
+)
+.addTarget(
+ prometheus.target(
+ 'queue_index_batch_scheduled_tasks{instance="$instance",replica="$replica"}',
+ legendFormat=BATCH_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_index_interactive_scheduled_tasks{instance="$instance",replica="$replica"}',
+ legendFormat=INTERACTIVE_TARGET,
+ )
+)
+.addSeriesOverride(
+ {
+ alias: BATCH_TARGET,
+ color: '#FFB357',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: INTERACTIVE_TARGET,
+ color: '#C0D8FF',
+ }
+)
diff --git a/dashboards/gerrit/queues/panels/index_threads.libsonnet b/dashboards/gerrit/queues/panels/index_threads.libsonnet
new file mode 100644
index 0000000..89b7faf
--- /dev/null
+++ b/dashboards/gerrit/queues/panels/index_threads.libsonnet
@@ -0,0 +1,64 @@
+local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
+local prometheus = grafana.prometheus;
+
+local lineGraph = import '../../../globals/line-graph.libsonnet';
+
+local BATCH_THREADS_TARGET = 'batch threads';
+local BATCH_POOL_SIZE_TARGET = 'batch pool size';
+local INTERACTIVE_THREADS_TARGET = 'interactive threads';
+local INTERACTIVE_POOL_SIZE_TARGET = 'interactive pool size';
+
+lineGraph.new(
+ title='INDEX threads',
+ labelY1='Threads',
+)
+.addTarget(
+ prometheus.target(
+ 'queue_index_batch_active_threads{instance="$instance",replica="$replica"}',
+ legendFormat=BATCH_THREADS_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_index_batch_pool_size{instance="$instance",replica="$replica"}',
+ legendFormat=BATCH_POOL_SIZE_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_index_interactive_active_threads{instance="$instance",replica="$replica"}',
+ legendFormat=INTERACTIVE_THREADS_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_index_interactive_pool_size{instance="$instance",replica="$replica"}',
+ legendFormat=INTERACTIVE_POOL_SIZE_TARGET,
+ )
+)
+.addSeriesOverride(
+ {
+ alias: BATCH_THREADS_TARGET,
+ color: '#FFB357',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: BATCH_POOL_SIZE_TARGET,
+ color: '#FA6400',
+ fill: 0,
+ }
+)
+.addSeriesOverride(
+ {
+ alias: INTERACTIVE_THREADS_TARGET,
+ color: '#C0D8FF',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: INTERACTIVE_POOL_SIZE_TARGET,
+ color: '#1F60C4',
+ fill: 0,
+ }
+)
diff --git a/dashboards/gerrit/queues/panels/misc_queue.libsonnet b/dashboards/gerrit/queues/panels/misc_queue.libsonnet
new file mode 100644
index 0000000..a3b389e
--- /dev/null
+++ b/dashboards/gerrit/queues/panels/misc_queue.libsonnet
@@ -0,0 +1,49 @@
+local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
+local prometheus = grafana.prometheus;
+
+local lineGraph = import '../../../globals/line-graph.libsonnet';
+
+local STREAM_TARGET = 'stream threads';
+local EMAIL_TARGET = 'email threads';
+local RECEIVE_COMMIT_TARGET = 'receive-commit threads';
+
+lineGraph.new(
+ title='MISC queues',
+ labelY1='Tasks',
+)
+.addTarget(
+ prometheus.target(
+ 'queue_ssh_stream_worker_scheduled_tasks{instance="$instance",replica="$replica"}',
+ legendFormat=STREAM_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_send_email_scheduled_tasks{instance="$instance",replica="$replica"}',
+ legendFormat=EMAIL_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_receive_commits_scheduled_tasks{instance="$instance",replica="$replica"}',
+ legendFormat=RECEIVE_COMMIT_TARGET,
+ )
+)
+.addSeriesOverride(
+ {
+ alias: STREAM_TARGET,
+ color: '#8AB8FF',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: EMAIL_TARGET,
+ color: '#96D98D',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: RECEIVE_COMMIT_TARGET,
+ color: '#FF7383',
+ }
+)
diff --git a/dashboards/gerrit/queues/panels/misc_threads.libsonnet b/dashboards/gerrit/queues/panels/misc_threads.libsonnet
new file mode 100644
index 0000000..a9ff614
--- /dev/null
+++ b/dashboards/gerrit/queues/panels/misc_threads.libsonnet
@@ -0,0 +1,91 @@
+local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
+local prometheus = grafana.prometheus;
+
+local lineGraph = import '../../../globals/line-graph.libsonnet';
+
+local STREAM_TARGET = 'stream threads';
+local STREAM_POOL_SIZE_TARGET = 'stream pool size';
+local EMAIL_TARGET = 'email threads';
+local EMAIL_POOL_SIZE_TARGET = 'email pool size';
+local RECEIVE_COMMIT_TARGET = 'receive-commit threads';
+local RECEIVE_COMMIT_POOL_SIZE_TARGET = 'receive-commit pool size';
+
+lineGraph.new(
+ title='MISC threads',
+ labelY1='Threads',
+)
+.addTarget(
+ prometheus.target(
+ 'queue_ssh_stream_worker_active_threads{instance="$instance",replica="$replica"}',
+ legendFormat=STREAM_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_ssh_stream_worker_pool_size{instance="$instance",replica="$replica"}',
+ legendFormat=STREAM_POOL_SIZE_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_send_email_active_threads{instance="$instance",replica="$replica"}',
+ legendFormat=EMAIL_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_send_email_pool_size{instance="$instance",replica="$replica"}',
+ legendFormat=EMAIL_POOL_SIZE_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_receive_commits_active_threads{instance="$instance",replica="$replica"}',
+ legendFormat=RECEIVE_COMMIT_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_receive_commits_pool_size{instance="$instance",replica="$replica"}',
+ legendFormat=RECEIVE_COMMIT_POOL_SIZE_TARGET,
+ )
+)
+.addSeriesOverride(
+ {
+ alias: STREAM_TARGET,
+ color: '#C0D8FF',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: STREAM_POOL_SIZE_TARGET,
+ color: '#1F60C4',
+ fill: 0,
+ }
+)
+.addSeriesOverride(
+ {
+ alias: EMAIL_TARGET,
+ color: '#96D98D',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: EMAIL_POOL_SIZE_TARGET,
+ color: '#37872D',
+ fill: 0,
+ }
+)
+.addSeriesOverride(
+ {
+ alias: RECEIVE_COMMIT_TARGET,
+ color: '#FFA6B0',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: RECEIVE_COMMIT_POOL_SIZE_TARGET,
+ color: '#C4162A',
+ fill: 0,
+ }
+)
diff --git a/dashboards/gerrit/queues/panels/rest-api-request-rate.libsonnet b/dashboards/gerrit/queues/panels/rest-api-request-rate.libsonnet
new file mode 100644
index 0000000..25a44c9
--- /dev/null
+++ b/dashboards/gerrit/queues/panels/rest-api-request-rate.libsonnet
@@ -0,0 +1,16 @@
+local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
+local prometheus = grafana.prometheus;
+
+local lineGraph = import '../../../globals/line-graph.libsonnet';
+
+lineGraph.new(
+ title='REST API request rate',
+ labelY1='Requests/Second',
+ formatY1='reqps',
+)
+.addTarget(
+ prometheus.target(
+ 'rate(http_server_rest_api_count_total_total{instance="$instance",replica="$replica"}[5m])',
+ legendFormat='REST API request rate',
+ )
+)
diff --git a/dashboards/gerrit/queues/panels/ssh_queue.libsonnet b/dashboards/gerrit/queues/panels/ssh_queue.libsonnet
new file mode 100644
index 0000000..78d7e55
--- /dev/null
+++ b/dashboards/gerrit/queues/panels/ssh_queue.libsonnet
@@ -0,0 +1,36 @@
+local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
+local prometheus = grafana.prometheus;
+
+local lineGraph = import '../../../globals/line-graph.libsonnet';
+
+local BATCH_TARGET = 'batch';
+local INTERACTIVE_TARGET = 'interactive';
+
+lineGraph.new(
+ title='SSH queue',
+ labelY1='Tasks',
+)
+.addTarget(
+ prometheus.target(
+ 'queue_ssh_batch_worker_scheduled_tasks{instance="$instance",replica="$replica"}',
+ legendFormat=BATCH_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_ssh_interactive_worker_scheduled_tasks{instance="$instance",replica="$replica"}',
+ legendFormat=INTERACTIVE_TARGET,
+ )
+)
+.addSeriesOverride(
+ {
+ alias: BATCH_TARGET,
+ color: '#FFB357',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: INTERACTIVE_TARGET,
+ color: '#C0D8FF',
+ }
+)
diff --git a/dashboards/gerrit/queues/panels/ssh_threads.libsonnet b/dashboards/gerrit/queues/panels/ssh_threads.libsonnet
new file mode 100644
index 0000000..e050d74
--- /dev/null
+++ b/dashboards/gerrit/queues/panels/ssh_threads.libsonnet
@@ -0,0 +1,64 @@
+local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
+local prometheus = grafana.prometheus;
+
+local lineGraph = import '../../../globals/line-graph.libsonnet';
+
+local BATCH_THREADS_TARGET = 'batch threads';
+local BATCH_POOL_SIZE_TARGET = 'batch pool size';
+local INTERACTIVE_THREADS_TARGET = 'interactive threads';
+local INTERACTIVE_POOL_SIZE_TARGET = 'interactive pool size';
+
+lineGraph.new(
+ title='SSH threads',
+ labelY1='Threads',
+)
+.addTarget(
+ prometheus.target(
+ 'queue_ssh_batch_worker_active_threads{instance="$instance",replica="$replica"}',
+ legendFormat=BATCH_THREADS_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_ssh_batch_worker_pool_size{instance="$instance",replica="$replica"}',
+ legendFormat=BATCH_POOL_SIZE_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_ssh_interactive_worker_active_threads{instance="$instance",replica="$replica"}',
+ legendFormat=INTERACTIVE_THREADS_TARGET,
+ )
+)
+.addTarget(
+ prometheus.target(
+ 'queue_ssh_interactive_worker_pool_size{instance="$instance",replica="$replica"}',
+ legendFormat=INTERACTIVE_POOL_SIZE_TARGET,
+ )
+)
+.addSeriesOverride(
+ {
+ alias: BATCH_THREADS_TARGET,
+ color: '#FFB357',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: BATCH_POOL_SIZE_TARGET,
+ color: '#FA6400',
+ fill: 0,
+ }
+)
+.addSeriesOverride(
+ {
+ alias: INTERACTIVE_THREADS_TARGET,
+ color: '#C0D8FF',
+ }
+)
+.addSeriesOverride(
+ {
+ alias: INTERACTIVE_POOL_SIZE_TARGET,
+ color: '#1F60C4',
+ fill: 0,
+ }
+)
diff --git a/dashboards/globals/defaults.libsonnet b/dashboards/globals/defaults.libsonnet
index f49f619..5e4dae4 100644
--- a/dashboards/globals/defaults.libsonnet
+++ b/dashboards/globals/defaults.libsonnet
@@ -6,9 +6,5 @@
timeTo: 'now',
refresh: '1m',
},
- panels: {
- width: 12,
- height: 11,
- },
datasource: if std.extVar('publish') then '${DS_PROMETHEUS}' else 'Prometheus',
}
diff --git a/dashboards/globals/grid_pos.libsonnet b/dashboards/globals/grid_pos.libsonnet
index b421c9c..dcc0cd0 100644
--- a/dashboards/globals/grid_pos.libsonnet
+++ b/dashboards/globals/grid_pos.libsonnet
@@ -1,13 +1,19 @@
local defaults = import './defaults.libsonnet';
+local TOTAL_WIDTH = 24;
+local DEFAULT_HEIGHT = 11;
+
{
new(
row,
column,
+ total_columns=2,
):: {
- x: column * defaults.panels.width,
- y: row * defaults.panels.height,
- w: defaults.panels.width,
- h: defaults.panels.height,
+ local width = TOTAL_WIDTH / total_columns,
+
+ x: column * width,
+ y: row * DEFAULT_HEIGHT,
+ w: width,
+ h: DEFAULT_HEIGHT,
},
}