From 001d61ef66dd04d394b3f8530d4609d134af03ef Mon Sep 17 00:00:00 2001 From: Simon Volpert Date: Tue, 12 May 2020 10:11:06 +0000 Subject: [PATCH] error-dashboard --- dashboards/errors.json | 209 ++++++++++++++++++++++++++++++++++++ datasources/datasources.yml | 4 + 2 files changed, 213 insertions(+) create mode 100644 dashboards/errors.json diff --git a/dashboards/errors.json b/dashboards/errors.json new file mode 100644 index 0000000..a53ce3f --- /dev/null +++ b/dashboards/errors.json @@ -0,0 +1,209 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 7, + "iteration": 1589277518678, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Loki", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 22, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "sort": "total", + "sortDesc": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(count_over_time({job=\"bbb\", errorCode=~\"$errorCode\", host=~\"$host\"}[$__interval])) by (errorCode, host)", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Error Code Distribution", + "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 + } + } + ], + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "text": "1004 + 1006 + 1007 + 1008 + 1108 + CONNECTION_ERROR", + "value": [ + "1004", + "1006", + "1007", + "1008", + "1108", + "CONNECTION_ERROR" + ] + }, + "datasource": "Loki", + "definition": "label_values(errorCode)", + "hide": 0, + "includeAll": true, + "index": -1, + "label": null, + "multi": true, + "name": "errorCode", + "options": [], + "query": "label_values(errorCode)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": "Loki", + "definition": "label_values(host)", + "hide": 0, + "includeAll": true, + "index": -1, + "label": null, + "multi": true, + "name": "host", + "options": [], + "query": "label_values(host)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Errors", + "uid": "WIXcj4RGk", + "variables": { + "list": [] + }, + "version": 2 +} diff --git a/datasources/datasources.yml b/datasources/datasources.yml index d96153a..75a2461 100644 --- a/datasources/datasources.yml +++ b/datasources/datasources.yml @@ -5,3 +5,7 @@ datasources: type: prometheus access: proxy url: http://prometheus:9090 + - name: Loki + type: loki + access: proxy + url: http://loki.feedback:3100 -- GitLab