Last active
March 27, 2026 10:38
-
-
Save okerx/bcc9ee670dd488e236fe835abf701682 to your computer and use it in GitHub Desktop.
BullMQ Dashboard for https://github.com/okerx/bullmq-metrics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "__inputs": [ | |
| { | |
| "name": "DS_PROMETHEUS", | |
| "label": "Prometheus", | |
| "description": "", | |
| "type": "datasource", | |
| "pluginId": "prometheus", | |
| "pluginName": "Prometheus" | |
| } | |
| ], | |
| "__requires": [ | |
| { | |
| "type": "grafana", | |
| "id": "grafana", | |
| "name": "Grafana", | |
| "version": "10.0.0" | |
| }, | |
| { | |
| "type": "panel", | |
| "id": "stat", | |
| "name": "Stat", | |
| "version": "" | |
| }, | |
| { | |
| "type": "panel", | |
| "id": "timeseries", | |
| "name": "Time series", | |
| "version": "" | |
| }, | |
| { | |
| "type": "panel", | |
| "id": "piechart", | |
| "name": "Pie chart", | |
| "version": "" | |
| }, | |
| { | |
| "type": "panel", | |
| "id": "barchart", | |
| "name": "Bar chart", | |
| "version": "" | |
| }, | |
| { | |
| "type": "panel", | |
| "id": "table", | |
| "name": "Table", | |
| "version": "" | |
| }, | |
| { | |
| "type": "datasource", | |
| "id": "prometheus", | |
| "name": "Prometheus", | |
| "version": "" | |
| } | |
| ], | |
| "annotations": { | |
| "list": [ | |
| { | |
| "builtIn": 1, | |
| "datasource": { | |
| "type": "grafana", | |
| "uid": "-- Grafana --" | |
| }, | |
| "enable": true, | |
| "hide": true, | |
| "iconColor": "rgba(0, 211, 255, 1)", | |
| "name": "Annotations & Alerts", | |
| "type": "dashboard" | |
| } | |
| ] | |
| }, | |
| "description": "BullMQ queue monitoring dashboard for the bullmq-prometheus-exporter /metrics endpoint.", | |
| "editable": true, | |
| "fiscalYearStartMonth": 0, | |
| "graphTooltip": 0, | |
| "links": [], | |
| "panels": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Current backlog across the selected queues. Backlog includes waiting, active, delayed, prioritized, and waiting-children jobs.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "orange", | |
| "value": 1 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 100 | |
| } | |
| ] | |
| }, | |
| "unit": "none" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 4, | |
| "w": 4, | |
| "x": 0, | |
| "y": 0 | |
| }, | |
| "id": 1, | |
| "options": { | |
| "colorMode": "background", | |
| "graphMode": "none", | |
| "justifyMode": "center", | |
| "orientation": "auto", | |
| "percentChangeColorMode": "standard", | |
| "reduceOptions": { | |
| "calcs": [ | |
| "lastNotNull" | |
| ], | |
| "fields": "", | |
| "values": false | |
| }, | |
| "showPercentChange": false, | |
| "textMode": "auto", | |
| "wideLayout": true | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum(bullmq_job_count{queue=~\"$queue\",state=~\"waiting|active|delayed|prioritized|waiting-children\"})", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "A" | |
| } | |
| ], | |
| "title": "Total Backlog", | |
| "type": "stat" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Jobs currently being processed.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "fixedColor": "blue", | |
| "mode": "fixed" | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "blue", | |
| "value": 0 | |
| } | |
| ] | |
| }, | |
| "unit": "none" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 4, | |
| "w": 4, | |
| "x": 4, | |
| "y": 0 | |
| }, | |
| "id": 2, | |
| "options": { | |
| "colorMode": "background", | |
| "graphMode": "none", | |
| "justifyMode": "center", | |
| "orientation": "auto", | |
| "percentChangeColorMode": "standard", | |
| "reduceOptions": { | |
| "calcs": [ | |
| "lastNotNull" | |
| ], | |
| "fields": "", | |
| "values": false | |
| }, | |
| "showPercentChange": false, | |
| "textMode": "auto", | |
| "wideLayout": true | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum(bullmq_job_count{queue=~\"$queue\",state=\"active\"})", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "A" | |
| } | |
| ], | |
| "title": "Active Jobs", | |
| "type": "stat" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Delayed and prioritized jobs waiting for their turn to run.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "orange", | |
| "value": 1 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 10 | |
| } | |
| ] | |
| }, | |
| "unit": "none" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 4, | |
| "w": 4, | |
| "x": 8, | |
| "y": 0 | |
| }, | |
| "id": 3, | |
| "options": { | |
| "colorMode": "background", | |
| "graphMode": "none", | |
| "justifyMode": "center", | |
| "orientation": "auto", | |
| "percentChangeColorMode": "standard", | |
| "reduceOptions": { | |
| "calcs": [ | |
| "lastNotNull" | |
| ], | |
| "fields": "", | |
| "values": false | |
| }, | |
| "showPercentChange": false, | |
| "textMode": "auto", | |
| "wideLayout": true | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum(bullmq_job_count{queue=~\"$queue\",state=~\"delayed|prioritized\"})", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "A" | |
| } | |
| ], | |
| "title": "Delayed / Prioritized", | |
| "type": "stat" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Current failed jobs that remain in the failed set.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 1 | |
| } | |
| ] | |
| }, | |
| "unit": "none" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 4, | |
| "w": 4, | |
| "x": 12, | |
| "y": 0 | |
| }, | |
| "id": 4, | |
| "options": { | |
| "colorMode": "background", | |
| "graphMode": "none", | |
| "justifyMode": "center", | |
| "orientation": "auto", | |
| "percentChangeColorMode": "standard", | |
| "reduceOptions": { | |
| "calcs": [ | |
| "lastNotNull" | |
| ], | |
| "fields": "", | |
| "values": false | |
| }, | |
| "showPercentChange": false, | |
| "textMode": "auto", | |
| "wideLayout": true | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum(bullmq_job_count{queue=~\"$queue\",state=\"failed\"})", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "A" | |
| } | |
| ], | |
| "title": "Failed Jobs", | |
| "type": "stat" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Jobs completed during the latest BullMQ one-minute bucket.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "fixedColor": "green", | |
| "mode": "fixed" | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| } | |
| ] | |
| }, | |
| "unit": "none" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 4, | |
| "w": 4, | |
| "x": 16, | |
| "y": 0 | |
| }, | |
| "id": 5, | |
| "options": { | |
| "colorMode": "background", | |
| "graphMode": "none", | |
| "justifyMode": "center", | |
| "orientation": "auto", | |
| "percentChangeColorMode": "standard", | |
| "reduceOptions": { | |
| "calcs": [ | |
| "lastNotNull" | |
| ], | |
| "fields": "", | |
| "values": false | |
| }, | |
| "showPercentChange": false, | |
| "textMode": "auto", | |
| "wideLayout": true | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum(bullmq_jobs_completed_last_minute{queue=~\"$queue\"})", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "A" | |
| } | |
| ], | |
| "title": "Completed Last Minute", | |
| "type": "stat" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Share of failed jobs over the last five minutes.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "decimals": 1, | |
| "mappings": [], | |
| "max": 100, | |
| "min": 0, | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "orange", | |
| "value": 1 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 5 | |
| } | |
| ] | |
| }, | |
| "unit": "percent" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 4, | |
| "w": 4, | |
| "x": 20, | |
| "y": 0 | |
| }, | |
| "id": 6, | |
| "options": { | |
| "colorMode": "background", | |
| "graphMode": "none", | |
| "justifyMode": "center", | |
| "orientation": "auto", | |
| "percentChangeColorMode": "standard", | |
| "reduceOptions": { | |
| "calcs": [ | |
| "lastNotNull" | |
| ], | |
| "fields": "", | |
| "values": false | |
| }, | |
| "showPercentChange": false, | |
| "textMode": "auto", | |
| "wideLayout": true | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "100 * sum(increase(bullmq_jobs_failed_total{queue=~\"$queue\"}[5m])) / clamp_min(sum(increase(bullmq_jobs_completed_total{queue=~\"$queue\"}[5m])) + sum(increase(bullmq_jobs_failed_total{queue=~\"$queue\"}[5m])), 1)", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "A" | |
| } | |
| ], | |
| "title": "5m Failure Rate", | |
| "type": "stat" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Backlog state composition over time for the selected queues.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 18, | |
| "gradientMode": "opacity", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "smooth", | |
| "lineWidth": 2, | |
| "pointSize": 4, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "never", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "normal" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| } | |
| ] | |
| }, | |
| "unit": "none" | |
| }, | |
| "overrides": [ | |
| { | |
| "matcher": { | |
| "id": "byName", | |
| "options": "active" | |
| }, | |
| "properties": [ | |
| { | |
| "id": "color", | |
| "value": { | |
| "fixedColor": "blue", | |
| "mode": "fixed" | |
| } | |
| } | |
| ] | |
| }, | |
| { | |
| "matcher": { | |
| "id": "byName", | |
| "options": "delayed" | |
| }, | |
| "properties": [ | |
| { | |
| "id": "color", | |
| "value": { | |
| "fixedColor": "orange", | |
| "mode": "fixed" | |
| } | |
| } | |
| ] | |
| }, | |
| { | |
| "matcher": { | |
| "id": "byName", | |
| "options": "prioritized" | |
| }, | |
| "properties": [ | |
| { | |
| "id": "color", | |
| "value": { | |
| "fixedColor": "yellow", | |
| "mode": "fixed" | |
| } | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 8, | |
| "x": 0, | |
| "y": 4 | |
| }, | |
| "id": 7, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "table", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "multi", | |
| "sort": "desc" | |
| } | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum by (state) (bullmq_job_count{queue=~\"$queue\",state=~\"waiting|active|delayed|prioritized|waiting-children\"})", | |
| "legendFormat": "{{state}}", | |
| "range": true, | |
| "refId": "A" | |
| } | |
| ], | |
| "title": "Backlog By State", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Completed and failed jobs per minute, derived from BullMQ history.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "jobs/min", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 12, | |
| "gradientMode": "opacity", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "smooth", | |
| "lineWidth": 2, | |
| "pointSize": 4, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "never", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| } | |
| ] | |
| }, | |
| "unit": "none" | |
| }, | |
| "overrides": [ | |
| { | |
| "matcher": { | |
| "id": "byName", | |
| "options": "Completed" | |
| }, | |
| "properties": [ | |
| { | |
| "id": "color", | |
| "value": { | |
| "fixedColor": "green", | |
| "mode": "fixed" | |
| } | |
| } | |
| ] | |
| }, | |
| { | |
| "matcher": { | |
| "id": "byName", | |
| "options": "Failed" | |
| }, | |
| "properties": [ | |
| { | |
| "id": "color", | |
| "value": { | |
| "fixedColor": "red", | |
| "mode": "fixed" | |
| } | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 8, | |
| "x": 8, | |
| "y": 4 | |
| }, | |
| "id": 8, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "list", | |
| "placement": "bottom", | |
| "showLegend": true | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "multi", | |
| "sort": "desc" | |
| } | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum(rate(bullmq_jobs_completed_total{queue=~\"$queue\"}[5m])) * 60", | |
| "legendFormat": "Completed", | |
| "range": true, | |
| "refId": "A" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum(rate(bullmq_jobs_failed_total{queue=~\"$queue\"}[5m])) * 60", | |
| "legendFormat": "Failed", | |
| "range": true, | |
| "refId": "B" | |
| } | |
| ], | |
| "title": "Throughput", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Failure share over time for the selected queues.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "fixedColor": "red", | |
| "mode": "fixed" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "failure %", | |
| "axisPlacement": "auto", | |
| "barAlignment": 0, | |
| "barWidthFactor": 0.6, | |
| "drawStyle": "line", | |
| "fillOpacity": 10, | |
| "gradientMode": "opacity", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "insertNulls": false, | |
| "lineInterpolation": "smooth", | |
| "lineWidth": 2, | |
| "pointSize": 4, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "showPoints": "never", | |
| "showValues": false, | |
| "spanNulls": false, | |
| "stacking": { | |
| "group": "A", | |
| "mode": "none" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "line" | |
| } | |
| }, | |
| "decimals": 1, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| }, | |
| { | |
| "color": "orange", | |
| "value": 1 | |
| }, | |
| { | |
| "color": "red", | |
| "value": 5 | |
| } | |
| ] | |
| }, | |
| "unit": "percent" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 8, | |
| "x": 16, | |
| "y": 4 | |
| }, | |
| "id": 9, | |
| "options": { | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "hidden", | |
| "placement": "bottom", | |
| "showLegend": false | |
| }, | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "100 * sum(rate(bullmq_jobs_failed_total{queue=~\"$queue\"}[5m])) / clamp_min(sum(rate(bullmq_jobs_completed_total{queue=~\"$queue\"}[5m])) + sum(rate(bullmq_jobs_failed_total{queue=~\"$queue\"}[5m])), 0.000001)", | |
| "legendFormat": "Failure %", | |
| "range": true, | |
| "refId": "A" | |
| } | |
| ], | |
| "title": "Failure Ratio", | |
| "type": "timeseries" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Current distribution of queue states across the selection.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "palette-classic" | |
| }, | |
| "custom": { | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| } | |
| }, | |
| "mappings": [], | |
| "unit": "none" | |
| }, | |
| "overrides": [ | |
| { | |
| "matcher": { | |
| "id": "byName", | |
| "options": "active" | |
| }, | |
| "properties": [ | |
| { | |
| "id": "color", | |
| "value": { | |
| "fixedColor": "blue", | |
| "mode": "fixed" | |
| } | |
| } | |
| ] | |
| }, | |
| { | |
| "matcher": { | |
| "id": "byName", | |
| "options": "completed" | |
| }, | |
| "properties": [ | |
| { | |
| "id": "color", | |
| "value": { | |
| "fixedColor": "green", | |
| "mode": "fixed" | |
| } | |
| } | |
| ] | |
| }, | |
| { | |
| "matcher": { | |
| "id": "byName", | |
| "options": "delayed" | |
| }, | |
| "properties": [ | |
| { | |
| "id": "color", | |
| "value": { | |
| "fixedColor": "orange", | |
| "mode": "fixed" | |
| } | |
| } | |
| ] | |
| }, | |
| { | |
| "matcher": { | |
| "id": "byName", | |
| "options": "failed" | |
| }, | |
| "properties": [ | |
| { | |
| "id": "color", | |
| "value": { | |
| "fixedColor": "red", | |
| "mode": "fixed" | |
| } | |
| } | |
| ] | |
| }, | |
| { | |
| "matcher": { | |
| "id": "byName", | |
| "options": "paused" | |
| }, | |
| "properties": [ | |
| { | |
| "id": "color", | |
| "value": { | |
| "fixedColor": "#667085", | |
| "mode": "fixed" | |
| } | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 8, | |
| "x": 0, | |
| "y": 12 | |
| }, | |
| "id": 10, | |
| "options": { | |
| "displayLabels": [ | |
| "name", | |
| "value", | |
| "percent" | |
| ], | |
| "legend": { | |
| "displayMode": "list", | |
| "placement": "right", | |
| "showLegend": true, | |
| "values": [ | |
| "value", | |
| "percent" | |
| ] | |
| }, | |
| "pieType": "donut", | |
| "reduceOptions": { | |
| "calcs": [ | |
| "lastNotNull" | |
| ], | |
| "fields": "", | |
| "values": false | |
| }, | |
| "sort": "desc", | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| } | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum by (state) (bullmq_job_count{queue=~\"$queue\"})", | |
| "instant": true, | |
| "legendFormat": "{{state}}", | |
| "range": false, | |
| "refId": "A" | |
| } | |
| ], | |
| "title": "Current State Mix", | |
| "type": "piechart" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Queues with the largest current backlog.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "fixedColor": "blue", | |
| "mode": "fixed" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "fillOpacity": 80, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "lineWidth": 1, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "blue", | |
| "value": 0 | |
| } | |
| ] | |
| }, | |
| "unit": "none" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 8, | |
| "x": 8, | |
| "y": 12 | |
| }, | |
| "id": 11, | |
| "options": { | |
| "barRadius": 0.2, | |
| "barWidth": 0.9, | |
| "fullHighlight": false, | |
| "groupWidth": 0.7, | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "hidden", | |
| "placement": "bottom", | |
| "showLegend": false | |
| }, | |
| "orientation": "horizontal", | |
| "showValue": "always", | |
| "stacking": "none", | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| }, | |
| "xField": "queue", | |
| "xTickLabelRotation": 0, | |
| "xTickLabelSpacing": 0 | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "topk(10, sum by (queue) (bullmq_job_count{queue=~\"$queue\",state=~\"waiting|active|delayed|prioritized|waiting-children\"}))", | |
| "format": "table", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "A" | |
| } | |
| ], | |
| "title": "Top Queues By Backlog", | |
| "transformations": [ | |
| { | |
| "id": "organize", | |
| "options": { | |
| "excludeByName": { | |
| "Time": true | |
| }, | |
| "renameByName": { | |
| "Value": "Backlog" | |
| } | |
| } | |
| } | |
| ], | |
| "type": "barchart" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Queues with the most failed jobs still present.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "fixedColor": "red", | |
| "mode": "fixed" | |
| }, | |
| "custom": { | |
| "axisBorderShow": false, | |
| "axisCenteredZero": false, | |
| "axisColorMode": "text", | |
| "axisLabel": "", | |
| "axisPlacement": "auto", | |
| "fillOpacity": 80, | |
| "gradientMode": "none", | |
| "hideFrom": { | |
| "legend": false, | |
| "tooltip": false, | |
| "viz": false | |
| }, | |
| "lineWidth": 1, | |
| "scaleDistribution": { | |
| "type": "linear" | |
| }, | |
| "thresholdsStyle": { | |
| "mode": "off" | |
| } | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "red", | |
| "value": 0 | |
| } | |
| ] | |
| }, | |
| "unit": "none" | |
| }, | |
| "overrides": [] | |
| }, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 8, | |
| "x": 16, | |
| "y": 12 | |
| }, | |
| "id": 12, | |
| "options": { | |
| "barRadius": 0.2, | |
| "barWidth": 0.9, | |
| "fullHighlight": false, | |
| "groupWidth": 0.7, | |
| "legend": { | |
| "calcs": [], | |
| "displayMode": "hidden", | |
| "placement": "bottom", | |
| "showLegend": false | |
| }, | |
| "orientation": "horizontal", | |
| "showValue": "always", | |
| "stacking": "none", | |
| "tooltip": { | |
| "hideZeros": false, | |
| "mode": "single", | |
| "sort": "none" | |
| }, | |
| "xField": "queue", | |
| "xTickLabelRotation": 0, | |
| "xTickLabelSpacing": 0 | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "topk(10, sum by (queue) (bullmq_job_count{queue=~\"$queue\",state=\"failed\"}))", | |
| "format": "table", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "A" | |
| } | |
| ], | |
| "title": "Top Queues By Failed Jobs", | |
| "transformations": [ | |
| { | |
| "id": "organize", | |
| "options": { | |
| "excludeByName": { | |
| "Time": true | |
| }, | |
| "renameByName": { | |
| "Value": "Failed" | |
| } | |
| } | |
| } | |
| ], | |
| "type": "barchart" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "description": "Per-queue queue depth and one-hour throughput summary.", | |
| "fieldConfig": { | |
| "defaults": { | |
| "color": { | |
| "mode": "thresholds" | |
| }, | |
| "custom": { | |
| "align": "auto", | |
| "cellOptions": { | |
| "type": "auto" | |
| }, | |
| "footer": { | |
| "reducers": [] | |
| }, | |
| "inspect": false | |
| }, | |
| "mappings": [], | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "green", | |
| "value": 0 | |
| } | |
| ] | |
| }, | |
| "unit": "none" | |
| }, | |
| "overrides": [ | |
| { | |
| "matcher": { | |
| "id": "byName", | |
| "options": "Failure %" | |
| }, | |
| "properties": [ | |
| { | |
| "id": "unit", | |
| "value": "percent" | |
| }, | |
| { | |
| "id": "decimals", | |
| "value": 1 | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| "gridPos": { | |
| "h": 10, | |
| "w": 24, | |
| "x": 0, | |
| "y": 20 | |
| }, | |
| "id": 13, | |
| "options": { | |
| "cellHeight": "sm", | |
| "showHeader": true, | |
| "sortBy": [ | |
| { | |
| "desc": true, | |
| "displayName": "Failed" | |
| } | |
| ] | |
| }, | |
| "pluginVersion": "12.4.1", | |
| "targets": [ | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum by (queue) (bullmq_job_count{queue=~\"$queue\",state=\"waiting\"})", | |
| "format": "table", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "A" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum by (queue) (bullmq_job_count{queue=~\"$queue\",state=\"active\"})", | |
| "format": "table", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "B" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum by (queue) (bullmq_job_count{queue=~\"$queue\",state=~\"delayed|prioritized\"})", | |
| "format": "table", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "C" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum by (queue) (bullmq_job_count{queue=~\"$queue\",state=\"failed\"})", | |
| "format": "table", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "D" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum by (queue) (increase(bullmq_jobs_completed_total{queue=~\"$queue\"}[1h]))", | |
| "format": "table", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "E" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "sum by (queue) (increase(bullmq_jobs_failed_total{queue=~\"$queue\"}[1h]))", | |
| "format": "table", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "F" | |
| }, | |
| { | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "editorMode": "code", | |
| "expr": "100 * sum by (queue) (increase(bullmq_jobs_failed_total{queue=~\"$queue\"}[1h])) / clamp_min(sum by (queue) (increase(bullmq_jobs_completed_total{queue=~\"$queue\"}[1h])) + sum by (queue) (increase(bullmq_jobs_failed_total{queue=~\"$queue\"}[1h])), 1)", | |
| "format": "table", | |
| "instant": true, | |
| "legendFormat": "", | |
| "range": false, | |
| "refId": "G" | |
| } | |
| ], | |
| "title": "Queue Detail", | |
| "transformations": [ | |
| { | |
| "id": "joinByField", | |
| "options": { | |
| "byField": "queue", | |
| "mode": "outer" | |
| } | |
| }, | |
| { | |
| "id": "organize", | |
| "options": { | |
| "excludeByName": { | |
| "Time": true, | |
| "Time 1": true, | |
| "Time 2": true, | |
| "Time 3": true, | |
| "Time 4": true, | |
| "Time 5": true, | |
| "Time 6": true | |
| }, | |
| "indexByName": { | |
| "Value #A": 1, | |
| "Value #B": 2, | |
| "Value #C": 3, | |
| "Value #D": 4, | |
| "Value #E": 5, | |
| "Value #F": 6, | |
| "Value #G": 7, | |
| "queue": 0 | |
| }, | |
| "renameByName": { | |
| "Value #A": "Waiting", | |
| "Value #B": "Active", | |
| "Value #C": "Delayed", | |
| "Value #D": "Failed", | |
| "Value #E": "Completed 1h", | |
| "Value #F": "Failed 1h", | |
| "Value #G": "Failure %", | |
| "queue": "Queue" | |
| } | |
| } | |
| } | |
| ], | |
| "type": "table" | |
| } | |
| ], | |
| "preload": false, | |
| "refresh": "30s", | |
| "schemaVersion": 42, | |
| "tags": [ | |
| "bullmq", | |
| "prometheus", | |
| "grafana" | |
| ], | |
| "templating": { | |
| "list": [ | |
| { | |
| "allValue": ".+", | |
| "current": { | |
| "selected": true, | |
| "text": "All", | |
| "value": "$__all" | |
| }, | |
| "datasource": { | |
| "type": "prometheus", | |
| "uid": "${DS_PROMETHEUS}" | |
| }, | |
| "definition": "label_values(bullmq_job_count, queue)", | |
| "includeAll": true, | |
| "label": "Queue", | |
| "multi": true, | |
| "name": "queue", | |
| "options": [], | |
| "query": { | |
| "query": "label_values(bullmq_job_count, queue)", | |
| "refId": "PrometheusVariableQueryEditor-VariableQuery" | |
| }, | |
| "refresh": 1, | |
| "regex": "", | |
| "regexApplyTo": "value", | |
| "sort": 1, | |
| "type": "query" | |
| } | |
| ] | |
| }, | |
| "time": { | |
| "from": "now-24h", | |
| "to": "now" | |
| }, | |
| "timepicker": {}, | |
| "timezone": "browser", | |
| "title": "BullMQ Overview", | |
| "uid": null, | |
| "version": 1, | |
| "weekStart": "" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment