From 2d003084dee51a648ff5469bda852e31121828b6 Mon Sep 17 00:00:00 2001 From: Santo <31849787+sleto-it@users.noreply.github.com> Date: Mon, 12 Aug 2024 05:35:14 +0000 Subject: [PATCH 1/2] Attempt to fix PMM-13002 & PMM-13003 (#1614) Co-authored-by: Yash Sartanpara <119680679+YashSartanpara1@users.noreply.github.com> --- .../MongoDB/MongoDB_ReplSet_Summary.json | 2222 +++++++++-------- 1 file changed, 1225 insertions(+), 997 deletions(-) diff --git a/dashboards/MongoDB/MongoDB_ReplSet_Summary.json b/dashboards/MongoDB/MongoDB_ReplSet_Summary.json index 066e4ccc3d..678f58083d 100644 --- a/dashboards/MongoDB/MongoDB_ReplSet_Summary.json +++ b/dashboards/MongoDB/MongoDB_ReplSet_Summary.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": false, "iconColor": "#e0752d", @@ -28,7 +31,10 @@ }, { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "#6ed0e0", @@ -49,8 +55,6 @@ "editable": false, "fiscalYearStartMonth": 0, "graphTooltip": 1, - "id": null, - "iteration": 1656496368829, "links": [ { "icon": "doc", @@ -137,6 +141,7 @@ "panels": [ { "collapsed": false, + "datasource": "Metrics", "gridPos": { "h": 1, "w": 24, @@ -145,10 +150,17 @@ }, "id": 1022, "panels": [], + "targets": [ + { + "datasource": "Metrics", + "refId": "A" + } + ], "title": "Overview", "type": "row" }, { + "datasource": "Metrics", "description": "", "gridPos": { "h": 3, @@ -159,13 +171,19 @@ "id": 1228, "links": [], "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, "content": "
$cluster
", "mode": "html" }, - "pluginVersion": "8.3.5", + "pluginVersion": "9.2.20", "targets": [ { "calculatedInterval": "10m", + "datasource": "Metrics", "datasourceErrors": {}, "errors": {}, "expr": "mysql_global_variables_innodb_buffer_pool_size{service_name=~\"$service_name\"} ", @@ -182,6 +200,7 @@ "type": "text" }, { + "datasource": "Metrics", "description": "This shows how many members are configured in the replica set.", "fieldConfig": { "defaults": { @@ -235,9 +254,10 @@ }, "textMode": "auto" }, - "pluginVersion": "8.3.5", + "pluginVersion": "9.2.20", "targets": [ { + "datasource": "Metrics", "expr": "count by (set) (group by (service_name, set) (mongodb_mongod_replset_number_of_members{cluster=~\"$cluster\",set=~\"$replset\"} or mongodb_mongod_replset_my_state{cluster=~\"$cluster\",set=~\"$replset\"}))", "interval": "5m", "intervalFactor": 1, @@ -251,6 +271,7 @@ "type": "stat" }, { + "datasource": "Metrics", "description": "This shows the time since the last election.", "fieldConfig": { "defaults": { @@ -304,9 +325,10 @@ }, "textMode": "auto" }, - "pluginVersion": "8.3.5", + "pluginVersion": "9.2.20", "targets": [ { + "datasource": "Metrics", "expr": "time() - max(mongodb_mongod_replset_member_election_date{service_name=~\"$service_name\"})", "interval": "5m", "intervalFactor": 1, @@ -320,6 +342,7 @@ "type": "stat" }, { + "datasource": "Metrics", "description": "This panel shows how far behind in replication this member is if it is a secondary. This number may be high it the instance is running as a delayed secondary member.", "fieldConfig": { "defaults": { @@ -373,7 +396,7 @@ }, "textMode": "auto" }, - "pluginVersion": "8.3.5", + "pluginVersion": "9.2.20", "targets": [ { "datasource": "Metrics", @@ -393,6 +416,7 @@ }, { "columns": [], + "datasource": "Metrics", "description": "", "fontSize": "100%", "gridPos": { @@ -502,32 +526,21 @@ "type": "table-old" }, { - "id": null, - "gridPos": { - "h": 8, - "w": 17, - "x": 0, - "y": 4 - }, - "type": "state-timeline", - "title": "ReplSet States", - "transformations": [], - "pluginVersion": "6.5.1", + "datasource": "Metrics", "description": "ReplSet statuses during the select time range.", "fieldConfig": { "defaults": { + "color": { + "fixedColor": "blue", + "mode": "palette-classic" + }, "custom": { - "lineWidth": 0, "fillOpacity": 100, + "lineWidth": 0, "spanNulls": false }, - "color": { - "mode": "palette-classic", - "fixedColor": "blue" - }, "mappings": [ { - "type": "value", "options": { "0": { "index": 11, @@ -577,18 +590,19 @@ "index": 2, "text": "Exporter is not connected" } - } + }, + "type": "value" }, { - "type": "range", "options": { "from": 0, - "to": 1, "result": { "index": 0, "text": "N/A" - } - } + }, + "to": 1 + }, + "type": "range" } ], "thresholds": { @@ -608,23 +622,32 @@ }, "overrides": [] }, + "gridPos": { + "h": 8, + "w": 17, + "x": 0, + "y": 4 + }, + "id": 1559, "options": { - "mergeValues": true, - "showValue": "auto", "alignValue": "right", - "rowHeight": 0.9, "legend": { - "showLegend": true, "displayMode": "list", - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", "tooltip": { "mode": "single", "sort": "none" } }, + "pluginVersion": "6.5.1", "targets": [ { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "max by (service_name) (mongodb_mongod_replset_my_state{set=~\"$replset\",service_name=~\"$service_name\"})", @@ -636,10 +659,14 @@ "range": true, "refId": "A" } - ] + ], + "title": "ReplSet States", + "transformations": [], + "type": "state-timeline" }, { - "collapsed": false, + "collapsed": true, + "datasource": "Metrics", "gridPos": { "h": 1, "w": 24, @@ -647,841 +674,900 @@ "y": 12 }, "id": 1024, - "panels": [], - "title": "Replication Lag", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "MongoDB replication lag occurs when the secondary node cannot replicate data fast enough to keep up with the rate that data is being written to the primary node. It could be caused by something as simple as network latency, packet loss within your network, or a routing issue.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "links": [ + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Metrics", + "decimals": 2, + "description": "MongoDB replication lag occurs when the secondary node cannot replicate data fast enough to keep up with the rate that data is being written to the primary node. It could be caused by something as simple as network latency, packet loss within your network, or a routing issue.", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "MongoDB Instance Summary - ${__series.name}", + "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__series.name}$&$__url_time_range" + } + ] + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMin": 0, + "rightLogBase": 1 + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 34 + }, + "hiddenSeries": false, + "id": 14, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ { - "targetBlank": true, - "title": "MongoDB Instance Summary - ${__series.name}", - "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__series.name}$&$__url_time_range" + "alias": "Avg", + "color": "#C4162A", + "fill": 0, + "legend": false, + "stack": false } - ] - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 0, - "grid": { - "leftLogBase": 1, - "leftMin": 0, - "rightLogBase": 1 - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null as zero", - "options": { - "alertThreshold": true - }, - "paceLength": 10, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Avg", - "color": "#C4162A", - "fill": 0, - "legend": false, - "stack": false + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (service_name) ((max(max_over_time(mongodb_mongod_replset_member_replication_lag{set=\"$replset\",state=\"SECONDARY\",self=~\"|1\",service_name=~\"$secondary\"}[$interval]) > 0) by (service_name,set)) or (max(max_over_time(mongodb_mongod_replset_member_replication_lag{set=\"$replset\",state=\"SECONDARY\",self=~\"|1\",service_name=~\"$secondary\"}[5m]) > 0) by (service_name,set)))", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{service_name}}", + "refId": "A", + "step": 300 + }, + { + "datasource": "Metrics", + "expr": "avg by (service_name) ((max(max_over_time(mongodb_mongod_replset_member_replication_lag{set=\"$replset\",state=\"SECONDARY\",self=~\"|1\",service_name=~\"$secondary\"}[$interval]) > 0) by (service_name,set)) or (max(max_over_time(mongodb_mongod_replset_member_replication_lag{set=\"$replset\",state=\"SECONDARY\",self=~\"|1\",service_name=~\"$secondary\"}[5m]) > 0) by (service_name,set)))", + "hide": true, + "interval": "$interval", + "legendFormat": "Avg", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Replication Lag", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 5, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "s", + "short" + ], + "yaxes": [ + { + "decimals": 2, + "format": "s", + "label": "", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } } ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "avg by (service_name) ((max(max_over_time(mongodb_mongod_replset_member_replication_lag{set=\"$replset\",state=\"SECONDARY\",self=~\"|1\",service_name=~\"$secondary\"}[$interval]) > 0) by (service_name,set)) or (max(max_over_time(mongodb_mongod_replset_member_replication_lag{set=\"$replset\",state=\"SECONDARY\",self=~\"|1\",service_name=~\"$secondary\"}[5m]) > 0) by (service_name,set)))", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{service_name}}", - "refId": "A", - "step": 300 - }, - { - "expr": "avg by (service_name) ((max(max_over_time(mongodb_mongod_replset_member_replication_lag{set=\"$replset\",state=\"SECONDARY\",self=~\"|1\",service_name=~\"$secondary\"}[$interval]) > 0) by (service_name,set)) or (max(max_over_time(mongodb_mongod_replset_member_replication_lag{set=\"$replset\",state=\"SECONDARY\",self=~\"|1\",service_name=~\"$secondary\"}[5m]) > 0) by (service_name,set)))", - "hide": true, - "interval": "$interval", - "legendFormat": "Avg", - "refId": "B" + "datasource": "Metrics", + "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Replication Lag", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 5, - "value_type": "cumulative" - }, - "type": "graph", - "x-axis": true, - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "y-axis": true, - "y_formats": [ - "s", - "short" - ], - "yaxes": [ - { - "decimals": 2, - "format": "s", - "label": "", - "logBase": 1, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } + "type": "row" }, { - "collapsed": false, + "collapsed": true, + "datasource": "Metrics", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 21 + "y": 13 }, "id": 1019, - "panels": [], - "title": "Operations", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "Operations are classified by legacy wire protocol type (insert, update, and delete only).", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "links": [ - { - "targetBlank": true, - "title": "MongoDB Instance Summary - ${__field.labels.service_name}", - "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__field.labels.service_name}&$__url_time_range" - } - ] - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 0, - "grid": { - "leftLogBase": 1, - "leftMin": 0, - "rightLogBase": 1 - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 22 - }, - "hiddenSeries": false, - "id": 1020, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [ - { - "targetBlank": true, - "title": "MongoDB Instance Summary - $service_name", - "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=$service_name$__url_time_range" - } - ], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "paceLength": 10, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": "service_name", - "repeatDirection": "h", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "avg by (service_name,type) (rate(mongodb_op_counters_repl_total{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_op_counters_repl_total{service_name=~\"$service_name\"}[5m]))", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "repl - {{type}}", - "refId": "A", - "step": 300 - }, - { - "expr": "avg by (service_name,type) (rate(mongodb_mongod_op_counters_repl_total{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_mongod_op_counters_repl_total{service_name=~\"$service_name\"}[5m]))", - "interval": "$interval", - "legendFormat": "repl - {{type}}", - "refId": "B" - }, - { - "expr": "avg by (service_name,type) (rate(mongodb_op_counters_total{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_op_counters_total{service_name=~\"$service_name\"}[5m]))", - "interval": "$interval", - "legendFormat": "{{type}}", - "refId": "C" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Operations - $service_name", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 5, - "value_type": "cumulative" - }, - "type": "graph", - "x-axis": true, - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "y-axis": true, - "y_formats": [ - "short", - "short" - ], - "yaxes": [ + "panels": [ { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Metrics", "decimals": 2, - "format": "ops", - "label": "", - "logBase": 1, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 30 - }, - "id": 1170, - "panels": [], - "title": "Max Member Ping Time", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "This metric can show a correlation with the replication lag value.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { + "description": "Operations are classified by legacy wire protocol type (insert, update, and delete only).", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "MongoDB Instance Summary - ${__field.labels.service_name}", + "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__field.labels.service_name}&$__url_time_range" + } + ] + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMin": 0, + "rightLogBase": 1 + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 35 + }, + "hiddenSeries": false, + "id": 1020, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, "links": [ { "targetBlank": true, - "title": "MongoDB Instance Summary - ${__field.labels.service_name}", - "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__field.labels.service_name}&$__url_time_range" + "title": "MongoDB Instance Summary - $service_name", + "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=$service_name$__url_time_range" } - ] - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 0, - "grid": { - "leftLogBase": 1, - "leftMin": 0, - "rightLogBase": 1 - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 31 - }, - "hiddenSeries": false, - "id": 13, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": true, - "min": false, - "show": true, - "sort": "max", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "paceLength": 10, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": "service_name", - "repeatDirection": "h", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "avg by (service_name,name,state) (mongodb_mongod_replset_member_ping_ms{service_name=~\"$service_name\"})\n* on (name) group_right(state) avg by (service_name,state,name) ((max_over_time(mongodb_mongod_replset_my_name[$interval]) or max_over_time(mongodb_mongod_replset_my_name[5m])))", - "format": "time_series", - "hide": true, - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{service_name}} - {{name}} - {{state}}", - "refId": "A", - "step": 300 - }, - { - "expr": "max by (service_name,name,state) (mongodb_mongod_replset_member_ping_ms{set=~\"$replset\",service_name=~\"$service_name\"}) or mongodb_rs_members_pingMs{service_name=~\"$service_name\", member_state!=\"\"}", - "hide": true, - "interval": "$interval", - "legendFormat": "{{service_name}} - {{name}} - {{state}}", - "refId": "B" - }, - { - "expr": "max by (service_name,name,state) (mongodb_mongod_replset_member_ping_ms{set=~\"$replset\",service_name=~\"$service_name\"} or label_replace(label_replace(mongodb_rs_members_pingMs{service_name=~\"$service_name\", member_state!=\"\"},\"state\", \"$1\", \"member_state\", \"(.*)\"),\"name\", \"$1\", \"member_idx\", \"(.*)\"))", - "interval": "$interval", - "legendFormat": "{{service_name}} - {{name}}{{member_idx}} - {{state}}{{member_state}}", - "refId": "D" + ], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": "service_name", + "repeatDirection": "h", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (service_name,type) (rate(mongodb_op_counters_repl_total{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_op_counters_repl_total{service_name=~\"$service_name\"}[5m]))", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "repl - {{type}}", + "refId": "A", + "step": 300 + }, + { + "datasource": "Metrics", + "expr": "avg by (service_name,type) (rate(mongodb_mongod_op_counters_repl_total{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_mongod_op_counters_repl_total{service_name=~\"$service_name\"}[5m]))", + "interval": "$interval", + "legendFormat": "repl - {{type}}", + "refId": "B" + }, + { + "datasource": "Metrics", + "expr": "avg by (service_name,type) (rate(mongodb_op_counters_total{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_op_counters_total{service_name=~\"$service_name\"}[5m]))", + "interval": "$interval", + "legendFormat": "{{type}}", + "refId": "C" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Operations - $service_name", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 5, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "decimals": 2, + "format": "ops", + "label": "", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } } ], - "thresholds": [], - "timeRegions": [], - "title": "Max Member Ping Time - $service_name", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 5, - "value_type": "cumulative" - }, - "type": "graph", - "x-axis": true, - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "y-axis": true, - "y_formats": [ - "ms", - "short" - ], - "yaxes": [ - { - "decimals": 2, - "format": "ms", - "label": "", - "logBase": 1, - "min": 0, - "show": true - }, + "targets": [ { - "format": "short", - "logBase": 1, - "show": false + "datasource": "Metrics", + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "Operations", + "type": "row" }, { - "collapsed": false, + "collapsed": true, + "datasource": "Metrics", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 39 - }, - "id": 1017, - "panels": [], - "title": "Max Heartbeat Time / Elections", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "Time span between now and last heartbeat from replicaset members.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "links": [ - { - "targetBlank": true, - "title": "MongoDB Instance Summary - ${__series.name}", - "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__series.name}$&$__url_time_range" - } - ] - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 0, - "grid": { - "leftLogBase": 1, - "leftMin": 0, - "rightLogBase": 1 - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 40 - }, - "hiddenSeries": false, - "id": 75, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "paceLength": 10, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "time() - avg by (service_name) (max(mongodb_mongod_replset_member_last_heartbeat{service_name=~\"$service_name\"}) by (name)) * on (name) group_right avg by (service_name) (mongodb_mongod_replset_my_name{service_name=~\"$service_name\"})", - "hide": false, - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{service_name}}", - "metric": "", - "refId": "J", - "step": 300 - }, - { - "expr": "avg by (service_name) (max(mongodb_rs_heartbeatIntervalMillis{service_name=~\"$service_name\"}) by (name) / 1000) * on (name) group_right avg by (service_name) (mongodb_mongod_replset_my_name{service_name=~\"$service_name\"})", - "hide": true, - "interval": "$interval", - "legendFormat": "Interval - {service_name}}", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Max Heartbeat Time", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 5, - "value_type": "individual" - }, - "type": "graph", - "x-axis": true, - "xaxis": { - "mode": "time", - "show": true, - "values": [] + "y": 14 }, - "y-axis": true, - "y_formats": [ - "s", - "short" - ], - "yaxes": [ + "id": 1170, + "panels": [ { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Metrics", "decimals": 2, - "format": "s", - "label": "", - "logBase": 1, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "Count of elections. Usually zero; 1 count by each healthy node will appear in each election. Happens when the primary role changes due to either normal maintenance or trouble events.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "links": [ + "description": "This metric can show a correlation with the replication lag value.", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "MongoDB Instance Summary - ${__field.labels.service_name}", + "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__field.labels.service_name}&$__url_time_range" + } + ] + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMin": 0, + "rightLogBase": 1 + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 36 + }, + "hiddenSeries": false, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": true, + "min": false, + "show": true, + "sort": "max", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": "service_name", + "repeatDirection": "h", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (service_name,name,state) (mongodb_mongod_replset_member_ping_ms{service_name=~\"$service_name\"})\n* on (name) group_right(state) avg by (service_name,state,name) ((max_over_time(mongodb_mongod_replset_my_name[$interval]) or max_over_time(mongodb_mongod_replset_my_name[5m])))", + "format": "time_series", + "hide": true, + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{service_name}} - {{name}} - {{state}}", + "refId": "A", + "step": 300 + }, + { + "datasource": "Metrics", + "expr": "max by (service_name,name,state) (mongodb_mongod_replset_member_ping_ms{set=~\"$replset\",service_name=~\"$service_name\"}) or mongodb_rs_members_pingMs{service_name=~\"$service_name\", member_state!=\"\"}", + "hide": true, + "interval": "$interval", + "legendFormat": "{{service_name}} - {{name}} - {{state}}", + "refId": "B" + }, + { + "datasource": "Metrics", + "expr": "max by (service_name,name,state) (mongodb_mongod_replset_member_ping_ms{set=~\"$replset\",service_name=~\"$service_name\"} or label_replace(label_replace(mongodb_rs_members_pingMs{service_name=~\"$service_name\", member_state!=\"\"},\"state\", \"$1\", \"member_state\", \"(.*)\"),\"name\", \"$1\", \"member_idx\", \"(.*)\"))", + "interval": "$interval", + "legendFormat": "{{service_name}} - {{name}}{{member_idx}} - {{state}}{{member_state}}", + "refId": "D" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Max Member Ping Time - $service_name", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 5, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "ms", + "short" + ], + "yaxes": [ + { + "decimals": 2, + "format": "ms", + "label": "", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "targets": [ + { + "datasource": "Metrics", + "refId": "A" + } + ], + "title": "Max Member Ping Time", + "type": "row" + }, + { + "collapsed": true, + "datasource": "Metrics", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 1017, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Metrics", + "decimals": 2, + "description": "Time span between now and last heartbeat from replicaset members.", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "MongoDB Instance Summary - ${__series.name}", + "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__series.name}$&$__url_time_range" + } + ] + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMin": 0, + "rightLogBase": 1 + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 37 + }, + "hiddenSeries": false, + "id": 75, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "Metrics", + "expr": "time() - avg by (service_name) (max(mongodb_mongod_replset_member_last_heartbeat{service_name=~\"$service_name\"}) by (name)) * on (name) group_right avg by (service_name) (mongodb_mongod_replset_my_name{service_name=~\"$service_name\"})", + "hide": false, + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{service_name}}", + "metric": "", + "refId": "J", + "step": 300 + }, + { + "datasource": "Metrics", + "expr": "avg by (service_name) (max(mongodb_rs_heartbeatIntervalMillis{service_name=~\"$service_name\"}) by (name) / 1000) * on (name) group_right avg by (service_name) (mongodb_mongod_replset_my_name{service_name=~\"$service_name\"})", + "hide": true, + "interval": "$interval", + "legendFormat": "Interval - {service_name}}", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Max Heartbeat Time", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 5, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "s", + "short" + ], + "yaxes": [ + { + "decimals": 2, + "format": "s", + "label": "", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Metrics", + "decimals": 2, + "description": "Count of elections. Usually zero; 1 count by each healthy node will appear in each election. Happens when the primary role changes due to either normal maintenance or trouble events.", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "MongoDB Instance Summary - ${__series.name}", + "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__series.name}$&$__url_time_range" + } + ] + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMin": 0, + "rightLogBase": 1 + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 37 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "Metrics", + "expr": "max by (service_name) (changes(mongodb_mongod_replset_member_election_date{service_name=~\"$service_name\"}[$interval]))", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{service_name}}", + "refId": "A", + "step": 300 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Elections", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 5, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "decimals": 2, + "format": "short", + "label": "", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + } + ], + "targets": [ + { + "datasource": "Metrics", + "refId": "A" + } + ], + "title": "Max Heartbeat Time / Elections", + "type": "row" + }, + { + "collapsed": true, + "datasource": "Metrics", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 16 + }, + "id": 1547, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Metrics", + "decimals": 2, + "description": "Timespan 'window' between newest and the oldest op in the Oplog collection.", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "MongoDB Instance Summary - ${__field.labels.service_name}", + "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__field.labels.service_name}&$__url_time_range" + } + ] + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "grid": { + "leftLogBase": 1, + "leftMin": 0, + "rightLogBase": 1 + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 38 + }, + "hiddenSeries": false, + "id": 27, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": "service_name", + "repeatDirection": "h", + "seriesOverrides": [ + { + "alias": "Oplog Range", + "yaxis": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "Metrics", + "expr": "time()-avg by (service_name) (mongodb_mongod_replset_oplog_tail_timestamp{service_name=~\"$service_name\"})", + "hide": false, + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Now to End", + "metric": "", + "refId": "J", + "step": 300 + }, { - "targetBlank": true, - "title": "MongoDB Instance Summary - ${__series.name}", - "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__series.name}$&$__url_time_range" + "datasource": "Metrics", + "expr": "avg by (service_name) (mongodb_mongod_replset_oplog_head_timestamp{service_name=~\"$service_name\"}-mongodb_mongod_replset_oplog_tail_timestamp{service_name=~\"$service_name\"})", + "hide": false, + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Oplog Range", + "metric": "", + "refId": "A", + "step": 300 } - ] - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 0, - "grid": { - "leftLogBase": 1, - "leftMin": 0, - "rightLogBase": 1 - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 40 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "paceLength": 10, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by (service_name) (changes(mongodb_mongod_replset_member_election_date{service_name=~\"$service_name\"}[$interval]))", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{service_name}}", - "refId": "A", - "step": 300 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Elections", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 5, - "value_type": "cumulative" - }, - "type": "graph", - "x-axis": true, - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "y-axis": true, - "y_formats": [ - "short", - "short" - ], - "yaxes": [ - { - "decimals": 2, - "format": "short", - "label": "", - "logBase": 1, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 48 - }, - "id": 1547, - "panels": [], - "title": "Oplog Recovery Window", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "Timespan 'window' between newest and the oldest op in the Oplog collection.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "links": [ + ], + "thresholds": [], + "timeRegions": [], + "title": "Oplog Recovery Window - $service_name", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 5, + "value_type": "cumulative" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "s", + "short" + ], + "yaxes": [ { - "targetBlank": true, - "title": "MongoDB Instance Summary - ${__field.labels.service_name}", - "url": "/graph/d/mongodb-instance-summary/mongodb-instance-summary?var-service_name=${__field.labels.service_name}&$__url_time_range" + "decimals": 2, + "format": "s", + "label": "", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "s", + "logBase": 1, + "show": true } - ] - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 0, - "grid": { - "leftLogBase": 1, - "leftMin": 0, - "rightLogBase": 1 - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 49 - }, - "hiddenSeries": false, - "id": 27, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "paceLength": 10, - "percentage": false, - "pluginVersion": "8.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": "service_name", - "repeatDirection": "h", - "seriesOverrides": [ - { - "alias": "Oplog Range", - "yaxis": 2 + ], + "yaxis": { + "align": false + } } ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { - "expr": "time()-avg by (service_name) (mongodb_mongod_replset_oplog_tail_timestamp{service_name=~\"$service_name\"})", - "hide": false, - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Now to End", - "metric": "", - "refId": "J", - "step": 300 - }, - { - "expr": "avg by (service_name) (mongodb_mongod_replset_oplog_head_timestamp{service_name=~\"$service_name\"}-mongodb_mongod_replset_oplog_tail_timestamp{service_name=~\"$service_name\"})", - "hide": false, - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Oplog Range", - "metric": "", - "refId": "A", - "step": 300 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Oplog Recovery Window - $service_name", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 5, - "value_type": "cumulative" - }, - "type": "graph", - "x-axis": true, - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "y-axis": true, - "y_formats": [ - "s", - "short" - ], - "yaxes": [ - { - "decimals": 2, - "format": "s", - "label": "", - "logBase": 1, - "min": 0, - "show": true - }, - { - "format": "s", - "logBase": 1, - "show": true + "datasource": "Metrics", + "refId": "A" } ], - "yaxis": { - "align": false - } + "title": "Oplog Recovery Window", + "type": "row" }, { "collapsed": true, + "datasource": "Metrics", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 57 + "y": 17 }, "id": 1070, "panels": [ @@ -1490,6 +1576,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "Repl buffer ops applied per sec.", "editable": true, @@ -1517,7 +1604,7 @@ "h": 8, "w": 12, "x": 0, - "y": 60 + "y": 100 }, "hiddenSeries": false, "id": 85, @@ -1553,6 +1640,7 @@ "steppedLine": false, "targets": [ { + "datasource": "Metrics", "expr": "avg by (service_name) (mongodb_mongod_metrics_repl_buffer_count{service_name=~\"$service_name\"})", "interval": "$interval", "intervalFactor": 1, @@ -1606,6 +1694,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "Time spent per second waiting for or fetching oplog docs in replication.", "editable": true, @@ -1633,7 +1722,7 @@ "h": 8, "w": 12, "x": 12, - "y": 60 + "y": 100 }, "hiddenSeries": false, "id": 79, @@ -1669,6 +1758,7 @@ "steppedLine": false, "targets": [ { + "datasource": "Metrics", "expr": "avg by (service_name) (rate(mongodb_mongod_metrics_repl_network_getmores_total_milliseconds{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_mongod_metrics_repl_network_getmores_total_milliseconds{service_name=~\"$service_name\"}[5m]))", "interval": "$interval", "intervalFactor": 1, @@ -1722,6 +1812,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "Times spent per second A) pre-loading oplog ops into parallel-executable batches B) Times spent pre-loading index values and C) repl batch apply phase.", "editable": true, @@ -1749,7 +1840,7 @@ "h": 8, "w": 24, "x": 0, - "y": 68 + "y": 108 }, "hiddenSeries": false, "id": 84, @@ -1786,6 +1877,7 @@ "steppedLine": false, "targets": [ { + "datasource": "Metrics", "expr": "avg by (service_name) (rate(mongodb_mongod_metrics_repl_preload_docs_total_milliseconds{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_mongod_metrics_repl_preload_docs_total_milliseconds{service_name=~\"$service_name\"}[5m]))", "interval": "$interval", "intervalFactor": 1, @@ -1794,6 +1886,7 @@ "step": 300 }, { + "datasource": "Metrics", "expr": "avg by (service_name) (rate(mongodb_mongod_metrics_repl_preload_indexes_total_milliseconds{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_mongod_metrics_repl_preload_indexes_total_milliseconds{service_name=~\"$service_name\"}[5m]))", "interval": "$interval", "intervalFactor": 1, @@ -1803,6 +1896,7 @@ "step": 300 }, { + "datasource": "Metrics", "expr": "avg by (service_name) (rate(mongodb_mongod_metrics_repl_apply_batches_total_milliseconds{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_mongod_metrics_repl_apply_batches_total_milliseconds{service_name=~\"$service_name\"}[5m]))", "interval": "$interval", "intervalFactor": 1, @@ -1857,6 +1951,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "Current hard-coded max and actual size of repl batch buffer.", "editable": true, @@ -1884,7 +1979,7 @@ "h": 8, "w": 24, "x": 0, - "y": 76 + "y": 116 }, "hiddenSeries": false, "id": 80, @@ -1927,6 +2022,7 @@ "steppedLine": false, "targets": [ { + "datasource": "Metrics", "expr": "avg by (service_name) (mongodb_mongod_metrics_repl_buffer_size_bytes{service_name=~\"$service_name\"})", "interval": "$interval", "intervalFactor": 1, @@ -1935,6 +2031,7 @@ "step": 300 }, { + "datasource": "Metrics", "expr": "avg by (service_name) (mongodb_mongod_metrics_repl_buffer_max_size_bytes{service_name=~\"$service_name\"})", "interval": "$interval", "intervalFactor": 1, @@ -1988,6 +2085,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "Count of A) getmores executed B) index values pre-loaded C) oplog docs applied per second against oplog collection in replication.", "editable": true, @@ -2015,7 +2113,7 @@ "h": 8, "w": 24, "x": 0, - "y": 84 + "y": 124 }, "hiddenSeries": false, "id": 81, @@ -2052,6 +2150,7 @@ "steppedLine": false, "targets": [ { + "datasource": "Metrics", "expr": "avg by (service_name) (rate(mongodb_mongod_metrics_repl_preload_docs_num_total{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_mongod_metrics_repl_preload_docs_num_total{service_name=~\"$service_name\"}[5m]))", "interval": "$interval", "intervalFactor": 1, @@ -2061,6 +2160,7 @@ "step": 300 }, { + "datasource": "Metrics", "expr": "avg by (service_name) (rate(mongodb_mongod_metrics_repl_preload_indexes_num_total{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_mongod_metrics_repl_preload_indexes_num_total{service_name=~\"$service_name\"}[5m]))", "interval": "$interval", "intervalFactor": 1, @@ -2070,6 +2170,7 @@ "step": 300 }, { + "datasource": "Metrics", "expr": "avg by (service_name) (rate(mongodb_mongod_metrics_repl_apply_ops_total{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_mongod_metrics_repl_apply_ops_total{service_name=~\"$service_name\"}[5m]))", "interval": "$interval", "intervalFactor": 2, @@ -2119,40 +2220,43 @@ } } ], + "targets": [ + { + "datasource": "Metrics", + "refId": "A" + } + ], "title": "Oplog Details", "type": "row" }, { "collapsed": true, + "datasource": "Metrics", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 58 + "y": 18 }, "id": 1306, "panels": [ { "collapsed": false, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 61 - }, - "id": 1352, - "pluginVersion": "9.2.20", + "datasource": "Metrics", "default_title_for_rows": "Service Name", - "title": "Services Details", - "type": "table", "fieldConfig": { "defaults": { + "color": { + "fixedColor": "text", + "mode": "thresholds" + }, "custom": { "align": "center", "displayMode": "auto", - "inspect": false, - "filterable": false + "filterable": false, + "inspect": false }, + "decimals": 2, "mappings": [ { "options": { @@ -2169,25 +2273,19 @@ "type": "value" } ], + "noValue": "-", "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", "value": 80 } ] - }, - "color": { - "fixedColor": "text", - "mode": "thresholds" - }, - "noValue": "-", - "decimals": 2 + } }, "overrides": [ { @@ -2263,55 +2361,27 @@ } ] }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 101 + }, + "id": 1352, "options": { - "showHeader": true, "footer": { "show": false - } - }, - "transformations": [ - { - "id": "merge", - "options": {} }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "agent_id": true, - "agent_type": true, - "environment": true, - "instance": true, - "job": true, - "machine_id": true, - "node_id": true, - "node_name": true, - "node_type": true, - "service_name": false - }, - "indexByName": { - "Time": 0, - "Value #A": 6, - "Value #B": 4, - "Value #C": 3, - "Value #D": 5, - "Value #E": 2, - "service_name": 1 - }, - "renameByName": { - "Value #A": "QPS", - "Value #B": "Average Latency", - "Value #C": "Uptime", - "Value #D": "Open Connections", - "Value #E": "Cursors", - "service_name": "Service Name" - } - } - } - ], + "showHeader": true + }, + "pluginVersion": "9.2.20", + "sorting_props": { + "col_index": -1, + "direction": "desc" + }, "targets": [ { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "avg by (service_name) (mongodb_instance_uptime_seconds{service_name=~\"$service_name\"})", @@ -2323,6 +2393,7 @@ "refId": "C" }, { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "sum by (service_name) (rate(mongodb_mongod_op_counters_total{service_name=~\"$service_name\",type!=\"command\"}[$interval]) or irate(mongodb_mongod_op_counters_total{service_name=~\"$service_name\",type!=\"command\"}[5m]) or rate(mongodb_op_counters_total{service_name=~\"$service_name\",type!=\"command\"}[$interval]) or irate(mongodb_op_counters_total{service_name=~\"$service_name\",type!=\"command\"}[5m]))", @@ -2335,6 +2406,7 @@ "refId": "A" }, { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "avg by (service_name) (rate(mongodb_mongod_op_latencies_latency_total{service_name=~\"$service_name\",type=\"command\"}[$interval]) / (rate(mongodb_mongod_op_latencies_ops_total{service_name=~\"$service_name\",type=\"command\"}[$interval]) > 0) or\nirate(mongodb_mongod_op_latencies_latency_total{service_name=~\"$service_name\",type=\"command\"}[5m]) / (irate(mongodb_mongod_op_latencies_ops_total{service_name=~\"$service_name\",type=\"command\"}[5m]) > 0))", @@ -2346,6 +2418,7 @@ "refId": "B" }, { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "avg by (service_name) (max_over_time(mongodb_mongod_connections{service_name=~\"$service_name\", state=\"current\"}[$interval]) or \nmax_over_time(mongodb_mongod_connections{service_name=~\"$service_name\", state=\"current\"}[5m]) or\nmax_over_time(mongodb_mongos_connections{service_name=~\"$service_name\", state=\"current\"}[$interval]) or\nmax_over_time(mongodb_mongos_connections{service_name=~\"$service_name\", state=\"current\"}[5m]) or\nmax_over_time(mongodb_connections{service_name=~\"$service_name\", state=\"current\"}[$interval]) or\nmax_over_time(mongodb_connections{service_name=~\"$service_name\", state=\"current\"}[5m]))", @@ -2357,6 +2430,7 @@ "refId": "D" }, { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "avg by (service_name) (max_over_time(mongodb_mongod_metrics_cursor_open{service_name=~\"$service_name\",state=\"total\"}[$interval]) or\nmax_over_time(mongodb_mongod_metrics_cursor_open{service_name=~\"$service_name\",state=\"total\"}[5m]) or\nmax_over_time(mongodb_mongod_cursors{service_name=~\"$service_name\",state=\"total\"}[$interval]) or\nmax_over_time(mongodb_mongod_cursors{service_name=~\"$service_name\",state=\"total\"}[5m]) or\nmax_over_time(mongodb_mongos_metrics_cursor_open{service_name=~\"$service_name\",state=\"total\"}[$interval]) or \nmax_over_time(mongodb_mongos_metrics_cursor_open{service_name=~\"$service_name\",state=\"total\"}[5m]) or\nmax_over_time(mongodb_mongos_cursors{service_name=~\"$service_name\",state=\"total\"}[$interval]) or\nmax_over_time(mongodb_mongos_cursors{service_name=~\"$service_name\",state=\"total\"}[5m]))", @@ -2367,16 +2441,56 @@ "refId": "E" } ], - "sorting_props": { - "col_index": -1, - "direction": "desc" - } + "title": "Services Details", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "agent_id": true, + "agent_type": true, + "environment": true, + "instance": true, + "job": true, + "machine_id": true, + "node_id": true, + "node_name": true, + "node_type": true, + "service_name": false + }, + "indexByName": { + "Time": 0, + "Value #A": 6, + "Value #B": 4, + "Value #C": 3, + "Value #D": 5, + "Value #E": 2, + "service_name": 1 + }, + "renameByName": { + "Value #A": "QPS", + "Value #B": "Average Latency", + "Value #C": "Uptime", + "Value #D": "Open Connections", + "Value #E": "Cursors", + "service_name": "Service Name" + } + } + } + ], + "type": "table" }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "Average latency of operations (classified by read, write, or (other) command).", "editable": true, @@ -2398,7 +2512,7 @@ "h": 8, "w": 24, "x": 0, - "y": 67 + "y": 107 }, "height": "250px", "hiddenSeries": false, @@ -2437,6 +2551,7 @@ "steppedLine": false, "targets": [ { + "datasource": "Metrics", "expr": "avg by (service_name,type) (rate(mongodb_mongod_op_latencies_latency_total{service_name=~\"$service_name\"}[$interval]) / (rate(mongodb_mongod_op_latencies_ops_total{service_name=~\"$service_name\"}[$interval]) > 0) or irate(mongodb_mongod_op_latencies_latency_total{service_name=~\"$service_name\"}[5m]) / (irate(mongodb_mongod_op_latencies_ops_total{service_name=~\"$service_name\"}[5m]) > 0))", "format": "time_series", "hide": false, @@ -2492,6 +2607,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "Docs per second inserted, updated, deleted or returned. (N.b. not 1-to-1 with operation counts.)", "editable": true, @@ -2513,7 +2629,7 @@ "h": 8, "w": 24, "x": 0, - "y": 75 + "y": 115 }, "height": "250px", "hiddenSeries": false, @@ -2552,6 +2668,7 @@ "steppedLine": false, "targets": [ { + "datasource": "Metrics", "expr": "avg by (service_name,state) (rate(mongodb_mongod_metrics_document_total{service_name=~\"$service_name\"}[$interval]) or \nirate(mongodb_mongod_metrics_document_total{service_name=~\"$service_name\"}[5m]))", "format": "time_series", "hide": false, @@ -2607,6 +2724,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "MongoDB keeps most recently used data in RAM. If you have created indexes for your queries and your working data set fits in RAM, MongoDB serves all queries from memory.", "editable": true, @@ -2628,7 +2746,7 @@ "h": 8, "w": 24, "x": 0, - "y": 83 + "y": 123 }, "height": "250px", "hiddenSeries": false, @@ -2667,6 +2785,7 @@ "steppedLine": false, "targets": [ { + "datasource": "Metrics", "expr": "rate(mongodb_tcmalloc_cache_bytes{service_name=~\"$service_name\"}[$interval]) or irate(mongodb_tcmalloc_cache_bytes{service_name=~\"$service_name\"}[5m])", "format": "time_series", "hide": false, @@ -2677,18 +2796,21 @@ "step": 300 }, { + "datasource": "Metrics", "expr": "avg by (service_name) (mongodb_ss_tcmalloc_tcmalloc_thread_cache_free_bytes{service_name=~\"$service_name\"})", "interval": "$interval", "legendFormat": "Free Thread Cache", "refId": "A" }, { + "datasource": "Metrics", "expr": "avg by (service_name) (mongodb_ss_tcmalloc_tcmalloc_central_cache_free_bytes{service_name=~\"$service_name\"})", "interval": "$interval", "legendFormat": "Free Central Cache", "refId": "B" }, { + "datasource": "Metrics", "expr": "avg by (service_name) (mongodb_ss_tcmalloc_tcmalloc_transfer_cache_free_bytes{service_name=~\"$service_name\"})", "interval": "$interval", "legendFormat": "Free Transfer Cache", @@ -2736,41 +2858,44 @@ } } ], + "targets": [ + { + "datasource": "Metrics", + "refId": "A" + } + ], "title": "MongoDB Services Summary", "type": "row" }, { "collapsed": true, + "datasource": "Metrics", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 59 + "y": 19 }, "id": 1403, "panels": [ { "collapsed": false, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 62 - }, - "id": 1435, - "pluginVersion": "9.2.20", + "datasource": "Metrics", "default_title_for_rows": "Node Name", - "title": "Nodes Overview", - "type": "table", "fieldConfig": { "defaults": { + "color": { + "fixedColor": "text", + "mode": "thresholds" + }, "custom": { "align": "center", "displayMode": "auto", - "inspect": false, "filterable": false, + "inspect": false, "width": 100 }, + "decimals": 2, "mappings": [ { "options": { @@ -2787,6 +2912,7 @@ "type": "value" } ], + "noValue": "-", "thresholds": { "mode": "absolute", "steps": [ @@ -2803,13 +2929,7 @@ "value": 20 } ] - }, - "color": { - "fixedColor": "text", - "mode": "thresholds" - }, - "decimals": 2, - "noValue": "-" + } }, "overrides": [ { @@ -2933,60 +3053,31 @@ } ] }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 1435, "options": { - "showHeader": true, "footer": { + "fields": "", + "reducer": [ + "sum" + ], "show": false - } - }, - "transformations": [ - { - "id": "merge", - "options": {} }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "agent_id": true, - "agent_type": true, - "environment": true, - "instance": true, - "job": true, - "machine_id": true, - "node_id": true, - "node_name": false, - "node_type": true, - "service_name": false - }, - "indexByName": { - "Time": 0, - "Value #A": 3, - "Value #B": 5, - "Value #C": 6, - "Value #D": 2, - "Value #E": 8, - "Value #F": 4, - "Value #G": 7, - "node_name": 1 - }, - "renameByName": { - "Value #A": "Uptime", - "Value #B": "Load Average", - "Value #C": "Memory Available", - "Value #D": "RAM", - "Value #E": "Virtual Memory", - "Value #F": "Disk Space", - "Value #G": "Min Space Available", - "node_name": "Node Name", - "service_name": "Service Name" - } - } - } - ], + "showHeader": true + }, + "pluginVersion": "9.2.20", + "sorting_props": { + "col_index": -1, + "direction": "desc" + }, "targets": [ { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "avg by (node_name) (time() - container_start_time_seconds{node_name=~\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}) or avg by (node_name) ((node_time_seconds{node_name=~\"$node_name\"} - node_boot_time_seconds{node_name=~\"$node_name\"}) or (time() - node_boot_time_seconds{node_name=~\"$node_name\"}))", @@ -2998,6 +3089,7 @@ "refId": "A" }, { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "max by (node_name) (avg_over_time(node_load1{node_name=~\"$node_name\"}[$interval]) or avg_over_time(node_load1{node_name=~\"$node_name\"}[5m]))", @@ -3009,6 +3101,7 @@ "refId": "B" }, { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "clamp_max(avg by (node_name) (container_memory_usage_bytes{node_name=~\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|backup-agent|\"} * 100 / container_spec_memory_limit_bytes{node_name=~\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|backup-agent|\"}),100) or avg by (node_name) ((node_memory_MemAvailable_bytes{node_name=~\"$node_name\"} or (node_memory_MemFree_bytes{node_name=~\"$node_name\"} + node_memory_Buffers_bytes{node_name=~\"$node_name\"} + node_memory_Cached_bytes{node_name=~\"$node_name\"})) / node_memory_MemTotal_bytes{node_name=~\"$node_name\"} * 100)", @@ -3020,6 +3113,7 @@ "refId": "C" }, { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "max by (node_name) (container_spec_memory_limit_bytes{node_name=~\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}) or avg by (node_name) (node_memory_MemTotal_bytes{node_name=~\"$node_name\"})", @@ -3031,6 +3125,7 @@ "refId": "D" }, { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "max by (node_name) (container_spec_memory_limit_bytes{node_name=~\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}+container_spec_memory_swap_limit_bytes{node_name=~\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}) or avg by (node_name) (node_memory_MemTotal_bytes{node_name=~\"$node_name\"}+node_memory_SwapTotal_bytes{node_name=~\"$node_name\"})", @@ -3041,6 +3136,7 @@ "refId": "E" }, { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "avg by (node_name) (sum(avg(node_filesystem_size_bytes{node_name=~\"$node_name\",fstype=~\"(ext.|xfs|vfat|)\"}) without (mountpoint)) without (device,fstype))", @@ -3051,6 +3147,7 @@ "refId": "F" }, { + "datasource": "Metrics", "editorMode": "code", "exemplar": false, "expr": "min by (node_name) (node_filesystem_free_bytes{node_name=~\"$node_name\", fstype!~\"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs|shm|overlay|squashfs\"}/node_filesystem_size_bytes{node_name=~\"$node_name\", fstype!~\"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs|shm|overlay|squashfs\"})*100", @@ -3061,11 +3158,75 @@ "refId": "G" } ], - "sorting_props": { - "col_index": -1, - "direction": "desc" - } - }, + "title": "Nodes Overview", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "agent_id": true, + "agent_type": true, + "environment": true, + "instance": true, + "job": true, + "machine_id": true, + "node_id": true, + "node_name": false, + "node_type": true, + "service_name": false + }, + "indexByName": { + "Time": 0, + "Value #A": 3, + "Value #B": 5, + "Value #C": 6, + "Value #D": 2, + "Value #E": 8, + "Value #F": 4, + "Value #G": 7, + "node_name": 1 + }, + "renameByName": { + "Value #A": "Uptime", + "Value #B": "Load Average", + "Value #C": "Memory Available", + "Value #D": "RAM", + "Value #E": "Virtual Memory", + "Value #F": "Disk Space", + "Value #G": "Min Space Available", + "node_name": "Node Name", + "service_name": "Service Name" + } + } + } + ], + "type": "table" + } + ], + "targets": [ + { + "datasource": "Metrics", + "refId": "A" + } + ], + "title": "Nodes Summary", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 1569, + "panels": [ { "aliasColors": { "Max Core Utilization": "#bf1b00", @@ -3080,6 +3241,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "The CPU time is measured in clock ticks or seconds. It is useful to measure CPU time as a percentage of the CPU's capacity, which is called the CPU usage.", "editable": true, @@ -3095,9 +3257,9 @@ "grid": {}, "gridPos": { "h": 8, - "w": 24, + "w": 8, "x": 0, - "y": 68 + "y": 10 }, "height": "", "hiddenSeries": false, @@ -3126,7 +3288,7 @@ }, "paceLength": 10, "percentage": false, - "pluginVersion": "8.3.5", + "pluginVersion": "9.2.20", "pointradius": 5, "points": false, "renderer": "flot", @@ -3146,6 +3308,7 @@ "steppedLine": true, "targets": [ { + "datasource": "Metrics", "expr": "avg by (node_name,mode) (clamp_max(((avg by (mode) ( (clamp_max(rate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\", mode!=\"user\", mode!=\"system\"}[$interval]),1)) or (clamp_max(irate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\", mode!=\"user\", mode!=\"system\"}[5m]),1)) ))*100 or (avg_over_time(node_cpu_average{node_name=~\"$node_name\", mode!=\"total\", mode!=\"idle\", mode!=\"user\", mode!=\"system\"}[$interval]) or avg_over_time(node_cpu_average{node_name=~\"$node_name\", mode!=\"total\", mode!=\"idle\", mode!=\"user\", mode!=\"system\"}[5m]))),100))", "format": "time_series", "interval": "$interval", @@ -3154,6 +3317,7 @@ "refId": "B" }, { + "datasource": "Metrics", "expr": "clamp_max(sum(rate(container_cpu_usage_seconds_total{node_name=~\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}[$interval]) or rate(container_cpu_usage_seconds_total{node_name=\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}[5m])) or\nmax by () (sum by (cpu) ( (clamp_max(rate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[$interval]),1)) or (clamp_max(irate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[5m]),1)) )),1)", "format": "time_series", "hide": true, @@ -3163,6 +3327,7 @@ "refId": "C" }, { + "datasource": "Metrics", "exemplar": true, "expr": "clamp_max(avg(rate(container_cpu_system_seconds_total{node_name=~\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}[$interval])) or \n((avg by () ((clamp_max(rate(node_cpu_seconds_total{node_name=~\"$node_name\",mode=\"system\"}[$interval]),1)) or (clamp_max(irate(node_cpu_seconds_total{node_name=~\"$node_name\",mode=\"system\"}[5m]),1)) ))*100 or \n(avg_over_time(node_cpu_average{node_name=~\"$node_name\", mode=\"system\"}[$interval]) or \navg_over_time(node_cpu_average{node_name=~\"$node_name\", mode=\"system\"}[5m]))),100)", "hide": false, @@ -3171,6 +3336,7 @@ "refId": "A" }, { + "datasource": "Metrics", "exemplar": true, "expr": "clamp_max(avg(rate(container_cpu_user_seconds_total{node_name=~\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}[$interval])) or \n((avg by () ((clamp_max(rate(node_cpu_seconds_total{node_name=~\"$node_name\",mode=\"user\"}[$interval]),1)) or (clamp_max(irate(node_cpu_seconds_total{node_name=~\"$node_name\",mode=\"user\"}[5m]),1)) ))*100 or \n(avg_over_time(node_cpu_average{node_name=~\"$node_name\", mode=\"user\"}[$interval]) or \navg_over_time(node_cpu_average{node_name=~\"$node_name\", mode=\"user\"}[5m]))),100)", "hide": false, @@ -3214,7 +3380,21 @@ "yaxis": { "align": false } - }, + } + ], + "title": "CPU Usage", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 1571, + "panels": [ { "aliasColors": { "Allocated": "#E0752D", @@ -3228,6 +3408,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "When a system is running with maximum CPU utilization, the transmitting and receiving threads must all share the available CPU. This will cause data to be queued more frequently to cope with the lack of CPU. CPU Saturation may be measured as the length of a wait queue, or the time spent waiting on the queue.", "editable": true, @@ -3243,9 +3424,9 @@ "grid": {}, "gridPos": { "h": 8, - "w": 24, + "w": 8, "x": 0, - "y": 76 + "y": 11 }, "hiddenSeries": false, "id": 339, @@ -3272,7 +3453,7 @@ }, "paceLength": 10, "percentage": false, - "pluginVersion": "8.3.5", + "pluginVersion": "9.2.20", "pointradius": 5, "points": false, "renderer": "flot", @@ -3293,6 +3474,7 @@ "targets": [ { "calculatedInterval": "2s", + "datasource": "Metrics", "datasourceErrors": {}, "errors": {}, "expr": "((sum(avg_over_time(container_processes{node_name=~\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}[$interval]))-1) / avg by () (machine_cpu_cores)) or\navg by () ((avg_over_time(node_procs_running{node_name=~\"$node_name\"}[$interval])-1) / scalar(count(node_cpu_seconds_total{mode=\"user\", node_name=~\"$node_name\"})) or (avg_over_time(node_procs_running{node_name=~\"$node_name\"}[5m])-1) / scalar(count(node_cpu_seconds_total{mode=\"user\", node_name=~\"$node_name\"})))", @@ -3308,6 +3490,7 @@ }, { "calculatedInterval": "2s", + "datasource": "Metrics", "datasourceErrors": {}, "errors": {}, "expr": "clamp_max(sum(rate(container_cpu_usage_seconds_total{node_name=~\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}[$interval]) or rate(container_cpu_usage_seconds_total{node_name=\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}[5m])) or\nmax by () (sum by (cpu) ( (clamp_max(rate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[$interval]),1)) or (clamp_max(irate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[5m]),1)) )),1)", @@ -3356,7 +3539,21 @@ "yaxis": { "align": false } - }, + } + ], + "title": "CPU Saturation", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 1585, + "panels": [ { "aliasColors": { "Swap In (Reads)": "#6ed0e0", @@ -3366,6 +3563,7 @@ "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "Disk I/O includes read or write or input/output operations involving a physical disk. It is the speed with which the data transfer takes place between the hard disk drive and RAM.\n\nSwap Activity is memory management that involves swapping sections of memory to and from physical storage.", "editable": true, @@ -3381,9 +3579,9 @@ "grid": {}, "gridPos": { "h": 8, - "w": 24, + "w": 8, "x": 0, - "y": 84 + "y": 35 }, "hiddenSeries": false, "id": 341, @@ -3415,7 +3613,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "8.3.5", + "pluginVersion": "9.2.20", "pointradius": 5, "points": false, "renderer": "flot", @@ -3442,6 +3640,7 @@ "targets": [ { "calculatedInterval": "2s", + "datasource": "Metrics", "datasourceErrors": {}, "errors": {}, "expr": "avg by () (sum(rate(container_fs_reads_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]) or irate(container_fs_reads_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]))) or\navg by () (rate(node_vmstat_pgpgin{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgin{node_name=\"$node_name\"}[5m]) * 1024)", @@ -3456,6 +3655,7 @@ }, { "calculatedInterval": "2s", + "datasource": "Metrics", "datasourceErrors": {}, "errors": {}, "expr": "avg by () (sum(rate(container_fs_writes_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]) or irate(container_fs_writes_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]))) or\navg by () ((rate(node_vmstat_pgpgout{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgout{node_name=\"$node_name\"}[5m]) * 1024))", @@ -3469,6 +3669,7 @@ "target": "" }, { + "datasource": "Metrics", "expr": "avg by () (sum(rate(container_fs_reads_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]) or irate(container_fs_reads_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]))) + \navg by () (sum(rate(container_fs_writes_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]) or irate(container_fs_writes_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]))) or \navg by () ((rate(node_vmstat_pgpgin{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgin{node_name=\"$node_name\"}[5m]) * 1024 ) + (rate(container_fs_writes_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]) or irate(container_fs_writes_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]))) + \navg by () (sum(rate(container_fs_writes_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]) or irate(container_fs_writes_bytes_total{node_name=\"$node_name\",id=~\"/kubepods.*\"}[5s]))) or \navg by () ((rate(node_vmstat_pgpgout{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgout{node_name=\"$node_name\"}[5m]) * 1024))", "format": "time_series", "interval": "$interval", @@ -3477,6 +3678,7 @@ "refId": "C" }, { + "datasource": "Metrics", "expr": "avg by (node_name) (rate(node_vmstat_pswpin{node_name=\"$node_name\"}[$interval]) * 4096 or irate(node_vmstat_pswpin{node_name=\"$node_name\"}[5m]) * 4096)", "format": "time_series", "interval": "$interval", @@ -3485,6 +3687,7 @@ "refId": "D" }, { + "datasource": "Metrics", "expr": "avg by () (rate(container_memory_swap{node_name=\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}[$interval]) or \nirate(container_memory_swap{node_name=\"$node_name\",id=~\"/kubepods.*\",container!~\"POD|pmm-client|\"}[5s])) or \navg by () (rate(node_vmstat_pswpout{node_name=\"$node_name\"}[$interval]) * 4096 or \nirate(node_vmstat_pswpout{node_name=\"$node_name\"}[5m]) * 4096)", "format": "time_series", "interval": "$interval", @@ -3526,12 +3729,27 @@ "yaxis": { "align": false } - }, + } + ], + "title": "Disk I/O and Swap Activity", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 23 + }, + "id": 1583, + "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, + "datasource": "Metrics", "decimals": 2, "description": "Network traffic refers to the amount of data moving across a network at a given point in time.", "editable": true, @@ -3547,9 +3765,9 @@ "grid": {}, "gridPos": { "h": 8, - "w": 24, + "w": 8, "x": 0, - "y": 92 + "y": 36 }, "hiddenSeries": false, "id": 343, @@ -3575,7 +3793,7 @@ "alertThreshold": true }, "percentage": false, - "pluginVersion": "8.3.5", + "pluginVersion": "9.2.20", "pointradius": 5, "points": false, "renderer": "flot", @@ -3593,6 +3811,7 @@ "targets": [ { "calculatedInterval": "2s", + "datasource": "Metrics", "datasourceErrors": {}, "errors": {}, "expr": "sum(rate(container_network_receive_bytes_total{node_name=\"$node_name\",id=~\"/kubepods/.*\"}[$interval]) or \nirate(container_network_receive_bytes_total{node_name=\"$node_name\",id=~\"/kubepods/.*\"}[5m])) or\nsum(rate(node_network_receive_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[$interval])) or \nsum(irate(node_network_receive_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[5m])) or \nsum(max_over_time(rdsosmetrics_network_rx{node_name=\"$node_name\"}[$interval])) or \nsum(max_over_time(rdsosmetrics_network_rx{node_name=\"$node_name\"}[5m]))", @@ -3607,6 +3826,7 @@ }, { "calculatedInterval": "2s", + "datasource": "Metrics", "datasourceErrors": {}, "errors": {}, "expr": "sum(rate(container_network_transmit_bytes_total{node_name=\"$node_name\",id=~\"/kubepods/.*\"}[$interval]) or \nirate(container_network_transmit_bytes_total{node_name=\"$node_name\",id=~\"/kubepods/.*\"}[5m])) or \nsum(rate(node_network_transmit_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[$interval])) or \nsum(irate(node_network_transmit_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[5m])) or\nsum(max_over_time(rdsosmetrics_network_tx{node_name=\"$node_name\"}[$interval])) or \nsum(max_over_time(rdsosmetrics_network_tx{node_name=\"$node_name\"}[5m]))", @@ -3655,12 +3875,12 @@ } } ], - "title": "Nodes Summary", + "title": "Network Traffic", "type": "row" } ], "refresh": "1m", - "schemaVersion": 34, + "schemaVersion": 37, "style": "dark", "tags": [ "MongoDB_HA", @@ -3736,8 +3956,8 @@ "allFormat": "blob", "current": { "selected": false, - "text": "", - "value": "" + "text": "igtest", + "value": "igtest" }, "datasource": "Metrics", "definition": "label_values(mongodb_up,cluster)", @@ -3763,8 +3983,8 @@ "allFormat": "glob", "current": { "selected": false, - "text": "", - "value": "" + "text": "shard0", + "value": "shard0" }, "datasource": "Metrics", "definition": "label_values(mongodb_mongod_replset_my_state{cluster=~\"$cluster\"}, set)", @@ -3789,16 +4009,20 @@ { "allFormat": "glob", "current": { - "selected": false, - "text": "All", - "value": "$__all" + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] }, "datasource": "Metrics", "definition": "label_values(mongodb_mongod_replset_my_state{service_name=~\"$service_name\"}, node_name)", - "hide": 2, - "includeAll": false, + "hide": 0, + "includeAll": true, "label": "Node Name", - "multi": false, + "multi": true, "multiFormat": "glob", "name": "node_name", "options": [], @@ -3817,9 +4041,13 @@ { "allFormat": "glob", "current": { - "selected": false, - "text": "All", - "value": "$__all" + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] }, "datasource": "Metrics", "definition": "", From 7dabd0de30e294559a8843d4345d5d23503d9177 Mon Sep 17 00:00:00 2001 From: Yash Sartanpara <119680679+YashSartanpara1@users.noreply.github.com> Date: Tue, 13 Aug 2024 15:00:04 +0530 Subject: [PATCH 2/2] PMM-13217 Show mongos version and rename the dashboard (#1618) * PMM-13217 Show mongos version and rename the dashboard * PMM-13217 remove current selections * PMM-13217 Trigger checks --- .../MongoDB_Cluster_Summary_(new).json | 3040 ++++++++--------- 1 file changed, 1340 insertions(+), 1700 deletions(-) diff --git a/dashboards/Experimental/MongoDB_Cluster_Summary_(new).json b/dashboards/Experimental/MongoDB_Cluster_Summary_(new).json index b96f7c811e..8b6c354f64 100644 --- a/dashboards/Experimental/MongoDB_Cluster_Summary_(new).json +++ b/dashboards/Experimental/MongoDB_Cluster_Summary_(new).json @@ -50,10 +50,10 @@ } ] }, - "editable": true, + "editable": false, "fiscalYearStartMonth": 0, "graphTooltip": 1, - "id": 73, + "id": null, "links": [ { "icon": "doc", @@ -138,66 +138,26 @@ ], "liveNow": false, "panels": [ - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 1275, - "panels": [ - { - "description": "", - "gridPos": { - "h": 4, - "w": 24, - "x": 0, - "y": 41 - }, - "id": 1277, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "#### 🛎️ Important\n\nThis Dashboard is an experimental MongoDB Instance Summary dashboard in Percona Monitoring and Management (PMM) that is not a part of the official PMM deployment and might be updated.\nWe ship this Dashboard to obtain feedback from our users. Once we officially release this Dashboard, it will be moved to the appropriate folder. \n\nTo provide feedback on the Dashboard, please use [our](https://forums.percona.com) forum.🙏", - "mode": "markdown" - }, - "pluginVersion": "9.2.20", - "transparent": true, - "type": "text" - } - ], - "title": "⚠️ Disclaimer", - "type": "row" - }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 1 + "y": 0 }, "id": 1069, "panels": [], - "targets": [ - { - "refId": "A" - } - ], "title": "Overview", "type": "row" }, { - "description": "A shard contains a subset of sharded data for a sharded cluster. Together, the cluster’s shards hold the entire data set for the cluster.", + "description": "Queries per second of all shards + config server replica set", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "fixedColor": "blue", + "mode": "fixed" }, "decimals": 0, "mappings": [], @@ -207,10 +167,6 @@ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] }, @@ -222,7 +178,7 @@ "h": 5, "w": 24, "x": 0, - "y": 2 + "y": 1 }, "id": 1227, "options": { @@ -242,7 +198,7 @@ { "editorMode": "code", "exemplar": false, - "expr": "sum by (rs_nm) (rate(mongodb_op_counters_total{environment=~\"$environment\",cluster=~\"$cluster\",type!=\"command\",rs_nm!~\"\"}[$interval]) or irate(mongodb_op_counters_total{environment=~\"$environment\",cluster=~\"$cluster\",type!=\"command\",rs_nm!~\"\"}[1s]))", + "expr": "sum by (rs_nm) (rate(mongodb_op_counters_total{environment=~\"$environment\",cluster=~\"$cluster\",type!=\"command\",rs_nm!~\"\"}[$interval]) or irate(mongodb_op_counters_total{environment=~\"$environment\",cluster=~\"$cluster\",type!=\"command\",rs_nm!~\"\"}[5s]))", "format": "time_series", "hide": false, "instant": true, @@ -250,13 +206,21 @@ "legendFormat": "{{rs_nm}} ", "range": false, "refId": "B" + }, + { + "editorMode": "code", + "expr": "(sum by (service_name) (rate(mongodb_op_counters_total{type!=\"command\"}[$interval]) or irate(mongodb_op_counters_total{type!=\"command\"}[5m])) * on (service_name) group_right avg by (service_name) (avg by (service_name) (mongodb_mongos_db_collections_total{cluster=\"$cluster\"}) / avg by (service_name) (mongodb_mongos_db_collections_total{cluster=\"$cluster\"})))", + "hide": true, + "legendFormat": "mongos", + "range": true, + "refId": "A" } ], "title": "QPS of Services in Shard", "type": "gauge" }, { - "description": "A shard contains a subset of sharded data for a sharded cluster. Together, the cluster’s shards hold the entire data set for the cluster.", + "description": "A shard contains a subset of sharded data for a sharded cluster. Together, the cluster\u2019s shards hold the entire data set for the cluster.", "fieldConfig": { "defaults": { "color": { @@ -286,7 +250,7 @@ "h": 2, "w": 2, "x": 0, - "y": 7 + "y": 6 }, "hideTimeOverride": true, "id": 36, @@ -327,7 +291,7 @@ "type": "stat" }, { - "description": "When you run removeShard, MongoDB drains the shard by using the balancer to move the shard’s chunks to other shards in the cluster. Once the shard is drained, MongoDB removes the shard from the cluster.", + "description": "Number of mongos routers registered as part of the cluster", "fieldConfig": { "defaults": { "color": { @@ -357,10 +321,10 @@ "h": 2, "w": 2, "x": 2, - "y": 7 + "y": 6 }, "hideTimeOverride": true, - "id": 1028, + "id": 1298, "links": [], "maxDataPoints": 100, "options": { @@ -384,21 +348,21 @@ "targets": [ { "editorMode": "code", - "expr": "max(mongodb_mongos_sharding_shards_draining_total{environment=~\"$environment\",cluster=~\"$cluster\"})", + "expr": "sum(group by (service_name)(mongodb_mongos_sharding_shards_total{environment=~\"$environment\",cluster=~\"$cluster\"}))", "interval": "5m", "intervalFactor": 1, - "legendFormat": "Draining Total", + "legendFormat": "__auto", "range": true, "refId": "A", "step": 300 } ], "timeFrom": "1m", - "title": "Draining Shards", + "title": "Mongos", "type": "stat" }, { - "description": "", + "description": "When you run removeShard, MongoDB drains the shard by using the balancer to move the shard\u2019s chunks to other shards in the cluster. Once the shard is drained, MongoDB removes the shard from the cluster.", "fieldConfig": { "defaults": { "color": { @@ -428,10 +392,10 @@ "h": 2, "w": 2, "x": 4, - "y": 7 + "y": 6 }, "hideTimeOverride": true, - "id": 35, + "id": 1028, "links": [], "maxDataPoints": 100, "options": { @@ -455,21 +419,21 @@ "targets": [ { "editorMode": "code", - "expr": "sum(mongodb_mongos_sharding_databases_total{environment=~\"$environment\",cluster=~\"$cluster\"})", + "expr": "max(mongodb_mongos_sharding_shards_draining_total{environment=~\"$environment\",cluster=~\"$cluster\"})", "interval": "5m", "intervalFactor": 1, - "legendFormat": "Shards", + "legendFormat": "Draining Total", "range": true, "refId": "A", "step": 300 } ], "timeFrom": "1m", - "title": "DBs", + "title": "Draining Shards", "type": "stat" }, { - "description": "MongoDB stores documents in collections. Collections are analogous to tables in relational databases.", + "description": "Total number of user-created databases", "fieldConfig": { "defaults": { "color": { @@ -497,12 +461,12 @@ }, "gridPos": { "h": 2, - "w": 3, + "w": 2, "x": 6, - "y": 7 + "y": 6 }, "hideTimeOverride": true, - "id": 10, + "id": 35, "links": [], "maxDataPoints": 100, "options": { @@ -526,7 +490,7 @@ "targets": [ { "editorMode": "code", - "expr": "max by (environment, cluster) (mongodb_ss_shardingStatistics_numShardedCollections{environment=~\"$environment\",cluster=~\"$cluster\"} or mongodb_mongos_sharding_collections_total{environment=~\"$environment\",cluster=~\"$cluster\"})", + "expr": "sum(mongodb_mongos_sharding_databases_total{environment=~\"$environment\",cluster=~\"$cluster\"})", "interval": "5m", "intervalFactor": 1, "legendFormat": "Shards", @@ -536,11 +500,11 @@ } ], "timeFrom": "1m", - "title": "Sharded Collections", + "title": "DBs", "type": "stat" }, { - "description": "A MongoDB sharded cluster deployment can contain collections that are either unsharded (the default when created) or sharded.", + "description": "Number of collections that are sharded", "fieldConfig": { "defaults": { "color": { @@ -569,11 +533,11 @@ "gridPos": { "h": 2, "w": 3, - "x": 9, - "y": 7 + "x": 8, + "y": 6 }, "hideTimeOverride": true, - "id": 1244, + "id": 10, "links": [], "maxDataPoints": 100, "options": { @@ -597,7 +561,7 @@ "targets": [ { "editorMode": "code", - "expr": "max(mongodb_mongos_sharding_databases_total{environment=~\"$environment\",cluster=~\"$cluster\", type=\"unpartitioned\"})", + "expr": "max by (environment, cluster) (mongodb_ss_shardingStatistics_numShardedCollections{environment=~\"$environment\",cluster=~\"$cluster\"} or mongodb_mongos_sharding_collections_total{environment=~\"$environment\",cluster=~\"$cluster\"})", "interval": "5m", "intervalFactor": 1, "legendFormat": "Shards", @@ -607,7 +571,7 @@ } ], "timeFrom": "1m", - "title": "Unsharded Collections", + "title": "Sharded Collections", "type": "stat" }, { @@ -654,9 +618,9 @@ }, "gridPos": { "h": 2, - "w": 2, - "x": 12, - "y": 7 + "w": 3, + "x": 11, + "y": 6 }, "hideTimeOverride": true, "id": 5, @@ -726,9 +690,9 @@ }, "gridPos": { "h": 2, - "w": 5, + "w": 7, "x": 14, - "y": 7 + "y": 6 }, "hideTimeOverride": true, "id": 11, @@ -769,14 +733,14 @@ "type": "stat" }, { - "description": "This shows the time since the last election.", + "description": "Time since the most recent election of any member of the cluster", "fieldConfig": { "defaults": { "color": { "fixedColor": "rgb(31, 120, 193)", "mode": "fixed" }, - "decimals": 2, + "decimals": 1, "mappings": [], "thresholds": { "mode": "absolute", @@ -797,9 +761,9 @@ }, "gridPos": { "h": 2, - "w": 5, - "x": 19, - "y": 7 + "w": 3, + "x": 21, + "y": 6 }, "hideTimeOverride": false, "id": 1293, @@ -836,25 +800,19 @@ "step": 300 } ], - "title": "ReplSet Last Election", + "title": "Last Election", "type": "stat" }, { - "id": 1267, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 9 - }, - "type": "bargauge", - "title": "Chunks distribution", - "repeatDirection": "v", - "pluginVersion": "9.2.20", "description": "Show the chunk distribution between all the shards involved", "fieldConfig": { "defaults": { + "color": { + "mode": "thresholds" + }, "mappings": [], + "max": 1, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ @@ -864,29 +822,33 @@ } ] }, - "color": { - "mode": "thresholds" - }, - "unit": "percentunit", - "max": 1, - "min": 0 + "unit": "percentunit" }, "overrides": [] }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 1267, "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "auto", "reduceOptions": { - "values": false, "calcs": [ "lastNotNull" ], - "fields": "" + "fields": "", + "values": false }, - "orientation": "auto", - "displayMode": "gradient", - "showUnfilled": true, - "minVizWidth": 0, - "minVizHeight": 10 + "showUnfilled": true }, + "pluginVersion": "9.2.20", + "repeatDirection": "v", "targets": [ { "editorMode": "code", @@ -900,7 +862,9 @@ "range": false, "refId": "A" } - ] + ], + "title": "Chunks distribution", + "type": "bargauge" }, { "aliasColors": {}, @@ -928,20 +892,20 @@ "h": 8, "w": 12, "x": 0, - "y": 14 + "y": 15 }, "hiddenSeries": false, "id": 1269, "legend": { "alignAsTable": true, - "avg": false, - "current": true, + "avg": true, + "current": false, "hideZero": false, - "max": false, - "min": false, + "max": true, + "min": true, "rightSide": false, "show": true, - "sort": "current", + "sort": "avg", "sortDesc": true, "total": false, "values": true @@ -1053,7 +1017,8 @@ "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "fixedColor": "blue", + "mode": "fixed" }, "mappings": [], "thresholds": { @@ -1073,7 +1038,7 @@ "h": 8, "w": 12, "x": 12, - "y": 14 + "y": 15 }, "id": 1271, "links": [], @@ -1098,10 +1063,19 @@ { "editorMode": "code", "expr": "topk (5,sum by (environment, cluster,database,collection) (irate(mongodb_top_queries_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"})[$interval]))", - "hide": false, + "hide": true, "legendFormat": "{{database}}.{{collection}}", "range": true, "refId": "B" + }, + { + "editorMode": "code", + "expr": "topk (5,sum by (environment, cluster,database,collection) ((rate(mongodb_top_queries_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"})[$interval]) or irate(mongodb_top_queries_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"})[5s]))", + "hide": false, + "interval": "", + "legendFormat": "{{database}}.{{collection}}", + "range": true, + "refId": "A" } ], "title": "Top Hottest Collections by Read", @@ -1127,19 +1101,19 @@ "h": 8, "w": 12, "x": 0, - "y": 22 + "y": 23 }, "hiddenSeries": false, "id": 1297, "legend": { "alignAsTable": true, "avg": true, - "current": true, - "max": false, - "min": false, + "current": false, + "max": true, + "min": true, "rightSide": false, "show": true, - "sort": "current", + "sort": "avg", "sortDesc": true, "total": false, "values": true @@ -1162,7 +1136,7 @@ "targets": [ { "editorMode": "code", - "expr": "avg by (op_type) (rate(mongodb_ss_opLatencies_latency{environment=~\"$environment\", cluster=~\"$cluster\", service_name=~\"$service_name\"}[$interval]) / (rate(mongodb_ss_opLatencies_ops{environment=~\"$environment\", cluster=~\"$cluster\", service_name=~\"$service_name\"}[$interval]) > 0) or irate(mongodb_ss_opLatencies_latency{environment=~\"$environment\", cluster=~\"$cluster\",service_name=~\"$service_name\"}[5m]) / (irate(mongodb_ss_opLatencies_ops{environment=~\"$environment\", cluster=~\"$cluster\", ervice_name=~\"$service_name\"}[5m]) > 0))", + "expr": "avg by (op_type) (rate(mongodb_ss_opLatencies_latency{environment=~\"$environment\", cluster=~\"$cluster\", service_name=~\"$service_name\"}[$interval]) / (rate(mongodb_ss_opLatencies_ops{environment=~\"$environment\", cluster=~\"$cluster\", service_name=~\"$service_name\"}[$interval]) > 0) or irate(mongodb_ss_opLatencies_latency{environment=~\"$environment\", cluster=~\"$cluster\",service_name=~\"$service_name\"}[5m]) / (irate(mongodb_ss_opLatencies_ops{environment=~\"$environment\", cluster=~\"$cluster\", service_name=~\"$service_name\"}[5m]) > 0))", "interval": "$interval", "legendFormat": "{{op_type}}", "range": true, @@ -1186,7 +1160,7 @@ "yaxes": [ { "decimals": 2, - "format": "µs", + "format": "\u00b5s", "logBase": 1, "min": "0", "show": true @@ -1202,10 +1176,12 @@ } }, { + "description": "Show the 5 collections that are most frequently written to.", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "fixedColor": "blue", + "mode": "fixed" }, "mappings": [], "thresholds": { @@ -1214,10 +1190,6 @@ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] }, @@ -1229,7 +1201,7 @@ "h": 8, "w": 12, "x": 12, - "y": 22 + "y": 23 }, "id": 1273, "options": { @@ -1250,12 +1222,21 @@ "targets": [ { "editorMode": "code", - "expr": "topk (5,sum by (environment,cluster,database,collection) (irate(mongodb_top_insert_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"}+mongodb_top_remove_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"}+mongodb_top_update_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"})[1m]))", + "expr": "topk (5,sum by (environment,cluster,database,collection) (irate(mongodb_top_insert_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"}+mongodb_top_remove_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"}+mongodb_top_update_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"})[5m]))", + "hide": true, "instant": false, "key": "Q-bf62f68c-ad8e-4fb5-83bb-df50324b416b-0", "legendFormat": "{{database}}.{{collection}}", "range": true, "refId": "A" + }, + { + "editorMode": "code", + "expr": "topk (5,sum by (environment,cluster,database,collection) ((rate(mongodb_top_insert_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"}+mongodb_top_remove_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"}+mongodb_top_update_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"})[$interval]) or irate(mongodb_top_insert_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"}+mongodb_top_remove_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"}+mongodb_top_update_count{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\"})[5m]))", + "hide": false, + "legendFormat": "{{database}}.{{collection}}", + "range": true, + "refId": "B" } ], "title": "Top Hottest Collections by Write", @@ -1289,7 +1270,7 @@ "h": 8, "w": 12, "x": 0, - "y": 30 + "y": 31 }, "hiddenSeries": false, "id": 30, @@ -1320,8 +1301,7 @@ "pointradius": 5, "points": false, "renderer": "flot", - "seriesOverrides": [ - ], + "seriesOverrides": [], "spaceLength": 10, "stack": true, "steppedLine": false, @@ -1392,10 +1372,6 @@ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] } @@ -1465,7 +1441,11 @@ "value": 2 }, { - "id": "custom.align" + "id": "custom.align", + "value": "auto" + }, + { + "id": "custom.width" } ] }, @@ -1480,6 +1460,17 @@ "value": true } ] + }, + { + "matcher": { + "id": "byName", + "options": "Service Name" + }, + "properties": [ + { + "id": "custom.width" + } + ] } ] }, @@ -1487,7 +1478,7 @@ "h": 8, "w": 12, "x": 12, - "y": 30 + "y": 31 }, "hideTimeOverride": true, "id": 1289, @@ -1501,26 +1492,15 @@ ], "show": false }, - "showHeader": true + "showHeader": true, + "sortBy": [] }, "pluginVersion": "9.2.20", "targets": [ { + "editorMode": "code", "exemplar": false, - "expr": "avg by (service_name,engine) (mongodb_mongod_storage_engine{service_name=~\"$service_name\"})", - "format": "table", - "hide": true, - "instant": true, - "interval": "5m", - "intervalFactor": 1, - "legendFormat": "{{ engine }}", - "metric": "", - "refId": "A", - "step": 300 - }, - { - "exemplar": false, - "expr": "avg by (service_name,mongodb) (mongodb_version_info{service_name=~\"$service_name\"})", + "expr": "avg by (service_name,mongodb) (mongodb_version_info{service_name=~\"$service_name\"}) or (avg by (service_name,mongodb) (mongodb_version_info)) * on (service_name) group_right (mongodb) (avg by (service_name) (mongodb_mongos_db_collections_total{cluster=~\"$cluster\"}) / avg by (service_name) (mongodb_mongos_db_collections_total{cluster=~\"$cluster\"}))", "format": "table", "instant": true, "interval": "5m", @@ -1548,1436 +1528,1278 @@ "type": "table" }, { - "collapsed": true, + "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 38 + "y": 39 }, "id": 1285, - "panels": [ - { - "backgroundColor": "rgba(128,128,128,0.1)", - "colorMaps": [ - { - "color": "rgb(107, 152, 102)", - "text": "PRIMARY" - }, - { - "color": "rgb(193, 159, 20)", - "text": "SECONDARY" - }, - { - "color": "#FF7383", - "text": "Exporter is not connected" - }, - { - "color": "#8B8000", - "text": "ARBITER" - } - ], - "crosshairColor": "#8F070C", - "description": "ReplSet statuses during the select time range.", - "display": "timeline", - "expandFromQueryS": 0, - "extendLastValue": true, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 39 - }, - "highlightOnMouseover": true, - "id": 1281, - "legendSortBy": "count", - "lineColor": "rgba(0,0,0,0.1)", - "metricNameColor": "#000000", - "pluginVersion": "6.5.1", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "repeat": "set", - "repeatDirection": "h", - "rowHeight": 50, - "showDistinctCount": false, - "showLegend": false, - "showLegendCounts": false, - "showLegendNames": true, - "showLegendPercent": true, - "showLegendTime": true, - "showLegendValues": true, - "showTimeAxis": true, - "showTransitionCount": false, - "targets": [ - { - "editorMode": "code", - "expr": "max by (service_name) (mongodb_mongod_replset_my_state{environment=~\"$environment\",cluster=~\"$cluster\",set=~\"$set\",service_name=~\"$service_name\"})", - "hide": false, - "interval": "$interval", - "legendFormat": "{{service_name}}", - "range": true, - "refId": "A" - } - ], - "textSize": 20, - "textSizeTime": 12, - "timeOptions": [ - { - "name": "Years", - "value": "years" - }, - { - "name": "Months", - "value": "months" - }, - { - "name": "Weeks", - "value": "weeks" - }, - { - "name": "Days", - "value": "days" - }, - { - "name": "Hours", - "value": "hours" - }, - { - "name": "Minutes", - "value": "minutes" - }, - { - "name": "Seconds", - "value": "seconds" - }, - { - "name": "Milliseconds", - "value": "milliseconds" - } - ], - "timePrecision": { - "name": "Minutes", - "value": "minutes" - }, - "timeTextColor": "#d8d9da", - "title": "$set Node States", - "type": "natel-discrete-panel", - "units": "short", - "use12HourClock": false, - "useTimePrecision": false, - "valueMaps": [ - { - "op": "=", - "text": "Exporter is not connected", - "value": "null" - }, - { - "op": "=", - "text": "PRIMARY", - "value": "1" - }, - { - "op": "=", - "text": "SECONDARY", - "value": "2" - }, - { - "op": "=", - "text": "STARTUP", - "value": "0" - }, - { - "op": "=", - "text": "RECOVERING", - "value": "3" - }, - { - "op": "=", - "text": "STARTUP2", - "value": "5" - }, - { - "op": "=", - "text": "UNKNOWN", - "value": "6" - }, - { - "op": "=", - "text": "ARBITER", - "value": "7" - }, - { - "op": "=", - "text": "DOWN", - "value": "8" - }, - { - "op": "=", - "text": "ROLLBACK", - "value": "9" - }, - { - "op": "=", - "text": "REMOVED", - "value": "10" - } - ], - "valueTextColor": "#000000", - "writeAllValues": false, - "writeLastValue": true, - "writeMetricNames": true - } - ], + "panels": [], "title": "Node States", "type": "row" }, { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 39 - }, - "id": 1279, - "panels": [ - { - "id": 1030, - "gridPos": { - "h": 8, - "w": 11, - "x": 0, - "y": 40 + "description": "ReplSet statuses during the select time range.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" }, - "type": "table", - "title": "Size of Collections in Shards", - "transformations": [ + "custom": { + "fillOpacity": 100, + "lineWidth": 0, + "spanNulls": true + }, + "mappings": [ { - "id": "calculateField", "options": { - "mode": "reduceRow", - "reduce": { - "reducer": "allValues", - "include": [ - "database", - "collection" - ] + "0": { + "index": 11, + "text": "STARTUP" }, - "replaceFields": false, - "binary": { - "left": "collection", - "reducer": "sum", - "right": "database" - } - } - }, - { - "id": "groupingToMatrix", - "options": { - "columnField": "rs_nm", - "rowField": "All values", - "valueField": "Value" - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": {}, - "renameByName": { - "db\\shard": "DB Name", - "rs1": "", - "collection\\rs_nm": "Collection Name", - "All values\\rs_nm": "All values" + "1": { + "color": "rgb(107, 152, 102)", + "index": 4, + "text": "PRIMARY" + }, + "10": { + "index": 5, + "text": "REMOVED" + }, + "2": { + "color": "rgb(193, 159, 20)", + "index": 3, + "text": "SECONDARY" + }, + "3": { + "index": 10, + "text": "RECOVERING" + }, + "5": { + "index": 9, + "text": "STARTUP2" + }, + "6": { + "index": 8, + "text": "UNKNOWN" + }, + "7": { + "color": "#8B8000", + "index": 1, + "text": "ARBITER" + }, + "8": { + "index": 7, + "text": "DOWN" + }, + "9": { + "index": 6, + "text": "ROLLBACK" + }, + "null": { + "color": "#FF7383", + "index": 2, + "text": "Exporter is not connected" } - } - }, - { - "id": "extractFields", - "options": { - "source": "All values" - } + }, + "type": "value" }, { - "id": "organize", "options": { - "excludeByName": { - "All values": true - }, - "indexByName": { - "0": 1, - "1": 0, - "All values": 2, - "s1": 3, - "s2": 4 - }, - "renameByName": { - "0": "Collection Name", - "1": "DB Name" + "result": { + "index": 0, + "text": "N/A" } - } + }, + "type": "range" } ], - "pluginVersion": "9.2.20", - "description": "MongoDB stores documents in collections. Collections are analogous to tables in relational databases.", - "default_title_for_rows": "DB Name", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "displayMode": "auto", - "inspect": false, - "filterable": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "dark-blue", - "index": 0, - "text": "0" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "green", - "value": 20 - } - ] - }, - "color": { - "fixedColor": "text", - "mode": "thresholds" - }, - "noValue": "N/A", - "unit": "bytes" - }, - "overrides": [ + "thresholds": { + "mode": "absolute", + "steps": [ { - "matcher": { - "id": "byRegexp", - "options": "^((?!(Name)).)*$" - }, - "properties": [ - { - "id": "custom.displayMode", - "value": "color-background-solid" - }, - { - "id": "color", - "value": { - "fixedColor": "dark-blue", - "mode": "fixed" - } - }, - { - "id": "links", - "value": [ - { - "title": "", - "url": "/graph/d/mongodb-replicaset-summary/mongodb-replset-summary?var-interval=$__auto_interval_interval&var-replset=${__field.name}" - } - ] - }, - { - "id": "noValue", - "value": "0" - } - ] + "color": "green", + "value": null }, { - "matcher": { - "id": "byName", - "options": "Collection Name" - }, - "properties": [ - { - "id": "custom.displayMode", - "value": "auto" - } - ] + "color": "red", + "value": 80 } ] }, - "options": { - "showHeader": true, - "footer": { - "show": false, - "reducer": [ - "sum" - ], - "fields": "" - }, - "frameIndex": 0, - "sortBy": [] - }, - "sorting_props": { - "col_index": -1, - "direction": "desc" - }, - "targets": [ - { - "editorMode": "code", - "exemplar": false, - "expr": "max by(rs_nm, collection, database) (mongodb_collstats_storageStats_storageSize{cluster=~\"$cluster\", db!~\"admin|config\", rs_nm=~\"$shard\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "$interval", - "legendFormat": "{{db}} | {{shard}} | Collections", - "range": false, - "refId": "A" - } - ], - "hide_headers": false + "unit": "short" }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 40 + }, + "id": 1281, + "options": { + "alignValue": "right", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "6.5.1", + "repeat": "set", + "repeatDirection": "h", + "targets": [ { - "collapsed": false, - "default_title_for_rows": "DB Name", - "description": "MongoDB stores documents in collections. Collections are analogous to tables in relational databases.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "text", - "mode": "thresholds" - }, - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": false, - "inspect": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "dark-blue", - "index": 0 - } - }, - "type": "value" - } - ], - "noValue": "N/A", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "green", - "value": 20 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "^((?!(DB Name)).)*$" - }, - "properties": [ - { - "id": "custom.displayMode", - "value": "color-background-solid" - }, - { - "id": "color", - "value": { - "fixedColor": "dark-blue", - "mode": "fixed" - } - }, - { - "id": "links", - "value": [ - { - "title": "", - "url": "/graph/d/mongodb-replicaset-summary/mongodb-replset-summary?var-interval=$__auto_interval_interval&var-replset=${__field.name}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 13, - "x": 11, - "y": 47 - }, - "id": 1043, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "frameIndex": 0, - "showHeader": true, - "sortBy": [ - { - "desc": false, - "displayName": "DB Name\\Value" - } - ] - }, - "pluginVersion": "9.2.20", - "sorting_props": { - "col_index": -1, - "direction": "desc" - }, - "targets": [ - { - "editorMode": "code", - "exemplar": false, - "expr": "max by (db,shard) (mongodb_mongos_db_collections_total{cluster=\"$cluster\",db!~\"admin|config\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "$interval", - "legendFormat": "{{db}} | {{shard}} | Collections", - "range": false, - "refId": "A" - }, - { - "editorMode": "code", - "exemplar": false, - "expr": "mongodb_mongos_db_data_size_bytes{cluster=\"$cluster\",db!~\"admin|config\"}", - "format": "table", - "hide": true, - "instant": true, - "interval": "$interval", - "legendFormat": "{{db}} | {{shard}} | Size", - "range": false, - "refId": "B" - } - ], - "title": "Number of Collections in Shards", - "transformations": [ - { - "id": "groupingToMatrix", - "options": { - "columnField": "shard", - "rowField": "db", - "valueField": "Value" - } - }, - { - "id": "organize", - "options": { - "excludeByName": {}, - "indexByName": {}, - "renameByName": { - "db\\shard": "DB Name", - "rs1": "" - } - } - } - ], - "type": "table" + "editorMode": "code", + "expr": "max by (service_name) (mongodb_mongod_replset_my_state{environment=~\"$environment\",cluster=~\"$cluster\",set=~\"$set\",service_name=~\"$service_name\"})", + "hide": false, + "interval": "$interval", + "legendFormat": "{{service_name}}", + "range": true, + "refId": "A" } ], - "title": "Collection Details", - "type": "row" + "title": "$set Node States", + "type": "state-timeline" }, { - "collapsed": true, + "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 40 + "y": 47 }, - "id": 81, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "TCP connections (Incoming) in mongod processes.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "links": [ - { - "targetBlank": true, - "title": "MongoDB ReplSet Summary - ${__series.name}", - "url": "/graph/d/mongodb-replicaset-summary/mongodb-replset-summary?var-replset=${__series.name}&$__url_time_range" - } - ] - }, - "overrides": [] - }, - "fill": 6, - "fillGradient": 0, - "grid": {}, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 56 - }, - "hiddenSeries": false, - "id": 37, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true + "id": 1279, + "panels": [], + "title": "Collection Details", + "type": "row" + }, + { + "default_title_for_rows": "DB Name", + "description": "MongoDB stores documents in collections. Collections are analogous to tables in relational databases.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "thresholds" }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": false, + "inspect": true }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Total", - "color": "#C4162A", - "fill": 0, - "legend": false, - "stack": false - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ + "mappings": [ { - "editorMode": "code", - "expr": "avg by (rs_nm) (mongodb_connections{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\", state=\"current\", rs_nm!=\"\"})", - "format": "time_series", - "hide": false, - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{rs_nm}}", - "range": true, - "refId": "B", - "step": 300 + "options": { + "0": { + "color": "dark-blue", + "index": 0, + "text": "0" + } + }, + "type": "value" } ], - "thresholds": [], - "timeRegions": [], - "title": "Current Connections Per Shard", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transformations": [], - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "min": 0, - "show": true + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Collection Name" }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false + "properties": [ + { + "id": "custom.displayMode", + "value": "auto" + } + ] } + ] + }, + "gridPos": { + "h": 8, + "w": 11, + "x": 0, + "y": 48 + }, + "hide_headers": false, + "id": 1030, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 0, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.2.20", + "sorting_props": { + "col_index": -1, + "direction": "desc" + }, + "targets": [ + { + "editorMode": "code", + "exemplar": false, + "expr": "max by(rs_nm, collection, database) (mongodb_collstats_storageStats_storageSize{cluster=~\"$cluster\", db!~\"admin|config|local\", rs_nm=~\"$shard\"})", + "format": "table", + "hide": true, + "instant": true, + "interval": "$interval", + "legendFormat": "{{db}} | {{shard}} | Collections", + "range": false, + "refId": "A" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "links": [] + "editorMode": "code", + "exemplar": false, + "expr": "max by(rs_nm, collection, database) (mongodb_collstats_storageStats_storageSize{cluster=~\"$cluster\", db!~\"admin|config|local\", rs_nm=~\"$set\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "$interval", + "legendFormat": "{{db}} | {{shard}} | Collections", + "range": false, + "refId": "B" + } + ], + "title": "Size of Collections in Shards", + "transformations": [ + { + "id": "calculateField", + "options": { + "binary": { + "left": "collection", + "reducer": "sum", + "right": "database" }, - "overrides": [] - }, - "fill": 6, - "fillGradient": 0, - "grid": {}, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 63 - }, - "hiddenSeries": false, - "id": 1177, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "maxPerRow": 2, - "nullPointMode": "null", + "mode": "reduceRow", + "reduce": { + "include": [ + "database", + "collection" + ], + "reducer": "allValues" + }, + "replaceFields": false + } + }, + { + "id": "groupingToMatrix", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeatDirection": "h", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "editorMode": "code", - "expr": "sum by (set) (avg by (service_name,set) (mongodb_connections{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\", state=\"available\"}) * on (service_name) group_right avg by (service_name,set) (mongodb_mongod_replset_my_state{environment=~\"$environment\", cluster=~\"$cluster\", set=~\"$set\", service_name=~\"$service_name\"}/ mongodb_mongod_replset_my_state{cluster=\"$cluster\"}))", - "hide": false, - "interval": "", - "legendFormat": "{{service_name}}", - "range": true, - "refId": "A" + "columnField": "rs_nm", + "rowField": "All values", + "valueField": "Value" + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "All values\\rs_nm": "All values", + "collection\\rs_nm": "Collection Name", + "db\\shard": "DB Name", + "rs1": "" } - ], - "thresholds": [], - "timeRegions": [], - "title": "Available Connections", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 2, - "format": "short", - "label": "", - "logBase": 1, - "min": 0, - "show": true + } + }, + { + "id": "extractFields", + "options": { + "source": "All values" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "All values": true }, - { - "format": "short", - "logBase": 1, - "show": false + "indexByName": { + "0": 1, + "1": 0, + "All values": 2, + "s1": 3, + "s2": 4 + }, + "renameByName": { + "0": "Collection Name", + "1": "DB Name" } - ], - "yaxis": { - "align": false } } ], - "targets": [ - { - "refId": "A" - } - ], - "title": "Connections", - "type": "row" + "type": "table" }, { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 41 - }, - "id": 1199, - "panels": [ - { - "default_title_for_rows": "Shard Name", - "description": "A chunk consists of a subset of sharded data.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "text", - "mode": "thresholds" - }, - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": false, - "inspect": false - }, - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "green", - "value": 20 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Chunks" - }, - "properties": [ - { - "id": "custom.displayMode", - "value": "color-background-solid" - }, - { - "id": "color", - "value": { - "fixedColor": "dark-blue", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 71 - }, - "hide_headers": false, - "id": 1200, - "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + "collapsed": false, + "default_title_for_rows": "DB Name", + "description": "MongoDB stores documents in collections. Collections are analogous to tables in relational databases.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "thresholds" }, - "pluginVersion": "9.2.20", - "sorting_props": { - "col_index": -1, - "direction": "desc" + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": false, + "inspect": false }, - "targets": [ - { - "editorMode": "code", - "exemplar": false, - "expr": "avg by (shard) (mongodb_mongos_sharding_shard_chunks_total{cluster=\"$cluster\",db!~\"admin|config\"})", - "format": "table", - "hide": false, - "instant": true, - "interval": "$interval", - "legendFormat": "{{shard}} | Chunks", - "range": false, - "refId": "A" - } - ], - "title": "Amount of Chunks in Shards", - "transformations": [ + "mappings": [ { - "id": "organize", "options": { - "excludeByName": { - "Time": true - }, - "indexByName": {}, - "renameByName": { - "Value": "Chunks", - "shard": "Shard Name" + "0": { + "color": "dark-blue", + "index": 0 } - } + }, + "type": "value" } ], - "type": "table" + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + } }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "The sharding operation creates the initial chunk(s) to cover the entire range of the shard key values. The number of chunks created depends on the configured chunk size. After the initial chunk creation, the balancer migrates these initial chunks across the shards as appropriate as well as manages the chunk distribution going forward.", - "fieldConfig": { - "defaults": { - "links": [ - { - "targetBlank": true, - "title": "MongoDB ReplSet Summary", - "url": "/graph/d/mongodb-replicaset-summary/mongodb-replset-summary?var-replset=${__series.name}&$__url_time_range" - } - ] - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 18, - "x": 6, - "y": 71 - }, - "hiddenSeries": false, - "id": 1201, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": true, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "avg by (shard) (rate(mongodb_mongos_sharding_shard_chunks_total{cluster=\"$cluster\"}[$interval]) or irate(mongodb_mongos_sharding_shard_chunks_total{cluster=\"$cluster\"}[5m]))", - "interval": "$interval", - "legendFormat": "{{shard}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Dynamic of Chunks", - "tooltip": { - "shared": true, - "sort": 5, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 2, - "format": "cps", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 13, + "x": 11, + "y": 48 + }, + "id": 1043, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" ], - "yaxis": { - "align": false - } + "show": false }, + "frameIndex": 0, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "DB Name\\Value" + } + ] + }, + "pluginVersion": "9.2.20", + "sorting_props": { + "col_index": -1, + "direction": "desc" + }, + "targets": [ { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "MongoDB migrates chunks in a sharded cluster to distribute the chunks of a sharded collection evenly among shards. ", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 79 - }, - "hiddenSeries": false, - "id": 1216, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 2, - "nullPointMode": "null", + "editorMode": "code", + "exemplar": false, + "expr": "max by (rs_nm, database) (mongodb_mongod_db_collections_total{cluster=\"$cluster\",database!~\"admin|config|system|local\",rs_nm=~\"$set\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "$interval", + "legendFormat": "{{db}} | {{rs_nm}} | Collections", + "range": false, + "refId": "C" + } + ], + "title": "Number of Collections in Shards", + "transformations": [ + { + "id": "groupingToMatrix", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "avg by (event) (rate(mongodb_mongos_sharding_changelog_10min_total{cluster=\"$cluster\", event=~\".*moveChunk.*\"}[$interval]) or\nirate(mongodb_mongos_sharding_changelog_10min_total{cluster=\"$cluster\", event=~\".*moveChunk.*\"}[5m]))", - "interval": "$interval", - "legendFormat": "{{event}}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Chunks Move Events", - "tooltip": { - "shared": true, - "sort": 5, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false + "columnField": "rs_nm", + "rowField": "database", + "valueField": "Value" } }, { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "decimals": 2, - "description": "MongoDB splits chunks when they grow beyond the configured chunk size. Both inserts and updates can trigger a chunk split.", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 86 - }, - "hiddenSeries": false, - "id": 1212, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 2, - "nullPointMode": "null", + "id": "organize", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "avg by (event) (rate(mongodb_mongos_sharding_changelog_10min_total{cluster=\"$cluster\", event=~\".*split.*\"}[$interval]) or\nirate(mongodb_mongos_sharding_changelog_10min_total{cluster=\"$cluster\", event=~\".*split.*\"}[5m]))", - "interval": "$interval", - "legendFormat": "{{event}}", - "refId": "A" + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "database\\rs_nm": "DB Name", + "shard0": "" } - ], - "thresholds": [], - "timeRegions": [], - "title": "Chunks Split Events", - "tooltip": { - "shared": true, - "sort": 5, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 2, - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 56 + }, + "id": 81, + "panels": [], + "title": "Connections", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "description": "TCP connections (Incoming) in mongod processes.", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [ { - "format": "short", - "logBase": 1, - "show": false + "targetBlank": true, + "title": "MongoDB ReplSet Summary - ${__series.name}", + "url": "/graph/d/mongodb-replicaset-summary/mongodb-replset-summary?var-replset=${__series.name}&$__url_time_range" } - ], - "yaxis": { - "align": false - } + ] + }, + "overrides": [] + }, + "fill": 6, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 57 + }, + "hiddenSeries": false, + "id": 37, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Total", + "color": "#C4162A", + "fill": 0, + "legend": false, + "stack": false + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "editorMode": "code", + "expr": "avg by (rs_nm) (mongodb_connections{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\", state=\"current\", rs_nm!=\"\"})", + "format": "time_series", + "hide": false, + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{rs_nm}}", + "range": true, + "refId": "B", + "step": 300 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Current Connections Per Shard", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transformations": [], + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true } ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 6, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 64 + }, + "hiddenSeries": false, + "id": 1177, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "maxPerRow": 2, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeatDirection": "h", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "editorMode": "code", + "expr": "sum by (set) (avg by (service_name,set) (mongodb_connections{environment=~\"$environment\", cluster=~\"$cluster\", rs_nm=~\"$set\", service_name=~\"$service_name\", state=\"available\"}) * on (service_name) group_right avg by (service_name,set) (mongodb_mongod_replset_my_state{environment=~\"$environment\", cluster=~\"$cluster\", set=~\"$set\", service_name=~\"$service_name\"}/ mongodb_mongod_replset_my_state{cluster=\"$cluster\"}))", + "hide": false, + "interval": "", + "legendFormat": "{{service_name}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Available Connections", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 2, + "format": "short", + "label": "", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 71 + }, + "id": 1199, + "panels": [], + "title": "Chunks in Shards", + "type": "row" + }, + { + "default_title_for_rows": "Shard Name", + "description": "A chunk consists of a subset of sharded data.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "thresholds" + }, + "custom": { + "align": "left", + "displayMode": "auto", + "filterable": false, + "inspect": false + }, + "mappings": [], + "noValue": "-", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 72 + }, + "hide_headers": false, + "id": 1200, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.2.20", + "sorting_props": { + "col_index": -1, + "direction": "desc" + }, + "targets": [ + { + "editorMode": "code", + "exemplar": false, + "expr": "avg by (shard) (mongodb_mongos_sharding_shard_chunks_total{cluster=\"$cluster\",db!~\"admin|config\"})", + "format": "table", + "hide": false, + "instant": true, + "interval": "$interval", + "legendFormat": "{{shard}} | Chunks", + "range": false, + "refId": "A" + } + ], + "title": "Amount of Chunks in Shards", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": {}, + "renameByName": { + "Value": "Chunks", + "shard": "Shard Name" + } + } + } + ], + "type": "table" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "The sharding operation creates the initial chunk(s) to cover the entire range of the shard key values. The number of chunks created depends on the configured chunk size. After the initial chunk creation, the balancer migrates these initial chunks across the shards as appropriate as well as manages the chunk distribution going forward.", + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "MongoDB ReplSet Summary", + "url": "/graph/d/mongodb-replicaset-summary/mongodb-replset-summary?var-replset=${__series.name}&$__url_time_range" + } + ] + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 18, + "x": 6, + "y": 72 + }, + "hiddenSeries": false, + "id": 1201, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "avg by (shard) (rate(mongodb_mongos_sharding_shard_chunks_total{cluster=\"$cluster\"}[$interval]) or irate(mongodb_mongos_sharding_shard_chunks_total{cluster=\"$cluster\"}[5m]))", + "interval": "$interval", + "legendFormat": "{{shard}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Dynamic of Chunks", + "tooltip": { + "shared": true, + "sort": 5, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 2, + "format": "cps", + "logBase": 1, + "min": "0", + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "MongoDB migrates chunks in a sharded cluster to distribute the chunks of a sharded collection evenly among shards. ", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 80 + }, + "hiddenSeries": false, + "id": 1216, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 2, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "avg by (event) (rate(mongodb_mongos_sharding_changelog_10min_total{cluster=\"$cluster\", event=~\".*moveChunk.*\"}[$interval]) or\nirate(mongodb_mongos_sharding_changelog_10min_total{cluster=\"$cluster\", event=~\".*moveChunk.*\"}[5m]))", + "interval": "$interval", + "legendFormat": "{{event}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Chunks Move Events", + "tooltip": { + "shared": true, + "sort": 5, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 2, + "format": "short", + "logBase": 1, + "min": "0", + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "decimals": 2, + "description": "MongoDB splits chunks when they grow beyond the configured chunk size. Both inserts and updates can trigger a chunk split.", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 87 + }, + "hiddenSeries": false, + "id": 1212, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 2, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "avg by (event) (rate(mongodb_mongos_sharding_changelog_10min_total{cluster=\"$cluster\", event=~\".*split.*\"}[$interval]) or\nirate(mongodb_mongos_sharding_changelog_10min_total{cluster=\"$cluster\", event=~\".*split.*\"}[5m]))", + "interval": "$interval", + "legendFormat": "{{event}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Chunks Split Events", + "tooltip": { + "shared": true, + "sort": 5, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 2, + "format": "short", + "logBase": 1, + "min": "0", + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 94 + }, + "id": 97, + "panels": [], + "title": "Replication", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "MongoDB ReplSet Summary - ${__series.name}", + "url": "/graph/d/mongodb-replicaset-summary/mongodb-replset-summary?var-replset=${__series.name}&$__url_time_range" + } + ] + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 95 + }, + "hiddenSeries": false, + "id": 14, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "editorMode": "code", + "expr": "max by (set) (max(max_over_time(mongodb_mongod_replset_member_replication_lag{cluster=\"$cluster\",state!=\"ARBITER\"}[$interval])) by (service_name,set) or max(max_over_time(mongodb_mongod_replset_member_replication_lag{cluster=\"$cluster\",state!=\"ARBITER\"}[5m])) by (service_name,set))", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Replication Lag by Shard", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 5, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "min": 0, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "description": "Timespan 'window' between oldest and newest ops in the Oplog collection.", + "editable": true, + "error": false, + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "MongoDB ReplSet Summary - ${__series.name}", + "url": "/graph/d/mongodb-replicaset-summary/mongodb-replset-summary?var-replset=${__series.name}&$__url_time_range" + } + ] + }, + "overrides": [] + }, + "fill": 2, + "fillGradient": 0, + "grid": {}, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 95 + }, + "hiddenSeries": false, + "id": 27, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.20", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, "targets": [ { - "refId": "A" + "expr": "max(max(mongodb_mongod_replset_oplog_head_timestamp{cluster=\"$cluster\"}-mongodb_mongod_replset_oplog_tail_timestamp{cluster=\"$cluster\"}) by (service_name) * on (service_name) group_right mongodb_mongod_replset_my_state{cluster=\"$cluster\"} / mongodb_mongod_replset_my_state{cluster=\"$cluster\"}) by (set)", + "format": "time_series", + "hide": false, + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{set}}", + "refId": "A", + "step": 300 } ], - "title": "Chunks in Shards", - "type": "row" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 42 + "thresholds": [], + "timeRegions": [], + "title": "Oplog Range by Shard", + "tooltip": { + "msResolution": false, + "shared": true, + "sort": 5, + "value_type": "cumulative" }, - "id": 97, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "links": [ - { - "targetBlank": true, - "title": "MongoDB ReplSet Summary - ${__series.name}", - "url": "/graph/d/mongodb-replicaset-summary/mongodb-replset-summary?var-replset=${__series.name}&$__url_time_range" - } - ] - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 0, - "grid": {}, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 94 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by (set) (max(max_over_time(mongodb_mongod_replset_member_replication_lag{cluster=\"$cluster\",state!=\"ARBITER\"}[$interval]) > 0) by (service_name,set) or max(max_over_time(mongodb_mongod_replset_member_replication_lag{cluster=\"$cluster\",state!=\"ARBITER\"}[5m]) > 0) by (service_name,set))", - "format": "time_series", - "hide": false, - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{set}}", - "refId": "B", - "step": 300 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Replication Lag by Shard", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 5, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": "", - "logBase": 1, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "Timespan 'window' between oldest and newest ops in the Oplog collection.", - "editable": true, - "error": false, - "fieldConfig": { - "defaults": { - "links": [ - { - "targetBlank": true, - "title": "MongoDB ReplSet Summary - ${__series.name}", - "url": "/graph/d/mongodb-replicaset-summary/mongodb-replset-summary?var-replset=${__series.name}&$__url_time_range" - } - ] - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 0, - "grid": {}, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 94 - }, - "hiddenSeries": false, - "id": 27, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideZero": false, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.2.20", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max(max(mongodb_mongod_replset_oplog_head_timestamp{cluster=\"$cluster\"}-mongodb_mongod_replset_oplog_tail_timestamp{cluster=\"$cluster\"}) by (service_name) * on (service_name) group_right mongodb_mongod_replset_my_state{cluster=\"$cluster\"} / mongodb_mongod_replset_my_state{cluster=\"$cluster\"}) by (set)", - "format": "time_series", - "hide": false, - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{set}}", - "refId": "A", - "step": 300 - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Oplog Range by Shard", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 5, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": "", - "logBase": 1, - "min": 0, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - } - ], - "targets": [ + "format": "s", + "label": "", + "logBase": 1, + "min": 0, + "show": true + }, { - "refId": "A" + "format": "short", + "logBase": 1, + "show": true } ], - "title": "Replication", - "type": "row" + "yaxis": { + "align": false + } } ], "refresh": false, @@ -3056,13 +2878,9 @@ }, { "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] + "selected": false, + "text": "All", + "value": "$__all" }, "definition": "label_values({__name__=~\"pg_up|mysql_up|mongodb_up|proxysql_mysql_status_active_transactions\"}, environment)", "hide": 0, @@ -3088,8 +2906,8 @@ "allFormat": "glob", "current": { "selected": false, - "text": "mycluster2", - "value": "mycluster2" + "text": "", + "value": "" }, "definition": "label_values(mongodb_mongod_replset_my_state{environment=~\"$environment\"},cluster)", "hide": 0, @@ -3112,13 +2930,9 @@ }, { "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] + "selected": false, + "text": "All", + "value": "$__all" }, "definition": "label_values(mongodb_mongos_db_collections_total{cluster=\"$cluster\"},shard)", "hide": 2, @@ -3140,36 +2954,6 @@ "type": "query", "useTags": false }, - { - "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] - }, - "definition": "label_values({__name__=~\"pg_up|mysql_up|mongodb_up|proxysql_mysql_status_active_transactions\"}, node_name)", - "hide": 2, - "includeAll": true, - "label": "Node Name", - "multi": true, - "name": "node_name", - "options": [], - "query": { - "query": "label_values({__name__=~\"pg_up|mysql_up|mongodb_up|proxysql_mysql_status_active_transactions\"}, node_name)", - "refId": "Metrics-node_name-Variable-Query" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 5, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, { "current": { "selected": true, @@ -3183,7 +2967,7 @@ "definition": "label_values(mongodb_mongod_replset_my_state{environment=~\"$environment\",cluster=~\"$cluster\"}, set)", "hide": 0, "includeAll": true, - "label": "Replication Set", + "label": "Replica Set", "multi": true, "name": "set", "options": [], @@ -3202,13 +2986,9 @@ }, { "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] + "selected": false, + "text": "All", + "value": "$__all" }, "definition": "label_values(mongodb_mongod_replset_my_state{environment=~\"$environment\",cluster=~\"$cluster\",set=~\"$set\"}, service_name)", "hide": 0, @@ -3229,151 +3009,11 @@ "tagsQuery": "", "type": "query", "useTags": false - }, - { - "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] - }, - "definition": "label_values(pg_stat_database_tup_fetched{service_name=~\"$service_name\",datname!~\"template.*|postgres\"},datname)", - "hide": 2, - "includeAll": true, - "label": "Database", - "multi": true, - "name": "database", - "options": [], - "query": { - "query": "label_values(pg_stat_database_tup_fetched{service_name=~\"$service_name\",datname!~\"template.*|postgres\"},datname)", - "refId": "Metrics-database-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 5, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": [ - "" - ], - "value": [ - "" - ] - }, - "definition": "label_values({__name__=~\"pg_up|mysql_up|mongodb_up|proxysql_mysql_status_active_transactions\"}, node_type)", - "hide": 2, - "includeAll": true, - "label": "Type", - "multi": true, - "name": "node_type", - "options": [], - "query": { - "query": "label_values({__name__=~\"pg_up|mysql_up|mongodb_up|proxysql_mysql_status_active_transactions\"}, node_type)", - "refId": "Metrics-node_type-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 5, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": [ - "" - ], - "value": [ - "" - ] - }, - "definition": "label_values({__name__=~\"pg_up|mysql_up|mongodb_up|proxysql_mysql_status_active_transactions\"}, service_type)", - "hide": 2, - "includeAll": true, - "label": "Type", - "multi": true, - "name": "service_type", - "options": [], - "query": { - "query": "label_values({__name__=~\"pg_up|mysql_up|mongodb_up|proxysql_mysql_status_active_transactions\"}, service_type)", - "refId": "Metrics-service_type-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 5, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] - }, - "definition": "label_values(mysql_info_schema_user_statistics_connected_time_seconds_total{service_name=\"$service_name\"},user)", - "hide": 2, - "includeAll": true, - "label": "Username", - "multi": true, - "name": "username", - "options": [], - "query": { - "query": "label_values(mysql_info_schema_user_statistics_connected_time_seconds_total{service_name=\"$service_name\"},user)", - "refId": "Metrics-username-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 5, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": [ - "All" - ], - "value": [ - "All" - ] - }, - "hide": 2, - "includeAll": true, - "label": "Schema", - "multi": true, - "name": "schema", - "options": [], - "query": "", - "skipUrlSync": false, - "type": "custom" } ] }, "time": { - "from": "now-15m", + "from": "now-12h", "to": "now" }, "timepicker": { @@ -3400,8 +3040,8 @@ "30d" ] }, - "timezone": "", - "title": "MongoDB Cluster Summary (New)", + "timezone": "browser", + "title": "MongoDB Sharded Cluster Summary (New)", "uid": "mongodb-cluster-summary-new", "version": 1, "weekStart": ""