From b0a3a01cbec27ebf117bee9ea4579ae6ec56bbf9 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa <jelle@archlinux.org> Date: Sun, 20 Feb 2022 14:43:00 +0100 Subject: [PATCH] Update AUR dashboard with http requests --- roles/grafana/files/dashboards/aur.json | 246 ++++++++++++++++++++---- 1 file changed, 204 insertions(+), 42 deletions(-) diff --git a/roles/grafana/files/dashboards/aur.json b/roles/grafana/files/dashboards/aur.json index c473345f2..fac45789f 100644 --- a/roles/grafana/files/dashboards/aur.json +++ b/roles/grafana/files/dashboards/aur.json @@ -8,35 +8,219 @@ "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, "type": "dashboard" } ] }, "description": "The AUR package and user statistics", "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 41, "links": [], + "liveNow": false, "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "rate(http_requests_total[5m])", + "interval": "", + "legendFormat": "{{ path }} {{ status }}", + "refId": "A" + } + ], + "title": "HTTP Requests total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 14, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "rate(http_api_requests_total{job=\"aurweb\"}[5m])", + "interval": "", + "legendFormat": "{{ type }} {{ status }}", + "refId": "A" + } + ], + "title": "HTTP API Requests Total", + "type": "timeseries" + }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", - "description": "The two different user types, normal and trusted users.", - "fieldConfig": { - "defaults": {}, - "overrides": [] + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" }, + "description": "The two different user types, normal and trusted users.", "fill": 1, "fillGradient": 0, "gridPos": { "h": 9, "w": 24, "x": 0, - "y": 0 + "y": 14 }, "hiddenSeries": false, "id": 4, @@ -56,7 +240,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.5", + "pluginVersion": "8.5.0-pre", "pointradius": 2, "points": false, "renderer": "flot", @@ -75,9 +259,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Users", "tooltip": { "shared": true, @@ -86,9 +268,7 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -96,25 +276,18 @@ { "$$hashKey": "object:140", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true }, { "$$hashKey": "object:141", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -122,19 +295,18 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", - "description": "The total AUR packages state listing orphan ,ever updated and updated packages.", - "fieldConfig": { - "defaults": {}, - "overrides": [] + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" }, + "description": "The total AUR packages state listing orphan ,ever updated and updated packages.", "fill": 1, "fillGradient": 0, "gridPos": { "h": 11, "w": 24, "x": 0, - "y": 9 + "y": 23 }, "hiddenSeries": false, "id": 2, @@ -154,7 +326,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "7.5.5", + "pluginVersion": "8.5.0-pre", "pointradius": 2, "points": false, "renderer": "flot", @@ -173,9 +345,7 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Packages", "tooltip": { "shared": true, @@ -184,9 +354,7 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -194,30 +362,23 @@ { "$$hashKey": "object:58", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true }, { "$$hashKey": "object:59", "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], "refresh": false, - "schemaVersion": 27, + "schemaVersion": 35, "style": "dark", "tags": [], "templating": { @@ -231,5 +392,6 @@ "timezone": "", "title": "AUR Statistics", "uid": "gmvZGXjGk", - "version": 1 + "version": 1, + "weekStart": "" } \ No newline at end of file -- GitLab