{ "__inputs": [ { "name": "DS_PROMETHEUS", "label": "Prometheus", "description": "", "type": "datasource", "pluginId": "prometheus", "pluginName": "Prometheus" }, { "name": "VAR_QUEUE", "type": "constant", "label": "Queue", "value": "guassp", "description": "" } ], "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "8.1.2" }, { "type": "panel", "id": "graph", "name": "Graph (old)", "version": "" }, { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" }, { "type": "panel", "id": "stat", "name": "Stat", "version": "" }, { "type": "panel", "id": "table", "name": "Table", "version": "" } ], "annotations": { "list": [ { "$$hashKey": "object:13", "builtIn": 1, "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "description": "Dashboard for GitLab to SonarQube permissions sync based on Python RQ", "editable": true, "gnetId": null, "graphTooltip": 0, "id": null, "iteration": 1651873796122, "links": [], "panels": [ { "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { "fixedColor": "rgb(31, 120, 193)", "mode": "fixed" }, "mappings": [ { "options": { "match": "null", "result": { "text": "0" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 5, "w": 3, "x": 0, "y": 0 }, "id": 2, "interval": null, "links": [], "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.1.2", "targets": [ { "expr": "count(rq_workers{job=\"$job\", instance=\"$instance\"}) or vector(0)", "format": "time_series", "instant": false, "interval": "", "intervalFactor": 1, "legendFormat": "Workers", "refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "Workers count", "type": "stat" }, { "aliasColors": { "Busy workers": "dark-blue", "Idle workers": "rgb(215, 247, 212)" }, "bars": true, "dashLength": 10, "dashes": false, "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "links": [] }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 5, "w": 15, "x": 3, "y": 0 }, "hiddenSeries": false, "id": 4, "interval": "", "legend": { "alignAsTable": false, "avg": false, "current": true, "hideEmpty": false, "hideZero": false, "max": false, "min": false, "rightSide": false, "show": true, "total": false, "values": true }, "lines": false, "linewidth": 1, "nullPointMode": "null as zero", "options": { "alertThreshold": true }, "percentage": true, "pluginVersion": "8.1.2", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [ { "$$hashKey": "object:464", "alias": "Idle workers", "yaxis": 1 } ], "spaceLength": 10, "stack": true, "steppedLine": false, "targets": [ { "expr": "(count(rq_workers{state=\"busy\", job=\"$job\", instance=\"$instance\"}) / count(rq_workers{job=\"$job\", instance=\"$instance\"})) * 100", "instant": false, "interval": "", "legendFormat": "Busy workers", "refId": "A" }, { "expr": "(count(rq_workers{state=\"idle\", job=\"$job\", instance=\"$instance\"}) / count(rq_workers{job=\"$job\", instance=\"$instance\"})) * 100", "instant": false, "interval": "", "legendFormat": "Idle workers", "refId": "B" } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Workers capacity", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:471", "decimals": null, "format": "percent", "label": "", "logBase": 1, "max": "100", "min": "0", "show": true }, { "$$hashKey": "object:472", "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } }, { "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", "description": "The average time the exporter took to query the Redis instance for the RQ workers and jobs data.", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [ { "options": { "match": "null", "result": { "color": "#299c46", "text": "0" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 0.5 }, { "color": "#d44a3a", "value": 1 } ] }, "unit": "s" }, "overrides": [] }, "gridPos": { "h": 5, "w": 6, "x": 18, "y": 0 }, "id": 29, "interval": null, "links": [], "maxDataPoints": 100, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.1.2", "targets": [ { "expr": "rate(rq_request_processing_seconds_sum{job=\"$job\", instance=\"$instance\"}[$__range]) /rate(rq_request_processing_seconds_count{job=\"$job\", instance=\"$instance\"}[$__range])", "format": "time_series", "instant": false, "interval": "", "intervalFactor": 1, "legendFormat": "", "refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "Avg. data collection duration", "type": "stat" }, { "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "left", "displayMode": "gradient-gauge", "filterable": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Time" }, "properties": [ { "id": "displayName", "value": "Time" }, { "id": "unit", "value": "dateTimeFromNow" }, { "id": "custom.displayMode", "value": "auto" } ] }, { "matcher": { "id": "byName", "options": "queue" }, "properties": [ { "id": "displayName", "value": "Queue Name" }, { "id": "custom.displayMode", "value": "json-view" } ] }, { "matcher": { "id": "byName", "options": "Value #B" }, "properties": [ { "id": "displayName", "value": "Queued" }, { "id": "unit", "value": "short" } ] }, { "matcher": { "id": "byName", "options": "Value #C" }, "properties": [ { "id": "displayName", "value": "Started" }, { "id": "unit", "value": "short" } ] }, { "matcher": { "id": "byName", "options": "Value #D" }, "properties": [ { "id": "displayName", "value": "Finished" }, { "id": "unit", "value": "short" }, { "id": "color", "value": { "fixedColor": "light-blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Value #E" }, "properties": [ { "id": "displayName", "value": "Failed" }, { "id": "unit", "value": "short" } ] }, { "matcher": { "id": "byName", "options": "Value #F" }, "properties": [ { "id": "displayName", "value": "Deferred" }, { "id": "unit", "value": "short" } ] }, { "matcher": { "id": "byName", "options": "Value #G" }, "properties": [ { "id": "displayName", "value": "Scheduled" }, { "id": "unit", "value": "short" } ] } ] }, "gridPos": { "h": 3, "w": 24, "x": 0, "y": 5 }, "id": 6, "options": { "showHeader": true }, "pluginVersion": "8.1.2", "repeat": "instance", "repeatDirection": "h", "targets": [ { "expr": "sum(rq_jobs{status=\"queued\", job=\"$job\", instance=\"$instance\"}) by (queue)", "format": "table", "instant": true, "interval": "", "legendFormat": "", "refId": "B" }, { "expr": "sum(rq_jobs{status=\"started\", job=\"$job\", instance=\"$instance\"}) by (queue)", "format": "table", "instant": true, "interval": "", "legendFormat": "", "refId": "C" }, { "expr": "sum(rq_jobs{status=\"finished\", job=\"$job\", instance=\"$instance\"}) by (queue)", "format": "table", "instant": true, "interval": "", "legendFormat": "", "refId": "D" }, { "expr": "sum(rq_jobs{status=\"failed\", job=\"$job\", instance=\"$instance\"}) by (queue)", "format": "table", "instant": true, "interval": "", "legendFormat": "", "refId": "E" }, { "expr": "sum(rq_jobs{status=\"deferred\", job=\"$job\", instance=\"$instance\"}) by (queue)", "format": "table", "instant": true, "interval": "", "legendFormat": "", "refId": "F" }, { "expr": "sum(rq_jobs{status=\"scheduled\", job=\"$job\", instance=\"$instance\"}) by (queue)", "format": "table", "instant": true, "interval": "", "legendFormat": "", "refId": "G" } ], "timeFrom": null, "timeShift": null, "title": "Current jobs overview", "transformations": [ { "id": "merge", "options": { "reducers": [] } } ], "type": "table" }, { "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", "description": "This percentage reflects the number of jobs currently queued, an optimal value is a value near or equal to 0% which means the jobs are being picked up by the workers without delays.\n\nA high percentage of queued jobs means that you need to add more workers as the current workers are not able to process all the jobs in a timely manner.", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "decimals": 0, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 0.05 }, { "color": "#d44a3a", "value": 0.1 } ] }, "unit": "percentunit" }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 0, "y": 32 }, "id": 8, "interval": null, "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.1.2", "targets": [ { "expr": "sum(rq_jobs{status=\"queued\", job=\"$job\", instance=\"$instance\", queue=~\"$queue\"}) / sum(rq_jobs{job=\"$job\", instance=\"$instance\"})", "instant": false, "interval": "", "legendFormat": "", "refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "Queued", "type": "stat" }, { "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", "description": "", "fieldConfig": { "defaults": { "color": { "fixedColor": "rgb(31, 120, 193)", "mode": "fixed" }, "decimals": 0, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "percentunit" }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 4, "y": 32 }, "id": 9, "interval": null, "links": [], "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.1.2", "targets": [ { "expr": "sum(rq_jobs{status=\"started\", job=\"$job\", instance=\"$instance\", queue=~\"$queue\"}) / sum(rq_jobs{job=\"$job\", instance=\"$instance\"})", "instant": false, "interval": "", "legendFormat": "", "refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "Started", "type": "stat" }, { "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "decimals": 0, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#d44a3a", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 0.6 }, { "color": "#299c46", "value": 0.8 } ] }, "unit": "percentunit" }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 8, "y": 32 }, "id": 10, "interval": null, "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.1.2", "targets": [ { "expr": "sum(rq_jobs{status=\"finished\", job=\"$job\", instance=\"$instance\", queue=~\"$queue\"}) / sum(rq_jobs{job=\"$job\", instance=\"$instance\"})", "instant": false, "interval": "", "legendFormat": "", "refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "Finished", "type": "stat" }, { "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", "description": "The percentage of failed jobs will always be higher if you are using the default failure TTL which is 1 year and you don't re-queue the jobs.\n\nIf you don't intend to re-queue the jobs you should set a lower failure TTL.", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "decimals": 0, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 0.05 }, { "color": "#d44a3a", "value": 0.2 } ] }, "unit": "percentunit" }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 12, "y": 32 }, "id": 11, "interval": null, "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.1.2", "targets": [ { "expr": "sum(rq_jobs{status=\"failed\", job=\"$job\", instance=\"$instance\", queue=~\"$queue\"}) / sum(rq_jobs{job=\"$job\", instance=\"$instance\"})", "instant": false, "interval": "", "legendFormat": "", "refId": "A" }, { "expr": "", "interval": "", "legendFormat": "", "refId": "B" } ], "timeFrom": null, "timeShift": null, "title": "Failed", "type": "stat" }, { "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { "fixedColor": "rgb(31, 120, 193)", "mode": "fixed" }, "decimals": 0, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "percentunit" }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 16, "y": 32 }, "id": 12, "interval": null, "links": [], "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.1.2", "targets": [ { "expr": "sum(rq_jobs{status=\"deferred\", job=\"$job\", instance=\"$instance\", queue=~\"$queue\"}) / sum(rq_jobs{job=\"$job\", instance=\"$instance\"})", "instant": false, "interval": "", "legendFormat": "", "refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "Deferred", "type": "stat" }, { "cacheTimeout": null, "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { "fixedColor": "rgb(31, 120, 193)", "mode": "fixed" }, "decimals": 0, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "percentunit" }, "overrides": [] }, "gridPos": { "h": 6, "w": 4, "x": 20, "y": 32 }, "id": 13, "interval": null, "links": [], "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.1.2", "targets": [ { "expr": "sum(rq_jobs{status=\"scheduled\", job=\"$job\", instance=\"$instance\", queue=~\"$queue\"}) / sum(rq_jobs{job=\"$job\", instance=\"$instance\"})", "instant": false, "interval": "", "legendFormat": "", "refId": "A" } ], "timeFrom": null, "timeShift": null, "title": "Scheduled", "type": "stat" }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": "${DS_PROMETHEUS}", "decimals": 0, "description": "", "fieldConfig": { "defaults": { "links": [] }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 38 }, "hiddenSeries": false, "id": 18, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": true, "max": true, "min": true, "rightSide": true, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null as zero", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.1.2", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "expr": "sum by (status) (rq_jobs{job=\"$job\", instance=\"$instance\", queue=~\"$queue\"}) / ignoring(status) group_left sum(rq_jobs{job=\"$job\", instance=\"$instance\"})", "format": "time_series", "instant": false, "interval": "", "legendFormat": "{{status}}", "refId": "A" } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Percentage of jobs by status", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:556", "format": "percentunit", "label": "", "logBase": 1, "max": "1", "min": null, "show": true }, { "$$hashKey": "object:557", "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}", "fieldConfig": { "defaults": { "links": [] }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 12, "y": 38 }, "hiddenSeries": false, "id": 17, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": true, "max": true, "min": false, "rightSide": true, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "nullPointMode": "null as zero", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.1.2", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "expr": "sum(rq_jobs{job=\"$job\", instance=\"$instance\", queue=~\"$queue\"}) by (status)", "format": "time_series", "instant": false, "interval": "", "legendFormat": "{{status}}", "refId": "A" } ], "thresholds": [], "timeFrom": null, "timeRegions": [], "timeShift": null, "title": "Number of jobs by status", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "buckets": null, "mode": "time", "name": null, "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:643", "format": "none", "label": null, "logBase": 1, "max": null, "min": null, "show": true }, { "$$hashKey": "object:644", "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ], "yaxis": { "align": false, "alignLevel": null } } ], "refresh": "", "schemaVersion": 30, "style": "dark", "tags": [ "sonarqube", "gitlab", "guassp" ], "templating": { "list": [ { "current": { "selected": true, "text": "Prometheus", "value": "Prometheus" }, "description": null, "error": null, "hide": 0, "includeAll": false, "label": "Datasource", "multi": false, "name": "DS_PROMETHEUS", "options": [], "query": "prometheus", "queryValue": "", "refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "description": null, "error": null, "hide": 2, "label": "Queue", "name": "queue", "query": "${VAR_QUEUE}", "skipUrlSync": false, "type": "constant", "current": { "value": "${VAR_QUEUE}", "text": "${VAR_QUEUE}", "selected": false }, "options": [ { "value": "${VAR_QUEUE}", "text": "${VAR_QUEUE}", "selected": false } ] }, { "allValue": null, "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "label_values({__name__=\"rq_jobs\",queue=\"$queue\"}, job)", "description": null, "error": null, "hide": 0, "includeAll": false, "label": "Job", "multi": false, "name": "job", "options": [], "query": { "query": "label_values({__name__=\"rq_jobs\",queue=\"$queue\"}, job)", "refId": "StandardVariableQuery" }, "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tagsQuery": "", "type": "query", "useTags": false }, { "allValue": null, "current": {}, "datasource": "${DS_PROMETHEUS}", "definition": "label_values({__name__=\"rq_jobs\",queue=\"$queue\"}, instance)", "description": null, "error": null, "hide": 0, "includeAll": false, "label": "Instance", "multi": false, "name": "instance", "options": [], "query": { "query": "label_values({__name__=\"rq_jobs\",queue=\"$queue\"}, instance)", "refId": "StandardVariableQuery" }, "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tagsQuery": "", "type": "query", "useTags": false } ] }, "time": { "from": "now-15m", "to": "now" }, "timepicker": { "refresh_intervals": [ "3s", "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ] }, "timezone": "browser", "title": "GitLab to SonarQube permissions (Guassp)", "uid": "guassp", "version": 2 }