From 0031ce9b68c84f956377fcb7a4abc2ab3c28a98d Mon Sep 17 00:00:00 2001 From: nickAS21 Date: Fri, 30 Sep 2022 12:27:23 +0300 Subject: [PATCH 1/4] integration monitoring: add json dashboard --- .../dashboards/integration_statistics.json | 1222 +++++++++++++++++ .../dashboards/integration_statistics.json | 1222 +++++++++++++++++ .../dashboards/integration_statistics.json | 1222 +++++++++++++++++ 3 files changed, 3666 insertions(+) create mode 100644 advanced/monitoring/grafana/provisioning/dashboards/integration_statistics.json create mode 100644 basic/monitoring/grafana/provisioning/dashboards/integration_statistics.json create mode 100644 monolith/monitoring/grafana/provisioning/dashboards/integration_statistics.json diff --git a/advanced/monitoring/grafana/provisioning/dashboards/integration_statistics.json b/advanced/monitoring/grafana/provisioning/dashboards/integration_statistics.json new file mode 100644 index 0000000..4f73347 --- /dev/null +++ b/advanced/monitoring/grafana/provisioning/dashboards/integration_statistics.json @@ -0,0 +1,1222 @@ +{ + "annotations": { + "list": [ + { + "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" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 72, + "links": [], + "liveNow": false, + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 134, + "title": "Integration Common information", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 4, + "w": 23, + "x": 0, + "y": 1 + }, + "hiddenSeries": false, + "id": 111, + "interval": "30s", + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 5, + "points": false, + "renderer": "int", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(integration_stats_gauge{name=\"start\"})", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Integration start All", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:850", + "format": "count", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:851", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"msgUplink\", state=\"success\", type=\"AZURE_IOT_HUB\"}" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 5 + }, + "id": 126, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "last", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success min", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success max", + "range": true, + "refId": "B" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$B - $A", + "hide": false, + "refId": "C", + "type": "math" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed min", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed max", + "range": true, + "refId": "E" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$E - $D", + "hide": false, + "refId": "F", + "type": "math" + } + ], + "timeRegions": [], + "title": "Uplink msg (interval 30s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 11 + }, + "id": 135, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "last", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success min", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success max", + "range": true, + "refId": "B" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$B - $A", + "hide": false, + "refId": "C", + "type": "math" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed min", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed max", + "range": true, + "refId": "E" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$E - $D", + "hide": false, + "refId": "F", + "type": "math" + } + ], + "timeRegions": [], + "title": "Downlink msg (interval 30s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 131, + "title": "Integration started by state", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 23, + "x": 0, + "y": 18 + }, + "hiddenSeries": false, + "id": 129, + "interval": "30s", + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 5, + "points": false, + "renderer": "int", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "integration_stats_gauge{name=\"start\", state=\"success\"}", + "hide": false, + "legendFormat": "{{type}}", + "range": true, + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Integration state by type by success", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:850", + "format": "none", + "label": "Count", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:851", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 23 + }, + "hiddenSeries": false, + "id": 128, + "interval": "30s", + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 5, + "points": false, + "renderer": "int", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": false, + "expr": "integration_stats_gauge{name=\"start\",state=\"failed\"}", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Integration state by type by failed", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:850", + "format": "count", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:851", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 125, + "panels": [], + "title": "Uplink", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 23, + "x": 0, + "y": 30 + }, + "id": 132, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "delta" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "sum by(type) (floor(delta(integration_stats_counter_total{name=\"msgUplink\"}[$__interval])))", + "interval": "", + "legendFormat": "{{type}} All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "floor(delta(integration_stats_counter_total{name=\"msgUplink\"}[$__interval]))", + "hide": false, + "interval": "", + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "B" + } + ], + "timeRegions": [], + "title": "Uplink Integration by type by all/success/failed", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 123, + "panels": [], + "title": "Downlink", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 35 + }, + "id": 127, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "delta" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "sum by(type) (floor(delta(integration_stats_counter_total{name=\"msgDownlink\"}[$__interval])))", + "interval": "", + "legendFormat": "{{type}} All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "floor(delta(integration_stats_counter_total{name=\"msgDownlink\"}[$__interval]))", + "hide": false, + "interval": "", + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "B" + } + ], + "timeRegions": [], + "title": "Downlink Integration by type by all/success/failed ", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "id": 114, + "panels": [], + "title": "Integration started by process", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "series", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "opacity" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "cnt" + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"start\", state=\"success\", type=\"AWS_KINESIS\"}", + "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"start\", state=\"success\", type=\"AWS_SQS\"}" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 28, + "w": 24, + "x": 0, + "y": 42 + }, + "id": 121, + "interval": "15s", + "options": { + "legend": { + "calcs": [ + "last", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "min_over_time(integration_stats_counter_total{name=\"start\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} min success", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"start\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success", + "range": true, + "refId": "B" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$B - $A", + "hide": false, + "legendFormat": "{{type}} false 1", + "refId": "C", + "type": "math" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"start\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} false min", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"start\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} false max", + "range": true, + "refId": "E" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$E - $D", + "hide": false, + "refId": "F", + "type": "math" + } + ], + "timeRegions": [], + "title": "Integration start process by type by all/success/failed", + "tooltip": { + "shared": true, + "sort": 1, + "value_type": "individual" + }, + "type": "timeseries" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "Thingsboard Integration (statistics)", + "uid": "ZFSul8UM3", + "version": 21, + "weekStart": "" +} \ No newline at end of file diff --git a/basic/monitoring/grafana/provisioning/dashboards/integration_statistics.json b/basic/monitoring/grafana/provisioning/dashboards/integration_statistics.json new file mode 100644 index 0000000..4f73347 --- /dev/null +++ b/basic/monitoring/grafana/provisioning/dashboards/integration_statistics.json @@ -0,0 +1,1222 @@ +{ + "annotations": { + "list": [ + { + "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" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 72, + "links": [], + "liveNow": false, + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 134, + "title": "Integration Common information", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 4, + "w": 23, + "x": 0, + "y": 1 + }, + "hiddenSeries": false, + "id": 111, + "interval": "30s", + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 5, + "points": false, + "renderer": "int", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(integration_stats_gauge{name=\"start\"})", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Integration start All", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:850", + "format": "count", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:851", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"msgUplink\", state=\"success\", type=\"AZURE_IOT_HUB\"}" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 5 + }, + "id": 126, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "last", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success min", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success max", + "range": true, + "refId": "B" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$B - $A", + "hide": false, + "refId": "C", + "type": "math" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed min", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed max", + "range": true, + "refId": "E" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$E - $D", + "hide": false, + "refId": "F", + "type": "math" + } + ], + "timeRegions": [], + "title": "Uplink msg (interval 30s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 11 + }, + "id": 135, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "last", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success min", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success max", + "range": true, + "refId": "B" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$B - $A", + "hide": false, + "refId": "C", + "type": "math" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed min", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed max", + "range": true, + "refId": "E" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$E - $D", + "hide": false, + "refId": "F", + "type": "math" + } + ], + "timeRegions": [], + "title": "Downlink msg (interval 30s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 131, + "title": "Integration started by state", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 23, + "x": 0, + "y": 18 + }, + "hiddenSeries": false, + "id": 129, + "interval": "30s", + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 5, + "points": false, + "renderer": "int", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "integration_stats_gauge{name=\"start\", state=\"success\"}", + "hide": false, + "legendFormat": "{{type}}", + "range": true, + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Integration state by type by success", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:850", + "format": "none", + "label": "Count", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:851", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 23 + }, + "hiddenSeries": false, + "id": 128, + "interval": "30s", + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 5, + "points": false, + "renderer": "int", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": false, + "expr": "integration_stats_gauge{name=\"start\",state=\"failed\"}", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Integration state by type by failed", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:850", + "format": "count", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:851", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 125, + "panels": [], + "title": "Uplink", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 23, + "x": 0, + "y": 30 + }, + "id": 132, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "delta" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "sum by(type) (floor(delta(integration_stats_counter_total{name=\"msgUplink\"}[$__interval])))", + "interval": "", + "legendFormat": "{{type}} All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "floor(delta(integration_stats_counter_total{name=\"msgUplink\"}[$__interval]))", + "hide": false, + "interval": "", + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "B" + } + ], + "timeRegions": [], + "title": "Uplink Integration by type by all/success/failed", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 123, + "panels": [], + "title": "Downlink", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 35 + }, + "id": 127, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "delta" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "sum by(type) (floor(delta(integration_stats_counter_total{name=\"msgDownlink\"}[$__interval])))", + "interval": "", + "legendFormat": "{{type}} All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "floor(delta(integration_stats_counter_total{name=\"msgDownlink\"}[$__interval]))", + "hide": false, + "interval": "", + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "B" + } + ], + "timeRegions": [], + "title": "Downlink Integration by type by all/success/failed ", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "id": 114, + "panels": [], + "title": "Integration started by process", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "series", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "opacity" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "cnt" + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"start\", state=\"success\", type=\"AWS_KINESIS\"}", + "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"start\", state=\"success\", type=\"AWS_SQS\"}" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 28, + "w": 24, + "x": 0, + "y": 42 + }, + "id": 121, + "interval": "15s", + "options": { + "legend": { + "calcs": [ + "last", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "min_over_time(integration_stats_counter_total{name=\"start\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} min success", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"start\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success", + "range": true, + "refId": "B" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$B - $A", + "hide": false, + "legendFormat": "{{type}} false 1", + "refId": "C", + "type": "math" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"start\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} false min", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"start\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} false max", + "range": true, + "refId": "E" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$E - $D", + "hide": false, + "refId": "F", + "type": "math" + } + ], + "timeRegions": [], + "title": "Integration start process by type by all/success/failed", + "tooltip": { + "shared": true, + "sort": 1, + "value_type": "individual" + }, + "type": "timeseries" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "Thingsboard Integration (statistics)", + "uid": "ZFSul8UM3", + "version": 21, + "weekStart": "" +} \ No newline at end of file diff --git a/monolith/monitoring/grafana/provisioning/dashboards/integration_statistics.json b/monolith/monitoring/grafana/provisioning/dashboards/integration_statistics.json new file mode 100644 index 0000000..4f73347 --- /dev/null +++ b/monolith/monitoring/grafana/provisioning/dashboards/integration_statistics.json @@ -0,0 +1,1222 @@ +{ + "annotations": { + "list": [ + { + "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" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 72, + "links": [], + "liveNow": false, + "panels": [ + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 134, + "title": "Integration Common information", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 4, + "w": 23, + "x": 0, + "y": 1 + }, + "hiddenSeries": false, + "id": 111, + "interval": "30s", + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 5, + "points": false, + "renderer": "int", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(integration_stats_gauge{name=\"start\"})", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Integration start All", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:850", + "format": "count", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:851", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"msgUplink\", state=\"success\", type=\"AZURE_IOT_HUB\"}" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 5 + }, + "id": 126, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "last", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success min", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success max", + "range": true, + "refId": "B" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$B - $A", + "hide": false, + "refId": "C", + "type": "math" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed min", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed max", + "range": true, + "refId": "E" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$E - $D", + "hide": false, + "refId": "F", + "type": "math" + } + ], + "timeRegions": [], + "title": "Uplink msg (interval 30s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 11 + }, + "id": 135, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "last", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success min", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success max", + "range": true, + "refId": "B" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$B - $A", + "hide": false, + "refId": "C", + "type": "math" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed min", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} failed max", + "range": true, + "refId": "E" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$E - $D", + "hide": false, + "refId": "F", + "type": "math" + } + ], + "timeRegions": [], + "title": "Downlink msg (interval 30s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 131, + "title": "Integration started by state", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 23, + "x": 0, + "y": 18 + }, + "hiddenSeries": false, + "id": 129, + "interval": "30s", + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 5, + "points": false, + "renderer": "int", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "integration_stats_gauge{name=\"start\", state=\"success\"}", + "hide": false, + "legendFormat": "{{type}}", + "range": true, + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Integration state by type by success", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:850", + "format": "none", + "label": "Count", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:851", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 23 + }, + "hiddenSeries": false, + "id": 128, + "interval": "30s", + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.1.6", + "pointradius": 5, + "points": false, + "renderer": "int", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": false, + "expr": "integration_stats_gauge{name=\"start\",state=\"failed\"}", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Integration state by type by failed", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:850", + "format": "count", + "logBase": 1, + "min": "0", + "show": true + }, + { + "$$hashKey": "object:851", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 125, + "panels": [], + "title": "Uplink", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 23, + "x": 0, + "y": 30 + }, + "id": 132, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "delta" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "sum by(type) (floor(delta(integration_stats_counter_total{name=\"msgUplink\"}[$__interval])))", + "interval": "", + "legendFormat": "{{type}} All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "floor(delta(integration_stats_counter_total{name=\"msgUplink\"}[$__interval]))", + "hide": false, + "interval": "", + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "B" + } + ], + "timeRegions": [], + "title": "Uplink Integration by type by all/success/failed", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 123, + "panels": [], + "title": "Downlink", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 23, + "x": 0, + "y": 35 + }, + "id": 127, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "delta" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "sum by(type) (floor(delta(integration_stats_counter_total{name=\"msgDownlink\"}[$__interval])))", + "interval": "", + "legendFormat": "{{type}} All", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "floor(delta(integration_stats_counter_total{name=\"msgDownlink\"}[$__interval]))", + "hide": false, + "interval": "", + "legendFormat": "{{type}} {{state}}", + "range": true, + "refId": "B" + } + ], + "timeRegions": [], + "title": "Downlink Integration by type by all/success/failed ", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 41 + }, + "id": 114, + "panels": [], + "title": "Integration started by process", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "series", + "axisGridShow": true, + "axisLabel": "Count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 26, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "opacity" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "cnt" + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"start\", state=\"success\", type=\"AWS_KINESIS\"}", + "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"start\", state=\"success\", type=\"AWS_SQS\"}" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 28, + "w": 24, + "x": 0, + "y": 42 + }, + "id": 121, + "interval": "15s", + "options": { + "legend": { + "calcs": [ + "last", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "min_over_time(integration_stats_counter_total{name=\"start\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} min success", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"start\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success", + "range": true, + "refId": "B" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$B - $A", + "hide": false, + "legendFormat": "{{type}} false 1", + "refId": "C", + "type": "math" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "min_over_time(integration_stats_counter_total{name=\"start\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} false min", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"start\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} false max", + "range": true, + "refId": "E" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "$E - $D", + "hide": false, + "refId": "F", + "type": "math" + } + ], + "timeRegions": [], + "title": "Integration start process by type by all/success/failed", + "tooltip": { + "shared": true, + "sort": 1, + "value_type": "individual" + }, + "type": "timeseries" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "Thingsboard Integration (statistics)", + "uid": "ZFSul8UM3", + "version": 21, + "weekStart": "" +} \ No newline at end of file From 88d707e0c2d1fad996485798741b2a957c0aa5d6 Mon Sep 17 00:00:00 2001 From: nickAS21 Date: Fri, 30 Sep 2022 13:10:16 +0300 Subject: [PATCH 2/4] integration monitoring: add port prometheus --- monolith/docker-compose.prometheus-grafana.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monolith/docker-compose.prometheus-grafana.yml b/monolith/docker-compose.prometheus-grafana.yml index 41fd6aa..3d52bb1 100644 --- a/monolith/docker-compose.prometheus-grafana.yml +++ b/monolith/docker-compose.prometheus-grafana.yml @@ -45,7 +45,7 @@ services: command: - '--config.file=/etc/prometheus/prometheus.yml' ports: - - 9090 # PE does not expose this port to avoid port binding conflict with load balancer exposed port + - 9090:9090 # PE does not expose this port to avoid port binding conflict with load balancer exposed port restart: always grafana: image: grafana/grafana From 088baf3f50a658607c82f04d704a8a4329069fa3 Mon Sep 17 00:00:00 2001 From: nickAS21 Date: Tue, 4 Oct 2022 12:46:31 +0300 Subject: [PATCH 3/4] integration monitoring: add targets: ['172.17.0.1 --- monolith/docker-compose.prometheus-grafana.yml | 3 +-- monolith/monitoring/prometheus/prometheus.yml | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/monolith/docker-compose.prometheus-grafana.yml b/monolith/docker-compose.prometheus-grafana.yml index 3d52bb1..c9c0adf 100644 --- a/monolith/docker-compose.prometheus-grafana.yml +++ b/monolith/docker-compose.prometheus-grafana.yml @@ -42,8 +42,7 @@ services: volumes: - ./monitoring/prometheus/:/etc/prometheus/ - prometheus_data:/prometheus - command: - - '--config.file=/etc/prometheus/prometheus.yml' + command: --config.file=/etc/prometheus/prometheus.yml ports: - 9090:9090 # PE does not expose this port to avoid port binding conflict with load balancer exposed port restart: always diff --git a/monolith/monitoring/prometheus/prometheus.yml b/monolith/monitoring/prometheus/prometheus.yml index d153904..1c80e8a 100644 --- a/monolith/monitoring/prometheus/prometheus.yml +++ b/monolith/monitoring/prometheus/prometheus.yml @@ -50,8 +50,10 @@ scrape_configs: scrape_interval: 5s static_configs: - targets: ['localhost:9090'] +# - targets: ['172.17.0.1:9090'] - job_name: 'tb-monolith' metrics_path: /actuator/prometheus static_configs: - targets: [ 'tb-monolith:8080' ] +# - targets: [ '172.17.0.1:8080' ] From 6a2c747cc0cf7b6e817eaddd5cfe667d6cd9c640 Mon Sep 17 00:00:00 2001 From: nickAS21 Date: Tue, 4 Oct 2022 15:41:10 +0300 Subject: [PATCH 4/4] integration monitoring: change dashboard json --- .../dashboards/integration_statistics.json | 225 ++++-------------- 1 file changed, 42 insertions(+), 183 deletions(-) diff --git a/monolith/monitoring/grafana/provisioning/dashboards/integration_statistics.json b/monolith/monitoring/grafana/provisioning/dashboards/integration_statistics.json index 4f73347..da79aaa 100644 --- a/monolith/monitoring/grafana/provisioning/dashboards/integration_statistics.json +++ b/monolith/monitoring/grafana/provisioning/dashboards/integration_statistics.json @@ -8,12 +8,6 @@ "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, "type": "dashboard" } ] @@ -21,7 +15,6 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 72, "links": [], "liveNow": false, "panels": [ @@ -41,10 +34,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "fill": 1, "fillGradient": 0, "gridPos": { @@ -83,10 +73,7 @@ "steppedLine": false, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "code", "exemplar": false, "expr": "sum(integration_stats_gauge{name=\"start\"})", @@ -132,10 +119,7 @@ } }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "fieldConfig": { "defaults": { "color": { @@ -192,32 +176,7 @@ }, "unit": "none" }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"msgUplink\", state=\"success\", type=\"AZURE_IOT_HUB\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] + "overrides": [] }, "gridPos": { "h": 6, @@ -245,10 +204,7 @@ }, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "expr": "min_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"success\"}[$__interval])", "hide": true, @@ -257,10 +213,7 @@ "refId": "A" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "expr": "max_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"success\"}[$__interval])", "hide": true, @@ -280,10 +233,7 @@ "type": "math" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "expr": "min_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"failed\"}[$__interval])", "hide": true, @@ -292,10 +242,7 @@ "refId": "D" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "expr": "max_over_time(integration_stats_counter_total{name=\"msgUplink\", state=\"failed\"}[$__interval])", "hide": true, @@ -325,10 +272,7 @@ "type": "timeseries" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "fieldConfig": { "defaults": { "color": { @@ -413,10 +357,7 @@ }, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "expr": "min_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"success\"}[$__interval])", "hide": true, @@ -425,10 +366,7 @@ "refId": "A" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "expr": "max_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"success\"}[$__interval])", "hide": true, @@ -448,10 +386,7 @@ "type": "math" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "expr": "min_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"failed\"}[$__interval])", "hide": true, @@ -460,10 +395,7 @@ "refId": "D" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "expr": "max_over_time(integration_stats_counter_total{name=\"msgDownlink\", state=\"failed\"}[$__interval])", "hide": true, @@ -508,10 +440,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "fieldConfig": { "defaults": { "unit": "none" @@ -557,10 +486,7 @@ "steppedLine": false, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "expr": "integration_stats_gauge{name=\"start\", state=\"success\"}", "hide": false, @@ -608,10 +534,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "fill": 1, "fillGradient": 0, "gridPos": { @@ -650,10 +573,7 @@ "steppedLine": false, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "code", "exemplar": false, "expr": "integration_stats_gauge{name=\"start\",state=\"failed\"}", @@ -712,10 +632,7 @@ "type": "row" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "fieldConfig": { "defaults": { "color": { @@ -761,8 +678,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -798,10 +714,7 @@ }, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "exemplar": true, "expr": "sum by(type) (floor(delta(integration_stats_counter_total{name=\"msgUplink\"}[$__interval])))", @@ -811,10 +724,7 @@ "refId": "A" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "exemplar": true, "expr": "floor(delta(integration_stats_counter_total{name=\"msgUplink\"}[$__interval]))", @@ -848,10 +758,7 @@ "type": "row" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "fieldConfig": { "defaults": { "color": { @@ -897,8 +804,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -934,10 +840,7 @@ }, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "exemplar": true, "expr": "sum by(type) (floor(delta(integration_stats_counter_total{name=\"msgDownlink\"}[$__interval])))", @@ -947,10 +850,7 @@ "refId": "A" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "exemplar": true, "expr": "floor(delta(integration_stats_counter_total{name=\"msgDownlink\"}[$__interval]))", @@ -984,10 +884,7 @@ "type": "row" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "fieldConfig": { "defaults": { "color": { @@ -1020,6 +917,7 @@ "showPoints": "auto", "spanNulls": true, "stacking": { + "group": "A", "mode": "normal" }, "thresholdsStyle": { @@ -1042,42 +940,16 @@ }, "unit": "cnt" }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"start\", state=\"success\", type=\"AWS_KINESIS\"}", - "C {instance=\"172.17.0.1:8080\", job=\"spring-actuator\", name=\"start\", state=\"success\", type=\"AWS_SQS\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] + "overrides": [] }, "gridPos": { - "h": 28, - "w": 24, + "h": 11, + "w": 23, "x": 0, "y": 42 }, "id": 121, - "interval": "15s", + "interval": "30s", "options": { "legend": { "calcs": [ @@ -1096,26 +968,20 @@ }, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "code", "expr": "min_over_time(integration_stats_counter_total{name=\"start\", state=\"success\"}[$__interval])", "hide": true, - "legendFormat": "{{type}} min success", + "legendFormat": "{{type}} success min", "range": true, "refId": "A" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, + "datasource": null, "editorMode": "builder", "expr": "max_over_time(integration_stats_counter_total{name=\"start\", state=\"success\"}[$__interval])", "hide": true, - "legendFormat": "{{type}} success", + "legendFormat": "{{type}} success max", "range": true, "refId": "B" }, @@ -1127,31 +993,24 @@ }, "expression": "$B - $A", "hide": false, - "legendFormat": "{{type}} false 1", "refId": "C", "type": "math" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", + "datasource": null, + "editorMode": "code", "expr": "min_over_time(integration_stats_counter_total{name=\"start\", state=\"failed\"}[$__interval])", "hide": true, - "legendFormat": "{{type}} false min", + "legendFormat": "__auto", "range": true, "refId": "D" }, { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", + "datasource": null, + "editorMode": "code", "expr": "max_over_time(integration_stats_counter_total{name=\"start\", state=\"failed\"}[$__interval])", "hide": true, - "legendFormat": "{{type}} false max", + "legendFormat": "__auto", "range": true, "refId": "E" }, @@ -1217,6 +1076,6 @@ "timezone": "browser", "title": "Thingsboard Integration (statistics)", "uid": "ZFSul8UM3", - "version": 21, + "version": 2, "weekStart": "" } \ No newline at end of file