diff --git a/contrib/grafana/dashboard.json b/contrib/grafana/dashboard.json index ac2fa0c..c60bc67 100644 --- a/contrib/grafana/dashboard.json +++ b/contrib/grafana/dashboard.json @@ -20,29 +20,42 @@ "panels": [ { "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], "datasource": null, "description": "Days left until everyone 18+ Is fully vaccinated", "fieldConfig": { "defaults": { - "custom": {} + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 80 + }, + { + "color": "red", + "value": 100 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 6, "w": 5, @@ -52,58 +65,105 @@ "id": 8, "interval": null, "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/^{instance=\"127.0.0.1:8080\", job=\"ontvacstat\"}$/", + "values": false + }, + "textMode": "auto" }, - "tableColumn": "{instance=\"127.0.0.1:8080\", job=\"ontvacstat\"}", + "pluginVersion": "7.3.4", "targets": [ { - "expr": "(ontvacstat_eligible_population - ontvacstat_total_doses_administered) / ontvacstat_previous_day_doses_administered\n", + "expr": "(ontvacstat_eligible_population - ontvacstat_total_doses_administered) / avg_over_time(ontvacstat_previous_day_doses_administered[3d])", "format": "time_series", + "interval": "", "intervalFactor": 1, + "legendFormat": "", "refId": "A" } ], - "thresholds": "", "title": "~ Days Left", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": null, + "description": "Current rate of vaccination", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "N/A", + "type": 1, + "value": "null" + } + ], + "nullValueMode": "connected", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 5, + "x": 5, + "y": 0 + }, + "id": 9, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/^{instance=\"127.0.0.1:8080\", job=\"ontvacstat\"}$/", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "7.3.4", + "targets": [ { - "op": "=", - "text": "N/A", - "value": "null" + "expr": " rate(ontvacstat_previous_day_doses_administered[1d])", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" } ], - "valueName": "avg" + "title": "Daily Rate of Vaccination", + "type": "gauge" }, { "aliasColors": {}, @@ -122,7 +182,7 @@ "gridPos": { "h": 6, "w": 8, - "x": 5, + "x": 10, "y": 0 }, "hiddenSeries": false, @@ -141,7 +201,7 @@ "links": [], "nullPointMode": "null", "options": { - "alertThreshold": true + "alertThreshold": false }, "percentage": false, "pluginVersion": "7.3.4", @@ -156,7 +216,9 @@ { "expr": "ontvacstat_previous_day_doses_administered", "format": "time_series", + "interval": "", "intervalFactor": 1, + "legendFormat": "Previous Day Doses Administered", "refId": "A" } ], @@ -164,7 +226,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Previous Day Doses Administered", + "title": "Doses Administered/day", "tooltip": { "shared": true, "sort": 0, @@ -202,106 +264,67 @@ } }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, "datasource": null, "fieldConfig": { "defaults": { - "custom": {} + "custom": {}, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, - "w": 13, + "w": 18, "x": 0, "y": 6 }, - "hiddenSeries": false, "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "displayMode": "basic", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true }, - "percentage": false, "pluginVersion": "7.3.4", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "ontvacstat_total_doses_administered", + "expr": "ontvacstat_total_doses_administered / (ontvacstat_eligible_population - ontvacstat_total_doses_in_fully_vaccinated_individuals) * 100", "format": "time_series", + "interval": "", "intervalFactor": 1, + "legendFormat": "% Partially Vaccinated", "refId": "A" }, { - "expr": "ontvacstat_total_doses_in_fully_vaccinated_individuals", + "expr": "ontvacstat_total_doses_in_fully_vaccinated_individuals / ontvacstat_eligible_population * 100", "format": "time_series", + "interval": "", "intervalFactor": 1, + "legendFormat": "% Fully Vaccinated", "refId": "B" } ], - "thresholds": [], "timeFrom": null, - "timeRegions": [], "timeShift": null, "title": "Total Vaccinations & Fully Vaccinated", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "bargauge" } ], "schemaVersion": 26, @@ -337,5 +360,5 @@ "timezone": "", "title": "Ontario Vaccination Stats", "uid": "vhnVv3lMk", - "version": 4 + "version": 8 } \ No newline at end of file