From 8d1aa70c6ae4f46fd2e425d9eaf330e0285e5964 Mon Sep 17 00:00:00 2001 From: fabritsius Date: Tue, 28 Jun 2022 15:02:20 +0400 Subject: [PATCH 1/5] Add Grafana example to the docs --- docs/grafana/sample_dashboard.json | 1364 +++++++++++++++++++ docs/metrics-via-grafana.md | 73 + pkg/controller/atlasproject/integrations.go | 11 +- 3 files changed, 1443 insertions(+), 5 deletions(-) create mode 100644 docs/grafana/sample_dashboard.json create mode 100644 docs/metrics-via-grafana.md diff --git a/docs/grafana/sample_dashboard.json b/docs/grafana/sample_dashboard.json new file mode 100644 index 0000000000..c073910d80 --- /dev/null +++ b/docs/grafana/sample_dashboard.json @@ -0,0 +1,1364 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 5, + "iteration": 1650460419048, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 4, + "panels": [], + "type": "row" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 2, + "maxDataPoints": null, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^Last \\(not null\\)$/", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "7.5.2", + "targets": [ + { + "exemplar": true, + "expr": "mongodb_uptimeMillis", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Uptime (minutes)", + "transformations": [ + { + "id": "reduce", + "options": { + "includeTimeField": false, + "mode": "seriesToRows", + "reducers": [ + "lastNotNull" + ] + } + } + ], + "type": "stat" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 5, + "maxDataPoints": null, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "7.5.2", + "repeat": null, + "targets": [ + { + "exemplar": true, + "expr": "mongodb_connections_available", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Available", + "refId": "A" + }, + { + "exemplar": true, + "expr": "mongodb_connections_active", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Active", + "refId": "B" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Connections", + "transformations": [ + { + "id": "reduce", + "options": { + "includeTimeField": false, + "mode": "seriesToRows", + "reducers": [ + "lastNotNull" + ] + } + } + ], + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "unit": "bytes" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 1 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "maxDataPoints": null, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{pod=~\"$Cluster.*\", container=~\"mongodb.*\"})\n", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Working", + "refId": "A" + }, + { + "exemplar": true, + "expr": ":node_memory_MemAvailable_bytes:sum", + "hide": false, + "interval": "", + "legendFormat": "Available", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Mongo Pods Memory Usage in GB / Total Available on Cluster", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [ + { + "id": "reduce", + "options": { + "includeTimeField": false, + "mode": "seriesToRows", + "reducers": [] + } + } + ], + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 1 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "maxDataPoints": null, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(rate(container_cpu_usage_seconds_total{pod=~\"$Cluster.*\", image!~\"sha.*\", container=~\"mongo.*\"}[5m]))", + "hide": false, + "interval": "", + "legendFormat": "Usage", + "refId": "Used" + }, + { + "exemplar": true, + "expr": "cluster:node_cpu:sum_rate5m", + "hide": false, + "interval": "", + "legendFormat": "Available", + "refId": "Available" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Mongo Pods CPU Usage / Total Available on Cluster", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [ + { + "id": "reduce", + "options": { + "includeTimeField": false, + "mode": "seriesToRows", + "reducers": [] + } + } + ], + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 11, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "7.5.2", + "targets": [ + { + "exemplar": true, + "expr": "max(mongodb_catalogStats_collections{pod=~\"$Cluster.*\"})", + "instant": false, + "interval": "", + "legendFormat": "Collections", + "refId": "A" + }, + { + "exemplar": true, + "expr": "max(mongodb_catalogStats_capped{pod=~\"$Cluster.*\"})", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Capped Collections", + "refId": "B" + }, + { + "exemplar": true, + "expr": "max(mongodb_catalogStats_timeseries{pod=~\"$Cluster.*\"})", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Timeseries", + "refId": "C" + }, + { + "exemplar": true, + "expr": "max(mongodb_catalogStats_views{pod=~\"$Cluster.*\"})", + "hide": false, + "interval": "", + "legendFormat": "Views", + "refId": "D" + } + ], + "title": "Catalog Stats", + "type": "bargauge" + }, + { + "datasource": null, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 9, + "options": { + "graph": {}, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltipOptions": { + "mode": "single" + } + }, + "pluginVersion": "7.5.2", + "targets": [ + { + "exemplar": true, + "expr": "sum(mongodb_globalLock_activeClients_total{pod=~\"$Cluster.*\"})", + "interval": "", + "legendFormat": "Total", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(mongodb_globalLock_activeClients_readers{pod=~\"$Cluster.*\"})", + "hide": false, + "interval": "", + "legendFormat": "Readers", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(mongodb_globalLock_activeClients_writers{pod=~\"$Cluster.*\"})", + "hide": false, + "interval": "", + "legendFormat": "Writers", + "refId": "C" + } + ], + "title": "Global Locks", + "transformations": [], + "type": "timeseries" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "unit": "short" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 16 + }, + "hiddenSeries": false, + "id": 13, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "mongodb_metrics_cursor_open_total{pod=~\"$Cluster.*\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "{{pod}} Open", + "refId": "A" + }, + { + "exemplar": true, + "expr": "mongodb_metrics_cursor_open_noTimeout{pod=~\"$Cluster.*\"}", + "hide": false, + "interval": "", + "legendFormat": "{{pod}} Open No Timeout", + "refId": "B" + }, + { + "exemplar": true, + "expr": "mongodb_metrics_cursor_timed_out{pod=~\"$Cluster.*\"}", + "hide": false, + "interval": "", + "legendFormat": "{{pod}} Timed Out", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Cursors", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 16 + }, + "hiddenSeries": false, + "id": 15, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "mongodb_metrics_document_inserted{pod=~\"$Cluster.*\"}", + "interval": "", + "legendFormat": "{{pod}} Inserted", + "refId": "A" + }, + { + "exemplar": true, + "expr": "mongodb_metrics_document_returned{pod=~\"$Cluster.*\"}", + "hide": false, + "interval": "", + "legendFormat": "{{pod}} Returned", + "refId": "B" + }, + { + "exemplar": true, + "expr": "mongodb_metrics_document_deleted{pod=~\"$Cluster.*\"}", + "hide": false, + "interval": "", + "legendFormat": "{{pod}} Deleted", + "refId": "C" + }, + { + "exemplar": true, + "expr": "mongodb_metrics_document_updated{pod=~\"$Cluster.*\"}", + "hide": false, + "interval": "", + "legendFormat": "{{pod}} Updated", + "refId": "D" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Documents", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [], + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 27 + }, + "id": 17, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.2", + "targets": [ + { + "exemplar": true, + "expr": "sum(mongodb_metrics_repl_network_bytes{pod=~\"$Cluster.*\"})", + "instant": false, + "interval": "", + "legendFormat": "Total Usage", + "refId": "A" + } + ], + "title": "Replication Network Usage", + "transformations": [ + { + "id": "reduce", + "options": { + "reducers": [ + "lastNotNull" + ] + } + } + ], + "type": "stat" + }, + { + "datasource": null, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 27 + }, + "id": 19, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.2", + "targets": [ + { + "exemplar": true, + "expr": "sum(mongodb_metrics_repl_network_ops{pod=~\"$Cluster.*\"})", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Replication Operations", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "unit": "bytes" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 27 + }, + "hiddenSeries": false, + "id": 26, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "max(mongodb_network_bytesIn{pod=~\"$Cluster.*\"})", + "interval": "", + "legendFormat": "Bytes In", + "refId": "A" + }, + { + "exemplar": true, + "expr": "max(mongodb_network_bytesOut{pod=~\"$Cluster.*\"})", + "hide": false, + "interval": "", + "legendFormat": "Bytes Out", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network Usage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "unit": "µs" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 35 + }, + "hiddenSeries": false, + "id": 23, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "max(mongodb_opLatencies_reads_latency{pod=~\"$Cluster.*\"})", + "interval": "", + "legendFormat": "Reads", + "refId": "A" + }, + { + "exemplar": true, + "expr": "max(mongodb_opLatencies_commands_latency{pod=~\"$Cluster.*\"})", + "hide": false, + "interval": "", + "legendFormat": "Commands", + "refId": "C" + }, + { + "exemplar": true, + "expr": "max(mongodb_opLatencies_transactions_latency{pod=~\"$Cluster.*\"})", + "hide": false, + "interval": "", + "legendFormat": "Transactions", + "refId": "D" + }, + { + "exemplar": true, + "expr": "max(mongodb_opLatencies_writes_latency{pod=~\"$Cluster.*\"})", + "hide": false, + "interval": "", + "legendFormat": "Writes", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Latencies", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "µs", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "unit": "short" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 35 + }, + "hiddenSeries": false, + "id": 24, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.2", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "max(mongodb_opLatencies_reads_ops{pod=~\"$Cluster.*\"})", + "interval": "", + "legendFormat": "Reads", + "refId": "A" + }, + { + "exemplar": true, + "expr": "max(mongodb_opLatencies_commands_ops{pod=~\"$Cluster.*\"})", + "hide": false, + "interval": "", + "legendFormat": "Commands", + "refId": "C" + }, + { + "exemplar": true, + "expr": "max(mongodb_opLatencies_transactions_ops{pod=~\"$Cluster.*\"})", + "hide": false, + "interval": "", + "legendFormat": "Transactions", + "refId": "D" + }, + { + "exemplar": true, + "expr": "max(mongodb_opLatencies_writes_ops{pod=~\"$Cluster.*\"})", + "hide": false, + "interval": "", + "legendFormat": "Writes", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Ops", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "schemaVersion": 27, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": false, + "text": "replica-set-with-prom", + "value": "replica-set-with-prom" + }, + "datasource": null, + "definition": "label_values(mongodb_connections_available, cl_name)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "Cluster", + "options": [], + "query": { + "query": "label_values(mongodb_connections_available, cl_name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "MongoDB Dashboard Copy", + "uid": "_y8XBgynz", + "version": 22 +} diff --git a/docs/metrics-via-grafana.md b/docs/metrics-via-grafana.md new file mode 100644 index 0000000000..90377609f5 --- /dev/null +++ b/docs/metrics-via-grafana.md @@ -0,0 +1,73 @@ +# Setup Prometheus and Grafana + +## Steps + +### 1. Create `prometheus.yaml` config file + +This is an example: +``` +global: + scrape_interval: 15s + evaluation_interval: 15s + +scrape_configs: + - job_name: "Test Atlas Operator Project-mongo-metrics" + scrape_interval: 10s + metrics_path: /metrics + scheme : https + basic_auth: + username: user + password: {password} + http_sd_configs: + - url: https://cloud.mongodb.com/prometheus/v1.0/groups/{group-ID}/discovery + refresh_interval: 60s + basic_auth: + username: user + password: {password} +``` + +You can find the URL in atlasproject status via a command: +``` +kubectl get atlasproject -o json +``` +Look for `prometheusDiscoveryURL` field. + + +### 2. Run prometheus with you config + +Docker example: +``` +docker run \ + -p 9090:9090 \ + -v /path/to/local/prometheus.yaml:/etc/prometheus/prometheus.yml \ + prom/prometheus +``` + +Go to http://localhost:9090/ to check if it is working + +### 3. Run grafana + +Docker example: +``` +docker run --name grafana -p 3000:3000 grafana/grafana +``` + +Go to http://localhost:3000/. Default username/password is `admin`. + +For Docker Data Source `localhost` won't work and should be switched to `host.docker.internal`. + +### 4. Create a new Data Source + +- Go to Configuration > Data sources (aka http://localhost:3000/datasources) +- Add a new data source +- Set `Name` +- Set `URL` to you prometheus url (ex. http://host.docker.internal:9090/) +- Set `Basic auth` with credentials from you prometheus config +- Save & test + +### 5. Create a new Dashboard + +- Go to Dashboards (aka http://localhost:3000/dashboards) +- Import a new dashboard using [grafana example](./grafana/sample_dashboard.json) +- Set `Datasource` to the Data Source `Name` you've set in the previous step +- Metrics should appear diff --git a/pkg/controller/atlasproject/integrations.go b/pkg/controller/atlasproject/integrations.go index aef67384c9..968cd895e6 100644 --- a/pkg/controller/atlasproject/integrations.go +++ b/pkg/controller/atlasproject/integrations.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "net/http" + "net/url" "reflect" "go.mongodb.org/atlas/mongodbatlas" @@ -57,7 +58,7 @@ func (r *AtlasProjectReconciler) createOrDeleteIntegrations(ctx *workflow.Contex return result } - setPrometheusStatus(project, integrationsInAtlas) + setPrometheusStatus(ctx, project, integrationsInAtlas) if ready := r.checkIntegrationsReady(ctx, project.Namespace, integrationsToUpdate, project.Spec.Integrations); !ready { return workflow.InProgress(workflow.ProjectIntegrationReady, "in progress") } @@ -161,12 +162,12 @@ func toAliasThirdPartyIntegration(list []*mongodbatlas.ThirdPartyIntegration) [] return result } -func setPrometheusStatus(project *mdbv1.AtlasProject, atlasIntegrations *mongodbatlas.ThirdPartyIntegrations) { +func setPrometheusStatus(ctx *workflow.Context, project *mdbv1.AtlasProject, atlasIntegrations *mongodbatlas.ThirdPartyIntegrations) { for _, atlasIntegration := range atlasIntegrations.Results { if isPrometheusType(atlasIntegration.Type) { project.Status.Prometheus = status.Prometheus{ Scheme: atlasIntegration.Scheme, - DiscoveryURL: buildPrometheusDiscoveryURL(project.ID()), + DiscoveryURL: buildPrometheusDiscoveryURL(ctx.Client.BaseURL, project.ID()), } } } @@ -183,7 +184,7 @@ func isPrometheusType(typeName string) bool { return typeName == "PROMETHEUS" } -func buildPrometheusDiscoveryURL(projectID string) string { - api := "https://cloud.mongodb.com/api/atlas/v1.0" +func buildPrometheusDiscoveryURL(baseURL *url.URL, projectID string) string { + api := fmt.Sprintf("%s/prometheus/v1.0", baseURL.Host) return fmt.Sprintf("%s/groups/%s/discovery", api, projectID) } From a7dec74417493f63c1d5b5b939e57c92f7f9ba6a Mon Sep 17 00:00:00 2001 From: fabritsius Date: Wed, 29 Jun 2022 19:13:16 +0400 Subject: [PATCH 2/5] Fix status sync for Prometheus --- pkg/controller/atlasproject/integrations.go | 30 ++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/pkg/controller/atlasproject/integrations.go b/pkg/controller/atlasproject/integrations.go index 968cd895e6..e75af9eaf8 100644 --- a/pkg/controller/atlasproject/integrations.go +++ b/pkg/controller/atlasproject/integrations.go @@ -58,7 +58,7 @@ func (r *AtlasProjectReconciler) createOrDeleteIntegrations(ctx *workflow.Contex return result } - setPrometheusStatus(ctx, project, integrationsInAtlas) + syncPrometheusStatus(ctx, project, integrationsInAtlas) if ready := r.checkIntegrationsReady(ctx, project.Namespace, integrationsToUpdate, project.Spec.Integrations); !ready { return workflow.InProgress(workflow.ProjectIntegrationReady, "in progress") } @@ -162,15 +162,27 @@ func toAliasThirdPartyIntegration(list []*mongodbatlas.ThirdPartyIntegration) [] return result } -func setPrometheusStatus(ctx *workflow.Context, project *mdbv1.AtlasProject, atlasIntegrations *mongodbatlas.ThirdPartyIntegrations) { - for _, atlasIntegration := range atlasIntegrations.Results { - if isPrometheusType(atlasIntegration.Type) { - project.Status.Prometheus = status.Prometheus{ - Scheme: atlasIntegration.Scheme, - DiscoveryURL: buildPrometheusDiscoveryURL(ctx.Client.BaseURL, project.ID()), - } +func syncPrometheusStatus(ctx *workflow.Context, project *mdbv1.AtlasProject, atlasIntegrations *mongodbatlas.ThirdPartyIntegrations) { + prometheusIntegration, found := searchAtlasIntegration(atlasIntegrations.Results, isPrometheusType) + if !found { + project.Status.Prometheus = status.Prometheus{} + return + } + + project.Status.Prometheus = status.Prometheus{ + Scheme: prometheusIntegration.Scheme, + DiscoveryURL: buildPrometheusDiscoveryURL(ctx.Client.BaseURL, project.ID()), + } +} + +func searchAtlasIntegration(atlasIntegrations []*mongodbatlas.ThirdPartyIntegration, filterFunc func(typeName string) bool) (integration *mongodbatlas.ThirdPartyIntegration, found bool) { + for _, aIntegration := range atlasIntegrations { + if filterFunc(aIntegration.Type) { + return aIntegration, true } } + + return nil, false } func arePrometheusesEqual(atlas aliasThirdPartyIntegration, spec project.Integration) bool { @@ -185,6 +197,6 @@ func isPrometheusType(typeName string) bool { } func buildPrometheusDiscoveryURL(baseURL *url.URL, projectID string) string { - api := fmt.Sprintf("%s/prometheus/v1.0", baseURL.Host) + api := fmt.Sprintf("https://%s/prometheus/v1.0", baseURL.Host) return fmt.Sprintf("%s/groups/%s/discovery", api, projectID) } From 18bc06e1719c923538c7d74137b3740ed1bd3a5b Mon Sep 17 00:00:00 2001 From: fabritsius Date: Thu, 30 Jun 2022 12:20:55 +0400 Subject: [PATCH 3/5] fixup! Fix status sync for Prometheus --- pkg/api/v1/status/atlasproject.go | 8 ++++++- pkg/controller/atlasproject/integrations.go | 25 +++++++++++---------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/pkg/api/v1/status/atlasproject.go b/pkg/api/v1/status/atlasproject.go index ecc8bbc628..1e64578879 100644 --- a/pkg/api/v1/status/atlasproject.go +++ b/pkg/api/v1/status/atlasproject.go @@ -71,6 +71,12 @@ func AtlasProjectAuthModesOption(authModes []authmode.AuthMode) AtlasProjectStat } } +func AtlasProjectPrometheusOption(prometheus *Prometheus) AtlasProjectStatusOption { + return func(s *AtlasProjectStatus) { + s.Prometheus = prometheus + } +} + // AtlasProjectStatus defines the observed state of AtlasProject type AtlasProjectStatus struct { Common `json:",inline"` @@ -94,5 +100,5 @@ type AtlasProjectStatus struct { // Prometheus contains the status for Prometheus integration // including the prometheusDiscoveryURL // +optional - Prometheus Prometheus `json:"prometheus,omitempty"` + Prometheus *Prometheus `json:"prometheus,omitempty"` } diff --git a/pkg/controller/atlasproject/integrations.go b/pkg/controller/atlasproject/integrations.go index e75af9eaf8..ab8773b11b 100644 --- a/pkg/controller/atlasproject/integrations.go +++ b/pkg/controller/atlasproject/integrations.go @@ -58,7 +58,7 @@ func (r *AtlasProjectReconciler) createOrDeleteIntegrations(ctx *workflow.Contex return result } - syncPrometheusStatus(ctx, project, integrationsInAtlas) + syncPrometheusStatus(ctx, project, integrationsToUpdate) if ready := r.checkIntegrationsReady(ctx, project.Namespace, integrationsToUpdate, project.Spec.Integrations); !ready { return workflow.InProgress(workflow.ProjectIntegrationReady, "in progress") } @@ -99,7 +99,7 @@ func deleteIntegrationsFromAtlas(ctx *workflow.Context, projectID string, integr if _, err := ctx.Client.Integrations.Delete(context.Background(), projectID, integration.Identifier().(string)); err != nil { return err } - ctx.Log.Debugw("Third Party Integration deleted: ", integration.Identifier()) + ctx.Log.Debugf("Third Party Integration deleted: %s", integration.Identifier()) } return nil } @@ -162,27 +162,28 @@ func toAliasThirdPartyIntegration(list []*mongodbatlas.ThirdPartyIntegration) [] return result } -func syncPrometheusStatus(ctx *workflow.Context, project *mdbv1.AtlasProject, atlasIntegrations *mongodbatlas.ThirdPartyIntegrations) { - prometheusIntegration, found := searchAtlasIntegration(atlasIntegrations.Results, isPrometheusType) +func syncPrometheusStatus(ctx *workflow.Context, project *mdbv1.AtlasProject, integrationPairs [][]set.Identifiable) { + prometheusIntegration, found := searchAtlasIntegration(integrationPairs, isPrometheusType) if !found { - project.Status.Prometheus = status.Prometheus{} + ctx.EnsureStatusOption(status.AtlasProjectPrometheusOption(nil)) return } - project.Status.Prometheus = status.Prometheus{ + ctx.EnsureStatusOption(status.AtlasProjectPrometheusOption(&status.Prometheus{ Scheme: prometheusIntegration.Scheme, DiscoveryURL: buildPrometheusDiscoveryURL(ctx.Client.BaseURL, project.ID()), - } + })) } -func searchAtlasIntegration(atlasIntegrations []*mongodbatlas.ThirdPartyIntegration, filterFunc func(typeName string) bool) (integration *mongodbatlas.ThirdPartyIntegration, found bool) { - for _, aIntegration := range atlasIntegrations { - if filterFunc(aIntegration.Type) { - return aIntegration, true +func searchAtlasIntegration(integrationPairs [][]set.Identifiable, filterFunc func(typeName string) bool) (integration mongodbatlas.ThirdPartyIntegration, found bool) { + for _, pair := range integrationPairs { + integrationAlias := pair[0].(aliasThirdPartyIntegration) + if filterFunc(integrationAlias.Type) { + return mongodbatlas.ThirdPartyIntegration(integrationAlias), true } } - return nil, false + return integration, false } func arePrometheusesEqual(atlas aliasThirdPartyIntegration, spec project.Integration) bool { From 81b372acf0c83e3c029fab3baa7dbaaa5bbb5db5 Mon Sep 17 00:00:00 2001 From: fabritsius Date: Thu, 30 Jun 2022 13:17:55 +0400 Subject: [PATCH 4/5] Update sample grafana dashboard --- docs/grafana/sample_dashboard.json | 4517 +++++++++++++++++++++++----- 1 file changed, 3837 insertions(+), 680 deletions(-) diff --git a/docs/grafana/sample_dashboard.json b/docs/grafana/sample_dashboard.json index c073910d80..6260ec9e38 100644 --- a/docs/grafana/sample_dashboard.json +++ b/docs/grafana/sample_dashboard.json @@ -8,37 +8,53 @@ "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, "type": "dashboard" } ] }, "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 5, - "iteration": 1650460419048, + "id": 549, + "iteration": 1651830785513, "links": [], + "liveNow": false, "panels": [ { "collapsed": false, - "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, - "id": 4, + "id": 10, "panels": [], + "title": "Overview", "type": "row" }, { - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "${Datasource}" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, + "custom": { + "align": "auto", + "displayMode": "auto" + }, + "decimals": 2, + "displayName": "", "mappings": [], "thresholds": { "mode": "absolute", @@ -46,73 +62,212 @@ { "color": "green", "value": null + }, + { + "color": "red", + "value": 80 } ] }, - "unit": "ms" + "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align" + } + ] + } + ] }, "gridPos": { - "h": 7, - "w": 6, + "h": 4, + "w": 24, "x": 0, "y": 1 }, - "id": 2, - "maxDataPoints": null, + "id": 41, "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" + "footer": { + "fields": "", + "reducer": [ + "sum" ], - "fields": "/^Last \\(not null\\)$/", - "values": false + "show": false }, - "text": {}, - "textMode": "value" + "showHeader": true }, - "pluginVersion": "7.5.2", + "pluginVersion": "8.3.4", "targets": [ { - "exemplar": true, - "expr": "mongodb_uptimeMillis", - "format": "time_series", + "datasource": { + "type": "prometheus", + "uid": "000000014" + }, + "exemplar": false, + "expr": "label_replace( sum(mongodb_info{group_id=~\"$group_id\", cl_name=~\"$cl_name\", instance=~\"$host.*\"}) by (group_id, org_id, rs_nm, cl_name), \"hostname\", \"$1\", \"instance\", \"(.*)\")\n", + "format": "table", "instant": true, "interval": "", - "intervalFactor": 1, "legendFormat": "", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "Uptime (minutes)", + "title": "Group Metadata", "transformations": [ { - "id": "reduce", + "id": "organize", "options": { - "includeTimeField": false, - "mode": "seriesToRows", - "reducers": [ - "lastNotNull" - ] + "excludeByName": { + "Time": true, + "Value #A": true, + "instance": true, + "rs_nm": false + }, + "indexByName": { + "": 2, + "Time": 0, + "Value #A": 6, + "cl_name": 4, + "group_id": 3, + "org_id": 1, + "rs_nm": 5 + }, + "renameByName": { + "": "Group Name ", + "Time": "", + "cl_name": "Deployment Name", + "group_id": "Group Id", + "hostname": "Host", + "instance": "", + "org_id": "Org Id", + "process_port": "Port", + "replica_state": "ReplicaSet State", + "rs_nm": "ReplicaSet Name" + } + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "Deployment Name": { + "aggregations": [], + "operation": "groupby" + }, + "Group Id": { + "aggregations": [], + "operation": "groupby" + }, + "Group Name ": { + "aggregations": [], + "operation": "groupby" + }, + "Host": { + "aggregations": [], + "operation": "groupby" + }, + "Host ": { + "aggregations": [], + "operation": "groupby" + }, + "Org Id": { + "aggregations": [], + "operation": "groupby" + }, + "Port": { + "aggregations": [], + "operation": "groupby" + }, + "Replica set state": { + "aggregations": [], + "operation": "groupby" + }, + "ReplicaSet Name": { + "aggregations": [], + "operation": "groupby" + }, + "ReplicaSet State": { + "aggregations": [], + "operation": "groupby" + }, + "host ": { + "aggregations": [], + "operation": "groupby" + }, + "hostname": { + "aggregations": [], + "operation": "groupby" + }, + "instance": { + "aggregations": [], + "operation": "groupby" + }, + "port": { + "aggregations": [], + "operation": "groupby" + }, + "process_port": { + "aggregations": [], + "operation": "groupby" + }, + "replica set": { + "aggregations": [], + "operation": "groupby" + }, + "replica set state": { + "aggregations": [], + "operation": "groupby" + }, + "replica_state": { + "aggregations": [], + "operation": "groupby" + }, + "rs_nm": { + "aggregations": [], + "operation": "groupby" + } + } + } + }, + { + "id": "merge", + "options": { + "reducers": [] } } ], - "type": "stat" + "type": "table" }, { - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "${Datasource}" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, + "custom": { + "align": "auto", + "displayMode": "auto" + }, + "decimals": 0, + "displayName": "", "mappings": [], "thresholds": { "mode": "absolute", @@ -127,93 +282,203 @@ } ] }, - "unit": "short" + "unit": "none" }, "overrides": [] }, "gridPos": { - "h": 7, - "w": 6, - "x": 6, - "y": 1 + "h": 6, + "w": 24, + "x": 0, + "y": 5 }, - "id": 5, - "maxDataPoints": null, + "id": 42, "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], + "footer": { "fields": "", - "values": false + "reducer": [ + "sum" + ], + "show": false }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "text": {} + "showHeader": true }, - "pluginVersion": "7.5.2", - "repeat": null, + "pluginVersion": "8.3.4", "targets": [ { - "exemplar": true, - "expr": "mongodb_connections_available", - "format": "time_series", - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "000000014" + }, + "exemplar": false, + "expr": "label_replace( sum(mongodb_info{group_id=~\"$group_id\", cl_name=~\"$cl_name\", instance=~\"$host.*\"}) by (instance, replica_state_name, process_port, rs_nm, process_type), \"hostname\", \"$1\", \"instance\", \"(.*):.*\")\n", + "format": "table", + "instant": true, "interval": "", - "intervalFactor": 1, - "legendFormat": "Available", + "legendFormat": "", "refId": "A" - }, - { - "exemplar": true, - "expr": "mongodb_connections_active", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "Active", - "refId": "B" } ], - "timeFrom": null, - "timeShift": null, - "title": "Connections", + "title": "Deployment host list", "transformations": [ { - "id": "reduce", + "id": "organize", "options": { - "includeTimeField": false, - "mode": "seriesToRows", - "reducers": [ - "lastNotNull" - ] + "excludeByName": { + "Time": true, + "Value #A": true, + "instance": false, + "rs_nm": false + }, + "indexByName": { + "Time": 0, + "Value": 6, + "instance": 1, + "process_port": 2, + "process_type": 4, + "replica_state_name": 5, + "rs_nm": 3 + }, + "renameByName": { + "Time": "", + "Value": "", + "hostname": "Host", + "instance": "Hostname", + "process_port": "Port", + "process_type": "Process Type", + "replica_state": "ReplicaSet State", + "replica_state_name": "Replica State", + "rs_nm": "ReplicaSet Name" + } + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "Host": { + "aggregations": [], + "operation": "groupby" + }, + "Host ": { + "aggregations": [], + "operation": "groupby" + }, + "Hostname": { + "aggregations": [], + "operation": "groupby" + }, + "Port": { + "aggregations": [], + "operation": "groupby" + }, + "Process Type": { + "aggregations": [], + "operation": "groupby" + }, + "Replica State": { + "aggregations": [], + "operation": "groupby" + }, + "Replica set state": { + "aggregations": [], + "operation": "groupby" + }, + "ReplicaSet Name": { + "aggregations": [], + "operation": "groupby" + }, + "ReplicaSet State": { + "aggregations": [], + "operation": "groupby" + }, + "host ": { + "aggregations": [], + "operation": "groupby" + }, + "hostname": { + "aggregations": [], + "operation": "groupby" + }, + "instance": { + "aggregations": [], + "operation": "groupby" + }, + "port": { + "aggregations": [], + "operation": "groupby" + }, + "process_port": { + "aggregations": [], + "operation": "groupby" + }, + "replica set": { + "aggregations": [], + "operation": "groupby" + }, + "replica set state": { + "aggregations": [], + "operation": "groupby" + }, + "replica_state": { + "aggregations": [], + "operation": "groupby" + }, + "rs_nm": { + "aggregations": [], + "operation": "groupby" + } + } + } + }, + { + "id": "merge", + "options": { + "reducers": [] } } ], - "type": "gauge" + "type": "table" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 8, + "panels": [], + "title": "Memory", + "type": "row" }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The number of megabytes resident. MMAPv1: It is typical over time, on a dedicated database server, for this number to approach the amount of physical ram on the box. WiredTiger: In a standard deployment resident is the amount of memory used by the WiredTiger cache plus the memory dedicated to other in memory structures used by the mongod process. By default, mongod with WiredTiger reserves 50% of the total physical memory on the server for the cache and at steady state, WiredTiger tries to limit cache usage to 80% of that total. For example, if a server has 16GB of memory, WiredTiger will assume it can use 8GB for cache and at steady state should use about 6.5GB.", "fieldConfig": { "defaults": { - "unit": "bytes" + "links": [], + "unit": "decmbytes" }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 1 + "h": 8, + "w": 12, + "x": 0, + "y": 12 }, "hiddenSeries": false, - "id": 6, + "id": 2, "legend": { "avg": false, "current": false, @@ -225,13 +490,20 @@ }, "lines": true, "linewidth": 1, - "maxDataPoints": null, "nullPointMode": "null", "options": { - "alertThreshold": true + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, "percentage": false, - "pluginVersion": "7.5.2", + "pluginVersion": "8.3.4", "pointradius": 2, "points": false, "renderer": "flot", @@ -242,72 +514,40 @@ "targets": [ { "exemplar": true, - "expr": "sum(container_memory_working_set_bytes{pod=~\"$Cluster.*\", container=~\"mongodb.*\"})\n", - "format": "time_series", - "instant": false, + "expr": "label_replace(sum(mongodb_mem_resident{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "intervalFactor": 1, - "legendFormat": "Working", + "legendFormat": "{{hostname}}:{{process_port}}", "refId": "A" - }, - { - "exemplar": true, - "expr": ":node_memory_MemAvailable_bytes:sum", - "hide": false, - "interval": "", - "legendFormat": "Available", - "refId": "B" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Mongo Pods Memory Usage in GB / Total Available on Cluster", + "title": "Memory - Resident", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "transformations": [ - { - "id": "reduce", - "options": { - "includeTimeField": false, - "mode": "seriesToRows", - "reducers": [] - } - } - ], "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "format": "bytes", - "label": null, + "format": "decmbytes", "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -315,22 +555,27 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, - "description": "", + "datasource": { + "uid": "${Datasource}" + }, + "description": "The virtual megabytes for the mongod process. MMAPv1: Generally virtual should be a little larger than mapped (or 2x with --journal), but if virtual is many gigabytes larger, it indicates that excessive memory is being used by other aspects than the memory mapping of files -- that would be bad/suboptimal. The most common case of usage of a high amount of memory for non-mapped is that there are very many connections to the database. Each connection has a thread stack and the memory for those stacks can add up to a considerable amount. WiredTiger: Generally virtual should be a little larger than mapped, but if virtual is many gigabytes larger, it indicates that excessive memory is being used by other aspects than the memory mapping of files -- that would be bad/suboptimal. The most common case of usage of a high amount of memory for non-mapped is that there are very many connections to the database. Each connection has a thread stack and the memory for those stacks can add up to a considerable amount.", "fieldConfig": { - "defaults": {}, + "defaults": { + "links": [], + "unit": "decmbytes" + }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 1 + "h": 8, + "w": 12, + "x": 12, + "y": 12 }, "hiddenSeries": false, - "id": 7, + "id": 72, "legend": { "avg": false, "current": false, @@ -342,13 +587,20 @@ }, "lines": true, "linewidth": 1, - "maxDataPoints": null, "nullPointMode": "null", "options": { - "alertThreshold": true + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, "percentage": false, - "pluginVersion": "7.5.2", + "pluginVersion": "8.3.4", "pointradius": 2, "points": false, "renderer": "flot", @@ -359,273 +611,178 @@ "targets": [ { "exemplar": true, - "expr": "sum(rate(container_cpu_usage_seconds_total{pod=~\"$Cluster.*\", image!~\"sha.*\", container=~\"mongo.*\"}[5m]))", - "hide": false, - "interval": "", - "legendFormat": "Usage", - "refId": "Used" - }, - { - "exemplar": true, - "expr": "cluster:node_cpu:sum_rate5m", - "hide": false, + "expr": "label_replace(sum(mongodb_mem_virtual{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "legendFormat": "Available", - "refId": "Available" + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Mongo Pods CPU Usage / Total Available on Cluster", + "title": "Memory - Virtual", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "transformations": [ - { - "id": "reduce", - "options": { - "includeTimeField": false, - "mode": "seriesToRows", - "reducers": [] - } - } - ], "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "format": "short", - "label": null, + "format": "decmbytes", "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { - "datasource": null, + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 17, + "panels": [], + "title": "Asserts", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of regular asserts raised per second over the selected sample period\n", "fieldConfig": { "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } + "links": [], + "unit": "/s" }, "overrides": [] }, + "fill": 1, + "fillGradient": 0, "gridPos": { "h": 8, - "w": 12, + "w": 6, "x": 0, - "y": 8 + "y": 21 + }, + "hiddenSeries": false, + "id": 73, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false }, - "id": 11, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", "options": { - "displayMode": "gradient", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" }, - "showUnfilled": true, - "text": {} + "tooltip": { + "mode": "single" + } }, - "pluginVersion": "7.5.2", + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { "exemplar": true, - "expr": "max(mongodb_catalogStats_collections{pod=~\"$Cluster.*\"})", - "instant": false, + "expr": "label_replace(sum(rate(mongodb_asserts_regular{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "legendFormat": "Collections", + "legendFormat": "{{hostname}}:{{process_port}}", "refId": "A" - }, - { - "exemplar": true, - "expr": "max(mongodb_catalogStats_capped{pod=~\"$Cluster.*\"})", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "Capped Collections", - "refId": "B" - }, - { - "exemplar": true, - "expr": "max(mongodb_catalogStats_timeseries{pod=~\"$Cluster.*\"})", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "Timeseries", - "refId": "C" - }, - { - "exemplar": true, - "expr": "max(mongodb_catalogStats_views{pod=~\"$Cluster.*\"})", - "hide": false, - "interval": "", - "legendFormat": "Views", - "refId": "D" } ], - "title": "Catalog Stats", - "type": "bargauge" - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "graph": false, - "legend": false, - "tooltip": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 + "thresholds": [], + "timeRegions": [], + "title": "Asserts - Regular", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" }, - "id": 9, - "options": { - "graph": {}, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltipOptions": { - "mode": "single" - } + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] }, - "pluginVersion": "7.5.2", - "targets": [ - { - "exemplar": true, - "expr": "sum(mongodb_globalLock_activeClients_total{pod=~\"$Cluster.*\"})", - "interval": "", - "legendFormat": "Total", - "refId": "A" - }, + "yaxes": [ { - "exemplar": true, - "expr": "sum(mongodb_globalLock_activeClients_readers{pod=~\"$Cluster.*\"})", - "hide": false, - "interval": "", - "legendFormat": "Readers", - "refId": "B" + "format": "/s", + "logBase": 1, + "show": true }, { - "exemplar": true, - "expr": "sum(mongodb_globalLock_activeClients_writers{pod=~\"$Cluster.*\"})", - "hide": false, - "interval": "", - "legendFormat": "Writers", - "refId": "C" + "format": "short", + "logBase": 1, + "show": true } ], - "title": "Global Locks", - "transformations": [], - "type": "timeseries" + "yaxis": { + "align": false + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, - "description": "", + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of warnings per second over the selected sample period", "fieldConfig": { "defaults": { - "unit": "short" + "links": [], + "unit": "/s" }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { - "h": 11, - "w": 12, - "x": 0, - "y": 16 + "h": 8, + "w": 6, + "x": 6, + "y": 21 }, "hiddenSeries": false, - "id": 13, + "id": 74, "legend": { "avg": false, "current": false, @@ -639,10 +796,18 @@ "linewidth": 1, "nullPointMode": "null", "options": { - "alertThreshold": true + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, "percentage": false, - "pluginVersion": "7.5.2", + "pluginVersion": "8.3.4", "pointradius": 2, "points": false, "renderer": "flot", @@ -653,36 +818,15 @@ "targets": [ { "exemplar": true, - "expr": "mongodb_metrics_cursor_open_total{pod=~\"$Cluster.*\"}", - "format": "time_series", - "hide": false, - "instant": false, + "expr": "label_replace(sum(rate(mongodb_asserts_warning{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "legendFormat": "{{pod}} Open", + "legendFormat": "{{hostname}}:{{process_port}}", "refId": "A" - }, - { - "exemplar": true, - "expr": "mongodb_metrics_cursor_open_noTimeout{pod=~\"$Cluster.*\"}", - "hide": false, - "interval": "", - "legendFormat": "{{pod}} Open No Timeout", - "refId": "B" - }, - { - "exemplar": true, - "expr": "mongodb_metrics_cursor_timed_out{pod=~\"$Cluster.*\"}", - "hide": false, - "interval": "", - "legendFormat": "{{pod}} Timed Out", - "refId": "C" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Cursors", + "title": "Asserts - Warning", "tooltip": { "shared": true, "sort": 0, @@ -690,33 +834,24 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "format": "short", - "label": null, + "format": "/s", "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { @@ -724,21 +859,27 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of message asserts per second over the selected sample period. These are internal server errors that have a well defined text string. Stack traces are logged for these", "fieldConfig": { - "defaults": {}, + "defaults": { + "links": [], + "unit": "/s" + }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { - "h": 11, - "w": 12, + "h": 8, + "w": 6, "x": 12, - "y": 16 + "y": 21 }, "hiddenSeries": false, - "id": 15, + "id": 75, "legend": { "avg": false, "current": false, @@ -752,10 +893,18 @@ "linewidth": 1, "nullPointMode": "null", "options": { - "alertThreshold": true + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, "percentage": false, - "pluginVersion": "7.5.2", + "pluginVersion": "8.3.4", "pointradius": 2, "points": false, "renderer": "flot", @@ -766,218 +915,55 @@ "targets": [ { "exemplar": true, - "expr": "mongodb_metrics_document_inserted{pod=~\"$Cluster.*\"}", + "expr": "label_replace(sum(rate(mongodb_asserts_msg{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "legendFormat": "{{pod}} Inserted", + "legendFormat": "{{hostname}}:{{process_port}}", "refId": "A" - }, - { - "exemplar": true, - "expr": "mongodb_metrics_document_returned{pod=~\"$Cluster.*\"}", - "hide": false, - "interval": "", - "legendFormat": "{{pod}} Returned", - "refId": "B" - }, - { - "exemplar": true, - "expr": "mongodb_metrics_document_deleted{pod=~\"$Cluster.*\"}", - "hide": false, - "interval": "", - "legendFormat": "{{pod}} Deleted", - "refId": "C" - }, - { - "exemplar": true, - "expr": "mongodb_metrics_document_updated{pod=~\"$Cluster.*\"}", - "hide": false, - "interval": "", - "legendFormat": "{{pod}} Updated", - "refId": "D" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Documents", + "title": "Asserts - Message", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "transformations": [], "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "format": "short", - "label": null, + "format": "/s", "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, - { - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 27 - }, - "id": 17, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.5.2", - "targets": [ - { - "exemplar": true, - "expr": "sum(mongodb_metrics_repl_network_bytes{pod=~\"$Cluster.*\"})", - "instant": false, - "interval": "", - "legendFormat": "Total Usage", - "refId": "A" - } - ], - "title": "Replication Network Usage", - "transformations": [ - { - "id": "reduce", - "options": { - "reducers": [ - "lastNotNull" - ] - } - } - ], - "type": "stat" - }, - { - "datasource": null, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 27 - }, - "id": 19, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.5.2", - "targets": [ - { - "exemplar": true, - "expr": "sum(mongodb_metrics_repl_network_ops{pod=~\"$Cluster.*\"})", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Replication Operations", - "type": "stat" - }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of user asserts per second over the selected sample period. These are errors that can be generated by a user such as out of disk space or duplicate key", "fieldConfig": { "defaults": { - "unit": "bytes" + "links": [], + "unit": "/s" }, "overrides": [] }, @@ -985,12 +971,12 @@ "fillGradient": 0, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 27 + "w": 6, + "x": 18, + "y": 21 }, "hiddenSeries": false, - "id": 26, + "id": 76, "legend": { "avg": false, "current": false, @@ -1004,10 +990,18 @@ "linewidth": 1, "nullPointMode": "null", "options": { - "alertThreshold": true + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, "percentage": false, - "pluginVersion": "7.5.2", + "pluginVersion": "8.3.4", "pointradius": 2, "points": false, "renderer": "flot", @@ -1018,25 +1012,15 @@ "targets": [ { "exemplar": true, - "expr": "max(mongodb_network_bytesIn{pod=~\"$Cluster.*\"})", + "expr": "label_replace(sum(rate(mongodb_asserts_user{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "legendFormat": "Bytes In", + "legendFormat": "{{hostname}}:{{process_port}}", "refId": "A" - }, - { - "exemplar": true, - "expr": "max(mongodb_network_bytesOut{pod=~\"$Cluster.*\"})", - "hide": false, - "interval": "", - "legendFormat": "Bytes Out", - "refId": "B" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Network Usage", + "title": "Asserts - User", "tooltip": { "shared": true, "sort": 0, @@ -1044,44 +1028,52 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "format": "bytes", - "label": null, + "format": "/s", "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 44, + "panels": [], + "title": "Cache", + "type": "row" + }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of bytes per second read into WiredTiger's cache over the selected sample period.", "fieldConfig": { "defaults": { - "unit": "µs" + "links": [], + "unit": "Bps" }, "overrides": [] }, @@ -1089,12 +1081,12 @@ "fillGradient": 0, "gridPos": { "h": 8, - "w": 12, + "w": 6, "x": 0, - "y": 35 + "y": 30 }, "hiddenSeries": false, - "id": 23, + "id": 77, "legend": { "avg": false, "current": false, @@ -1108,10 +1100,18 @@ "linewidth": 1, "nullPointMode": "null", "options": { - "alertThreshold": true + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, "percentage": false, - "pluginVersion": "7.5.2", + "pluginVersion": "8.3.4", "pointradius": 2, "points": false, "renderer": "flot", @@ -1122,41 +1122,2866 @@ "targets": [ { "exemplar": true, - "expr": "max(mongodb_opLatencies_reads_latency{pod=~\"$Cluster.*\"})", + "expr": "label_replace(sum(irate(mongodb_wiredTiger_cache_bytes_read_into_cache{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "legendFormat": "Reads", + "legendFormat": "{{hostname}}:{{process_port}}", "refId": "A" - }, - { - "exemplar": true, - "expr": "max(mongodb_opLatencies_commands_latency{pod=~\"$Cluster.*\"})", - "hide": false, + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Cache Activity - Read Into", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of bytes per second written from WiredTiger's cache over the selected sample period.\n", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "Bps" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 30 + }, + "hiddenSeries": false, + "id": 78, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_wiredTiger_cache_bytes_written_from_cache{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Cache Activity - Write From", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The number of bytes currently in the WiredTiger cache.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "bytes" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 30 + }, + "hiddenSeries": false, + "id": 79, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(mongodb_wiredTiger_cache_bytes_currently_in_the_cache{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Cache Usage - Used", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The number of tracked dirty bytes currently in the WiredTiger cache.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "bytes" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 30 + }, + "hiddenSeries": false, + "id": 80, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(mongodb_wiredTiger_cache_tracked_dirty_bytes_in_the_cache{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Cache Usage - Dirty", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 38 + }, + "id": 28, + "panels": [], + "title": "Connections", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The number of currently active connections to this server. A stack is allocated per connection; thus very many connections can result in significant RAM usage.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 39 + }, + "hiddenSeries": false, + "id": 81, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(mongodb_connections_current{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Connections - Current", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 48 + }, + "id": 30, + "panels": [], + "title": "Cursors", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The number of cursors that the server is maintaining for clients. Because MongoDB exhausts unused cursors, typically this value is small or zero. However, if there is a queue, stale tailable cursors, or a large number of operations this value may rise.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 13, + "x": 0, + "y": 49 + }, + "hiddenSeries": false, + "id": 82, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(mongodb_metrics_cursor_open_total{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Cursors - Total Open", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of cursors that have timed out per second over the selected sample period", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 11, + "x": 13, + "y": 49 + }, + "hiddenSeries": false, + "id": 83, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(mongodb_metrics_cursor_timedOut{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Cursors - Timed Out", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 57 + }, + "id": 32, + "panels": [], + "title": "Document Metrics", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate per second of documents returned by queries over the selected sample period.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 58 + }, + "hiddenSeries": false, + "id": 84, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_metrics_document_returned{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Document Metrics - Returned", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate per second of documents inserted over the selected sample period.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 58 + }, + "hiddenSeries": false, + "id": 87, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_metrics_document_inserted{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Document Metrics - Inserted", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate per second of documents updated over the selected sample period.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 58 + }, + "hiddenSeries": false, + "id": 86, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_metrics_document_updated{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Document Metrics - Updated", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate per second of documents deleted over the selected sample period.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 58 + }, + "hiddenSeries": false, + "id": 85, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_metrics_document_deleted{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Document Metrics - Deleted", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 66 + }, + "id": 69, + "panels": [], + "title": "Network", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of requests sent to this database server per second over the selected sample period", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 67 + }, + "hiddenSeries": false, + "id": 88, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_network_numRequests{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Network - Num Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of physical (after any wire compression) bytes sent to this database server per second over the selected sample period", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "binBps" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 16, + "x": 8, + "y": 67 + }, + "hiddenSeries": false, + "id": 90, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_network_bytesIn{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "rx - {{hostname}}:{{process_port}}", + "refId": "A" + }, + { + "expr": "label_replace(-1 * sum(irate(mongodb_network_bytesOut{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "legendFormat": "tx - {{hostname}}:{{process_port}}", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Network - Bytes In", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "binBps", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 75 + }, + "id": 93, + "panels": [], + "title": "Opcounters", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of commands performed per second over the selected sample period", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 76 + }, + "hiddenSeries": false, + "id": 96, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_opcounters_command{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Opcounters - Command", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of queries performed per second over the selected sample period", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 76 + }, + "hiddenSeries": false, + "id": 101, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_opcounters_query{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Opcounters - Query", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of updates performed per second over the selected sample period", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 76 + }, + "hiddenSeries": false, + "id": 100, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_opcounters_update{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Opcounters - Update", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of deletes performed per second over the selected sample period", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 84 + }, + "hiddenSeries": false, + "id": 99, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_opcounters_delete{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Opcounters - Delete", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of getMores performed per second on any cursor over the selected sample period. On a primary, this number can be high even if the query count is low as the secondaries \"getMore\" from the primary often as part of replication.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 84 + }, + "hiddenSeries": false, + "id": 97, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_opcounters_getmore{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Opcounters - Getmore", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of inserts performed per second over the selected sample period", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 84 + }, + "hiddenSeries": false, + "id": 98, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_opcounters_insert{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Opcounters - Insert", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 92 + }, + "id": 95, + "panels": [], + "title": "Operation Execution Times", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average execution time in milliseconds per read operation over the selected sample period.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "µs" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 93 + }, + "hiddenSeries": false, + "id": 102, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_opLatencies_reads_latency{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])/irate(mongodb_opLatencies_reads_ops{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Operation Execution Times - Avg Ms/Read", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "µs", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average execution time in milliseconds per write operation over the selected sample period.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "µs" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 93 + }, + "hiddenSeries": false, + "id": 104, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_opLatencies_writes_latency{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])/irate(mongodb_opLatencies_writes_ops{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Operation Execution Times - Avg Ms/Write", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "µs", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average execution time in milliseconds per command operation over the selected sample period.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "µs" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 93 + }, + "hiddenSeries": false, + "id": 103, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_opLatencies_commands_latency{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])/irate(mongodb_opLatencies_commands_ops{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Operation Execution Times - Avg Ms/Command", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "µs", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 101 + }, + "id": 106, + "panels": [], + "title": "Page Faults", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate of page faults on this process per second over the selected sample period. In non-Windows environments this is hard page faults only.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 102 + }, + "hiddenSeries": false, + "id": 107, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_extra_info_page_faults{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Page Faults", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 110 + }, + "id": 111, + "panels": [], + "title": "Query Executor", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate per second over the selected sample period of index items scanned during queries and query-plan evaluation. This rate is driven by the same value as totalKeysExamined in the output of explain().", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 111 + }, + "hiddenSeries": false, + "id": 108, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_metrics_queryExecutor_scanned{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Query Executor - Scanned", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate per second over the selected sample period of documents scanned during queries and query-plan evaluation. This rate is driven by the same value as totalDocsExamined in the output of explain().", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 111 + }, + "hiddenSeries": false, + "id": 109, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(irate(mongodb_metrics_queryExecutor_scannedObjects{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Query Executor - Scanned Objects", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "/s", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 119 + }, + "id": 113, + "panels": [], + "title": "Queues", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The number of operations queued waiting for any lock", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 120 + }, + "hiddenSeries": false, + "id": 114, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(mongodb_globalLock_currentQueue_total{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", + "interval": "", + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Queues - Total", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The number of operations queued waiting for a read lock", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 120 + }, + "hiddenSeries": false, + "id": 115, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "label_replace(sum(mongodb_globalLock_currentQueue_readers{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "legendFormat": "Commands", - "refId": "C" + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Queues - Readers", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The number of operations queued waiting for a write lock", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "none" }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 120 + }, + "hiddenSeries": false, + "id": 116, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ { "exemplar": true, - "expr": "max(mongodb_opLatencies_transactions_latency{pod=~\"$Cluster.*\"})", - "hide": false, + "expr": "label_replace(sum(mongodb_globalLock_currentQueue_writers{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "legendFormat": "Transactions", - "refId": "D" + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Queues - Writers", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 128 + }, + "id": 118, + "panels": [], + "title": "Scan and Order", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The average rate per second over the selected sample period of queries that return sorted results that cannot perform the sort operation using an index.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "/s" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 129 + }, + "hiddenSeries": false, + "id": 119, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ { "exemplar": true, - "expr": "max(mongodb_opLatencies_writes_latency{pod=~\"$Cluster.*\"})", - "hide": false, + "expr": "label_replace(sum(irate(mongodb_metrics_operation_scanAndOrder{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}[$Interval])) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "legendFormat": "Writes", - "refId": "B" + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Latencies", + "title": "Scan and Order", "tooltip": { "shared": true, "sort": 0, @@ -1164,44 +3989,52 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "format": "µs", - "label": null, + "format": "/s", "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 137 + }, + "id": 123, + "panels": [], + "title": "Tickets Available", + "type": "row" + }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": null, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The number of read tickets available to the WiredTiger storage engine. Read tickets represent the number of concurrent read operations allowed into the storage engine. When this value reaches zero new read requests may queue until a read ticket becomes available.", "fieldConfig": { "defaults": { - "unit": "short" + "links": [], + "unit": "none" }, "overrides": [] }, @@ -1210,11 +4043,11 @@ "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 35 + "x": 0, + "y": 138 }, "hiddenSeries": false, - "id": 24, + "id": 120, "legend": { "avg": false, "current": false, @@ -1228,10 +4061,18 @@ "linewidth": 1, "nullPointMode": "null", "options": { - "alertThreshold": true + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } }, "percentage": false, - "pluginVersion": "7.5.2", + "pluginVersion": "8.3.4", "pointradius": 2, "points": false, "renderer": "flot", @@ -1242,41 +4083,112 @@ "targets": [ { "exemplar": true, - "expr": "max(mongodb_opLatencies_reads_ops{pod=~\"$Cluster.*\"})", + "expr": "label_replace(sum(mongodb_wiredTiger_concurrentTransactions_read_available{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "legendFormat": "Reads", + "legendFormat": "{{hostname}}:{{process_port}}", "refId": "A" - }, + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Tickets Available - Reads", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ { - "exemplar": true, - "expr": "max(mongodb_opLatencies_commands_ops{pod=~\"$Cluster.*\"})", - "hide": false, - "interval": "", - "legendFormat": "Commands", - "refId": "C" + "format": "none", + "logBase": 1, + "show": true }, { - "exemplar": true, - "expr": "max(mongodb_opLatencies_transactions_ops{pod=~\"$Cluster.*\"})", - "hide": false, - "interval": "", - "legendFormat": "Transactions", - "refId": "D" + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${Datasource}" + }, + "description": "The number of write tickets available to the WiredTiger storage engine. Write tickets represent the number of concurrent write operations allowed into the storage engine. When this value reaches zero new write requests may queue until a write ticket becomes available.", + "fieldConfig": { + "defaults": { + "links": [], + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 138 + }, + "hiddenSeries": false, + "id": 121, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" }, + "tooltip": { + "mode": "single" + } + }, + "percentage": false, + "pluginVersion": "8.3.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ { "exemplar": true, - "expr": "max(mongodb_opLatencies_writes_ops{pod=~\"$Cluster.*\"})", - "hide": false, + "expr": "label_replace(sum(mongodb_wiredTiger_concurrentTransactions_write_available{group_id=~\"$group_id\", cl_name=~\"$cl_name\", rs_nm=~\"$rs_nm\", instance=~\"$host.*\", process_port=~\"$process_port\"}) by (instance, process_port) , \"hostname\", \"$1\", \"instance\", \"(.*)\")", "interval": "", - "legendFormat": "Writes", - "refId": "B" + "legendFormat": "{{hostname}}:{{process_port}}", + "refId": "A" } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, - "title": "Ops", + "title": "Tickets Available - Writes", "tooltip": { "shared": true, "sort": 0, @@ -1284,68 +4196,299 @@ }, "type": "graph", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "format": "short", - "label": null, + "format": "none", "logBase": 1, - "max": null, - "min": null, "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], - "schemaVersion": 27, + "schemaVersion": 34, "style": "dark", "tags": [], "templating": { "list": [ { - "allValue": null, + "auto": true, + "auto_count": 30, + "auto_min": "1m", + "current": { + "selected": true, + "text": "1m", + "value": "1m" + }, + "hide": 0, + "name": "Interval", + "options": [ + { + "selected": false, + "text": "auto", + "value": "$__auto_interval_Interval" + }, + { + "selected": false, + "text": "30s", + "value": "30s" + }, + { + "selected": true, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "1d", + "value": "1d" + } + ], + "query": "30s,1m,5m,1h,1d", + "queryValue": "", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + }, + { + "current": { + "selected": false, + "text": "thanos", + "value": "thanos" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "Datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "/thanos.*/", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "selected": false, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "$Datasource" + }, + "definition": "label_values(mongodb_up, job)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "job", + "options": [], + "query": { + "query": "label_values(mongodb_up, job)", + "refId": "thanos-job-Variable-Query" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { "current": { "selected": false, - "text": "replica-set-with-prom", - "value": "replica-set-with-prom" + "text": [ + "All" + ], + "value": [ + "$__all" + ] }, - "datasource": null, - "definition": "label_values(mongodb_connections_available, cl_name)", - "description": null, - "error": null, + "datasource": { + "type": "prometheus", + "uid": "$Datasource" + }, + "definition": "label_values(mongodb_up{job=\"$job\"}, group_id)", "hide": 0, "includeAll": false, - "label": null, + "label": "Group Id", "multi": false, - "name": "Cluster", + "name": "group_id", "options": [], "query": { - "query": "label_values(mongodb_connections_available, cl_name)", - "refId": "StandardVariableQuery" + "query": "label_values(mongodb_up{job=\"$job\"}, group_id)", + "refId": "thanos-group_id-Variable-Query" }, "refresh": 1, "regex": "", "skipUrlSync": false, - "sort": 0, + "sort": 5, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "$Datasource" + }, + "definition": "label_values(mongodb_up{group_id='$group_id'}, cl_name)", + "hide": 0, + "includeAll": false, + "label": "Deployment Name", + "multi": false, + "name": "cl_name", + "options": [], + "query": { + "query": "label_values(mongodb_up{group_id='$group_id'}, cl_name)", + "refId": "thanos-cl_name-Variable-Query" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "$Datasource" + }, + "definition": "label_values(mongodb_up{group_id='$group_id', cl_name='$cl_name'}, rs_nm)", + "hide": 0, + "includeAll": true, + "label": "ReplicaSet Name", + "multi": true, + "name": "rs_nm", + "options": [], + "query": { + "query": "label_values(mongodb_up{group_id='$group_id', cl_name='$cl_name'}, rs_nm)", + "refId": "thanos-rs_nm-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "$Datasource" + }, + "definition": "label_values(mongodb_up{group_id='$group_id', cl_name='$cl_name',rs_nm='$rs_nm'},instance)", + "hide": 0, + "includeAll": true, + "label": "Host", + "multi": true, + "name": "host", + "options": [], + "query": { + "query": "label_values(mongodb_up{group_id='$group_id', cl_name='$cl_name',rs_nm='$rs_nm'},instance)", + "refId": "thanos-host-Variable-Query" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 5, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "$Datasource" + }, + "definition": "label_values(mongodb_up{group_id='$group_id', cl_name='$cl_name',rs_nm='$rs_nm'},process_port)", + "description": "Only applicable for process level metrics", + "hide": 0, + "includeAll": true, + "label": "Process Port", + "multi": true, + "name": "process_port", + "options": [], + "query": { + "query": "label_values(mongodb_up{group_id='$group_id', cl_name='$cl_name',rs_nm='$rs_nm'},process_port)", + "refId": "thanos-process_port-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 5, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -1356,9 +4499,23 @@ "from": "now-6h", "to": "now" }, - "timepicker": {}, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, "timezone": "", - "title": "MongoDB Dashboard Copy", - "uid": "_y8XBgynz", - "version": 22 -} + "title": "Dedicated Atlas Deployments - Mongo Metrics", + "uid": "W0lo7Gx7k", + "version": 17, + "weekStart": "" +} \ No newline at end of file From 1e00d681716ba3c1cba48b844b0e4a0dc7345bde Mon Sep 17 00:00:00 2001 From: fabritsius Date: Thu, 30 Jun 2022 15:03:22 +0400 Subject: [PATCH 5/5] Change user to placeholder in the example --- docs/metrics-via-grafana.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/metrics-via-grafana.md b/docs/metrics-via-grafana.md index 90377609f5..0a9b57c51b 100644 --- a/docs/metrics-via-grafana.md +++ b/docs/metrics-via-grafana.md @@ -16,14 +16,14 @@ scrape_configs: metrics_path: /metrics scheme : https basic_auth: - username: user - password: {password} + username: + password: http_sd_configs: - url: https://cloud.mongodb.com/prometheus/v1.0/groups/{group-ID}/discovery refresh_interval: 60s basic_auth: - username: user - password: {password} + username: + password: ``` You can find the URL in atlasproject status via a command: