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/docker-compose.prometheus-grafana.yml b/monolith/docker-compose.prometheus-grafana.yml index 41fd6aa..c9c0adf 100644 --- a/monolith/docker-compose.prometheus-grafana.yml +++ b/monolith/docker-compose.prometheus-grafana.yml @@ -42,10 +42,9 @@ 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 # 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 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..da79aaa --- /dev/null +++ b/monolith/monitoring/grafana/provisioning/dashboards/integration_statistics.json @@ -0,0 +1,1081 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "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": null, + "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": null, + "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": null, + "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": 5 + }, + "id": 126, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "last", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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" + }, + { + "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": null, + "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": null, + "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": null, + "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" + }, + { + "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": null, + "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": null, + "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": null, + "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": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "opacity" + } + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "cnt" + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 23, + "x": 0, + "y": 42 + }, + "id": 121, + "interval": "30s", + "options": { + "legend": { + "calcs": [ + "last", + "min", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": null, + "editorMode": "code", + "expr": "min_over_time(integration_stats_counter_total{name=\"start\", state=\"success\"}[$__interval])", + "hide": true, + "legendFormat": "{{type}} success min", + "range": true, + "refId": "A" + }, + { + "datasource": null, + "editorMode": "builder", + "expr": "max_over_time(integration_stats_counter_total{name=\"start\", 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": null, + "editorMode": "code", + "expr": "min_over_time(integration_stats_counter_total{name=\"start\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "__auto", + "range": true, + "refId": "D" + }, + { + "datasource": null, + "editorMode": "code", + "expr": "max_over_time(integration_stats_counter_total{name=\"start\", state=\"failed\"}[$__interval])", + "hide": true, + "legendFormat": "__auto", + "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": 2, + "weekStart": "" +} \ No newline at end of file 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' ]