diff --git a/monitors/grafana/dashboard.yaml b/monitors/grafana/dashboard.yaml index 45cad71..c3b614a 100644 --- a/monitors/grafana/dashboard.yaml +++ b/monitors/grafana/dashboard.yaml @@ -11,3 +11,13 @@ providers: options: path: /var/lib/grafana/dashboards/go_metrics.json foldersFromFilesStructure: false + - name: 'mongo-streamer' + orgId: 1 + folder: 'Default' + type: file + disableDeletion: false + updateIntervalSeconds: 10 + allowUiUpdates: false + options: + path: /var/lib/grafana/dashboards/mongo_streamer.json + foldersFromFilesStructure: false diff --git a/monitors/grafana/dashboards/mongo_streamer.json b/monitors/grafana/dashboards/mongo_streamer.json new file mode 100644 index 0000000..f29e5db --- /dev/null +++ b/monitors/grafana/dashboards/mongo_streamer.json @@ -0,0 +1,444 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 3, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 12, + "panels": [], + "title": "mongo-streamer", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "c78cbf47-fe39-4f95-a21a-7d82a3350059" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "c78cbf47-fe39-4f95-a21a-7d82a3350059" + }, + "editorMode": "code", + "expr": "mongo_streamer_mongodb_change_stream_received_total", + "instant": false, + "interval": "", + "legendFormat": "{{instance}} | {{database}}.{{collection}}", + "range": true, + "refId": "A" + } + ], + "title": "ChangeStream Received Total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "c78cbf47-fe39-4f95-a21a-7d82a3350059" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "c78cbf47-fe39-4f95-a21a-7d82a3350059" + }, + "editorMode": "code", + "expr": "mongo_streamer_mongodb_change_stream_handle_event_success_total", + "instant": false, + "legendFormat": "{{instance}} | {{database}}.{{collection}}", + "range": true, + "refId": "A" + } + ], + "title": "ChangeStream event handled success total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "c78cbf47-fe39-4f95-a21a-7d82a3350059" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "c78cbf47-fe39-4f95-a21a-7d82a3350059" + }, + "editorMode": "code", + "expr": "mongo_streamer_mongodb_change_stream_handle_event_failed_total", + "instant": false, + "legendFormat": "{{instance}} | {{database}}.{{collection}}", + "range": true, + "refId": "A" + } + ], + "title": "ChangeStream event handled failed total", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "c78cbf47-fe39-4f95-a21a-7d82a3350059" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "c78cbf47-fe39-4f95-a21a-7d82a3350059" + }, + "editorMode": "code", + "expr": "mongo_streamer_mongodb_change_stream_received_bytes_total", + "instant": false, + "legendFormat": "{{instance}} | {{database}}.{{collection}}", + "range": true, + "refId": "A" + } + ], + "title": "ChangeStream Received Bytes Total", + "type": "timeseries" + } + ], + "refresh": "5s", + "schemaVersion": 38, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "mongo-streamer", + "uid": "d657a9f9-8b8d-4bdd-85b3-7fb711e02118", + "version": 4, + "weekStart": "" +}