From 416676c9f9a8a5b57265b897da2417c06a166423 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Wed, 16 Nov 2022 08:35:01 -0800 Subject: [PATCH] Update minitor dashboard --- .../dashboards/default/minitor-monitor.json | 457 +++++++++--------- 1 file changed, 220 insertions(+), 237 deletions(-) diff --git a/core/metrics/grafana/provisioning/dashboards/default/minitor-monitor.json b/core/metrics/grafana/provisioning/dashboards/default/minitor-monitor.json index edc3025..576db94 100644 --- a/core/metrics/grafana/provisioning/dashboards/default/minitor-monitor.json +++ b/core/metrics/grafana/provisioning/dashboards/default/minitor-monitor.json @@ -3,36 +3,72 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, "type": "dashboard" } ] }, "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "links": [], + "liveNow": false, "panels": [ { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#d44a3a", - "rgba(237, 129, 40, 0.89)", - "#299c46" - ], - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true + "datasource": { + "type": "prometheus", + "uid": "rS2OIfv4z" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "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 + }, + { + "color": "#299c46", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] }, "gridPos": { "h": 7, @@ -41,43 +77,29 @@ "y": 0 }, "id": 2, - "interval": null, "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "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": true + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" }, - "tableColumn": "", + "pluginVersion": "9.2.4", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "rS2OIfv4z" + }, "expr": "count(minitor_monitor_up_count)", "format": "time_series", "instant": true, @@ -85,37 +107,51 @@ "refId": "A" } ], - "thresholds": "0,1", "title": "Total Monitors", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" + "type": "stat" }, { - "cacheTimeout": null, - "colorBackground": true, - "colorPrefix": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "decimals": 0, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true + "datasource": { + "type": "prometheus", + "uid": "rS2OIfv4z" + }, + "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": 1 + }, + { + "color": "#d44a3a", + "value": 2 + } + ] + }, + "unit": "none" + }, + "overrides": [] }, "gridPos": { "h": 7, @@ -124,43 +160,29 @@ "y": 0 }, "id": 6, - "interval": null, "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "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": true + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" }, - "tableColumn": "", + "pluginVersion": "9.2.4", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "rS2OIfv4z" + }, "expr": "count(minitor_monitor_up_count)-count(minitor_monitor_up_count>=1)", "format": "time_series", "instant": false, @@ -168,61 +190,60 @@ "refId": "A" } ], - "thresholds": "1,2,3", - "timeFrom": null, "title": "Total Down Services", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" + "type": "stat" }, { - "alert": { - "conditions": [ - { - "evaluator": { - "params": [ - 1 - ], - "type": "lt" - }, - "operator": { - "type": "and" - }, - "query": { - "params": [ - "A", - "5m", - "now" - ] - }, - "reducer": { - "params": [], - "type": "last" - }, - "type": "query" - } - ], - "executionErrorState": "alerting", - "for": "0m", - "frequency": "60s", - "handler": 1, - "name": "Service Status alert", - "noDataState": "no_data", - "notifications": [] + "datasource": { + "type": "prometheus", + "uid": "rS2OIfv4z" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 0, + "spanNulls": 900000 + }, + "mappings": [ + { + "options": { + "0": { + "index": 1, + "text": "Down" + }, + "1": { + "index": 0, + "text": "Up" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "bool_on_off" + }, + "overrides": [] }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 0, - "fill": 1, "gridPos": { "h": 7, "w": 14, @@ -230,90 +251,49 @@ "y": 0 }, "id": 4, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, "links": [], - "nullPointMode": "null", - "options": {}, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "options": { + "alignValue": "left", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "never", + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.2.4", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "rS2OIfv4z" + }, + "editorMode": "code", + "exemplar": false, "expr": "sum(minitor_monitor_up_count) by (monitor)", "format": "time_series", + "instant": false, "intervalFactor": 1, "legendFormat": "{{monitor}}", + "range": true, "refId": "A" } ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 1 - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Service Status", - "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": "state-timeline" }, { "columns": [], + "datasource": { + "type": "prometheus", + "uid": "rS2OIfv4z" + }, "fontSize": "100%", "gridPos": { "h": 11, @@ -323,8 +303,6 @@ }, "id": 8, "links": [], - "options": {}, - "pageSize": null, "scroll": true, "showHeader": true, "sort": { @@ -334,12 +312,14 @@ "styles": [ { "alias": "Time", + "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "Time", "type": "date" }, { "alias": "Status", + "align": "auto", "colorMode": "cell", "colors": [ "#F2495C", @@ -370,6 +350,10 @@ ], "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "rS2OIfv4z" + }, "expr": "minitor_monitor_up_count", "format": "time_series", "instant": true, @@ -378,15 +362,13 @@ "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "Monitor status", "transform": "timeseries_to_rows", - "type": "table" + "type": "table-old" } ], "refresh": "30s", - "schemaVersion": 18, + "schemaVersion": 37, "style": "dark", "tags": [], "templating": { @@ -424,5 +406,6 @@ "timezone": "", "title": "Minitor Monitor", "uid": "qoE5Hrxiz", - "version": 3 + "version": 1, + "weekStart": "" }