Update K8s Monitoring to support Grafana 8
[osm/devops.git] / installers / k8s / mongodb-exporter-dashboard.yaml
index a7320ce..8ac6e41 100644 (file)
@@ -20,10 +20,9 @@ metadata:
   labels:
     app: prometheus-mongodb-exporter-grafana
     grafana_dashboard: "1"
-    heritage: Tiller
   name: osm-monitoring-prometheus-mongodb-exporter-grafana
   annotations:
-    k8s-sidecar-target-directory: "/tmp/dashboards/OSM Third Party Modules"
+    k8s-sidecar-target-directory: "/tmp/dashboards/Open Source MANO"
 data:
   mongodb-exporter-dashboard.json: |-
     {
@@ -40,12 +39,12 @@ data:
           }
         ]
       },
-      "description": "MongoDB Prometheus Exporter Dashboard. \r\nWorks well with https://github.com/dcu/mongodb_exporter\r\n\r\nIf you have the node_exporter running on the mongo instance, you will also get some useful alert panels related to disk io and cpu.",
+      "description": "MongoDB Prometheus Exporter Dashboard.",
       "editable": true,
       "gnetId": 2583,
       "graphTooltip": 1,
-      "id": 29,
-      "iteration": 1569257185850,
+      "id": 9,
+      "iteration": 1577555358996,
       "links": [],
       "panels": [
         {
@@ -56,10 +55,180 @@ data:
             "x": 0,
             "y": 0
           },
+          "id": 22,
+          "panels": [],
+          "repeat": "env",
+          "title": "Health",
+          "type": "row"
+        },
+        {
+          "id": 10,
+          "gridPos": {
+            "h": 4,
+            "w": 12,
+            "x": 0,
+            "y": 1
+          },
+          "type": "stat",
+          "title": "Uptime",
+          "datasource": "Prometheus",
+          "maxDataPoints": 100,
+          "links": [],
+          "cacheTimeout": null,
+          "interval": null,
+          "targets": [
+            {
+              "expr": "mongodb_instance_uptime_seconds{instance=~\"$instance\"}",
+              "format": "time_series",
+              "intervalFactor": 2,
+              "legendFormat": "",
+              "refId": "A",
+              "step": 1800
+            }
+          ],
+          "fieldConfig": {
+            "defaults": {
+              "thresholds": {
+                "mode": "absolute",
+                "steps": [
+                  {
+                    "value": null,
+                    "color": "rgba(245, 54, 54, 0.9)"
+                  },
+                  {
+                    "value": 0,
+                    "color": "rgba(237, 129, 40, 0.89)"
+                  },
+                  {
+                    "value": 360,
+                    "color": "rgba(50, 172, 45, 0.97)"
+                  }
+                ]
+              },
+              "mappings": [
+                {
+                  "type": "special",
+                  "options": {
+                    "match": "null",
+                    "result": {
+                      "text": "N/A"
+                    }
+                  }
+                }
+              ],
+              "unit": "s",
+              "color": {
+                "mode": "thresholds"
+              }
+            },
+            "overrides": []
+          },
+          "options": {
+            "reduceOptions": {
+              "values": false,
+              "calcs": [
+                "lastNotNull"
+              ],
+              "fields": ""
+            },
+            "orientation": "horizontal",
+            "text": {},
+            "textMode": "auto",
+            "colorMode": "value",
+            "graphMode": "none",
+            "justifyMode": "auto"
+          },
+          "pluginVersion": "8.1.1"
+        },
+        {
+          "id": 1,
+          "gridPos": {
+            "h": 4,
+            "w": 12,
+            "x": 12,
+            "y": 1
+          },
+          "type": "stat",
+          "title": "Open Connections",
+          "datasource": "Prometheus",
+          "maxDataPoints": 100,
+          "links": [],
+          "cacheTimeout": null,
+          "interval": null,
+          "targets": [
+            {
+              "expr": "mongodb_connections{instance=~\"$instance\",state=\"current\"}",
+              "format": "time_series",
+              "intervalFactor": 2,
+              "legendFormat": "",
+              "metric": "mongodb_connections",
+              "refId": "A",
+              "step": 1800
+            }
+          ],
+          "fieldConfig": {
+            "defaults": {
+              "thresholds": {
+                "mode": "absolute",
+                "steps": [
+                  {
+                    "value": null,
+                    "color": "green"
+                  },
+                  {
+                    "value": 80,
+                    "color": "red"
+                  }
+                ]
+              },
+              "mappings": [
+                {
+                  "type": "special",
+                  "options": {
+                    "match": "null",
+                    "result": {
+                      "text": "N/A"
+                    }
+                  }
+                }
+              ],
+              "unit": "none",
+              "color": {
+                "mode": "fixed",
+                "fixedColor": "rgb(31, 120, 193)"
+              }
+            },
+            "overrides": []
+          },
+          "options": {
+            "reduceOptions": {
+              "values": false,
+              "calcs": [
+                "mean"
+              ],
+              "fields": ""
+            },
+            "orientation": "horizontal",
+            "text": {},
+            "textMode": "auto",
+            "colorMode": "none",
+            "graphMode": "area",
+            "justifyMode": "auto"
+          },
+          "pluginVersion": "8.1.1"
+        },
+        {
+          "collapsed": false,
+          "gridPos": {
+            "h": 1,
+            "w": 24,
+            "x": 0,
+            "y": 5
+          },
           "id": 20,
           "panels": [],
           "repeat": "env",
-          "title": "Query Metrics for $env",
+          "title": "Operations",
           "type": "row"
         },
         {
@@ -74,7 +243,7 @@ data:
             "h": 6,
             "w": 10,
             "x": 0,
-            "y": 1
+            "y": 6
           },
           "id": 7,
           "legend": {
@@ -103,7 +272,7 @@ data:
           "steppedLine": false,
           "targets": [
             {
-              "expr": "rate(mongodb_op_counters_total{instance=~\"$env\"}[$interval])",
+              "expr": "rate(mongodb_op_counters_total{instance=~\"$instance\"}[$__rate_interval])",
               "format": "time_series",
               "interval": "",
               "intervalFactor": 2,
@@ -165,7 +334,7 @@ data:
             "h": 6,
             "w": 8,
             "x": 10,
-            "y": 1
+            "y": 6
           },
           "id": 9,
           "legend": {
@@ -199,7 +368,7 @@ data:
           "steppedLine": false,
           "targets": [
             {
-              "expr": "rate(mongodb_mongod_metrics_document_total{instance=~\"$env\"}[$interval])",
+              "expr": "rate(mongodb_mongod_metrics_document_total{instance=~\"$instance\"}[$__rate_interval])",
               "format": "time_series",
               "interval": "",
               "intervalFactor": 2,
@@ -261,7 +430,7 @@ data:
             "h": 6,
             "w": 6,
             "x": 18,
-            "y": 1
+            "y": 6
           },
           "id": 8,
           "legend": {
@@ -290,7 +459,7 @@ data:
           "steppedLine": false,
           "targets": [
             {
-              "expr": "rate(mongodb_mongod_metrics_query_executor_total{instance=~\"$env\"}[$interval])",
+              "expr": "rate(mongodb_mongod_metrics_query_executor_total{instance=~\"$instance\"}[$__rate_interval])",
               "format": "time_series",
               "interval": "",
               "intervalFactor": 2,
@@ -340,273 +509,6 @@ data:
             "alignLevel": null
           }
         },
-        {
-          "collapsed": false,
-          "gridPos": {
-            "h": 1,
-            "w": 24,
-            "x": 0,
-            "y": 7
-          },
-          "id": 22,
-          "panels": [],
-          "repeat": "env",
-          "title": "Health metrics for $env",
-          "type": "row"
-        },
-        {
-          "cacheTimeout": null,
-          "colorBackground": false,
-          "colorValue": true,
-          "colors": [
-            "rgba(245, 54, 54, 0.9)",
-            "rgba(237, 129, 40, 0.89)",
-            "rgba(50, 172, 45, 0.97)"
-          ],
-          "datasource": "Prometheus",
-          "decimals": null,
-          "format": "s",
-          "gauge": {
-            "maxValue": 100,
-            "minValue": 0,
-            "show": false,
-            "thresholdLabels": false,
-            "thresholdMarkers": true
-          },
-          "gridPos": {
-            "h": 4,
-            "w": 4,
-            "x": 0,
-            "y": 8
-          },
-          "id": 10,
-          "interval": null,
-          "links": [],
-          "mappingType": 1,
-          "mappingTypes": [
-            {
-              "name": "value to text",
-              "value": 1
-            },
-            {
-              "name": "range to text",
-              "value": 2
-            }
-          ],
-          "maxDataPoints": 100,
-          "nullPointMode": "connected",
-          "nullText": null,
-          "options": {},
-          "postfix": "",
-          "postfixFontSize": "50%",
-          "prefix": "",
-          "prefixFontSize": "50%",
-          "rangeMaps": [
-            {
-              "from": "null",
-              "text": "N/A",
-              "to": "null"
-            }
-          ],
-          "sparkline": {
-            "fillColor": "rgba(31, 118, 189, 0.18)",
-            "full": false,
-            "lineColor": "rgb(31, 120, 193)",
-            "show": false
-          },
-          "tableColumn": "",
-          "targets": [
-            {
-              "expr": "mongodb_instance_uptime_seconds{instance=~\"$env\"}",
-              "format": "time_series",
-              "intervalFactor": 2,
-              "legendFormat": "",
-              "refId": "A",
-              "step": 1800
-            }
-          ],
-          "thresholds": "0,360",
-          "title": "Uptime",
-          "type": "singlestat",
-          "valueFontSize": "80%",
-          "valueMaps": [
-            {
-              "op": "=",
-              "text": "N/A",
-              "value": "null"
-            }
-          ],
-          "valueName": "current"
-        },
-        {
-          "cacheTimeout": null,
-          "colorBackground": false,
-          "colorValue": false,
-          "colors": [
-            "rgba(245, 54, 54, 0.9)",
-            "rgba(237, 129, 40, 0.89)",
-            "rgba(50, 172, 45, 0.97)"
-          ],
-          "datasource": "Prometheus",
-          "decimals": null,
-          "format": "none",
-          "gauge": {
-            "maxValue": 100,
-            "minValue": 0,
-            "show": false,
-            "thresholdLabels": false,
-            "thresholdMarkers": true
-          },
-          "gridPos": {
-            "h": 4,
-            "w": 4,
-            "x": 4,
-            "y": 8
-          },
-          "id": 2,
-          "interval": null,
-          "links": [],
-          "mappingType": 1,
-          "mappingTypes": [
-            {
-              "name": "value to text",
-              "value": 1
-            },
-            {
-              "name": "range to text",
-              "value": 2
-            }
-          ],
-          "maxDataPoints": 100,
-          "nullPointMode": "connected",
-          "nullText": null,
-          "options": {},
-          "postfix": "",
-          "postfixFontSize": "50%",
-          "prefix": "",
-          "prefixFontSize": "50%",
-          "rangeMaps": [
-            {
-              "from": "null",
-              "text": "N/A",
-              "to": "null"
-            }
-          ],
-          "sparkline": {
-            "fillColor": "rgba(31, 118, 189, 0.18)",
-            "full": true,
-            "lineColor": "rgb(31, 120, 193)",
-            "show": true
-          },
-          "tableColumn": "",
-          "targets": [
-            {
-              "expr": "mongodb_connections{instance=~\"$env\",state=\"available\"}",
-              "format": "time_series",
-              "intervalFactor": 2,
-              "legendFormat": "",
-              "metric": "mongodb_connections",
-              "refId": "A",
-              "step": 1800
-            }
-          ],
-          "thresholds": "",
-          "title": "Available Connections",
-          "type": "singlestat",
-          "valueFontSize": "80%",
-          "valueMaps": [
-            {
-              "op": "=",
-              "text": "N/A",
-              "value": "null"
-            }
-          ],
-          "valueName": "avg"
-        },
-        {
-          "cacheTimeout": null,
-          "colorBackground": false,
-          "colorValue": false,
-          "colors": [
-            "rgba(245, 54, 54, 0.9)",
-            "rgba(237, 129, 40, 0.89)",
-            "rgba(50, 172, 45, 0.97)"
-          ],
-          "datasource": "Prometheus",
-          "format": "none",
-          "gauge": {
-            "maxValue": 100,
-            "minValue": 0,
-            "show": false,
-            "thresholdLabels": false,
-            "thresholdMarkers": true
-          },
-          "gridPos": {
-            "h": 4,
-            "w": 16,
-            "x": 8,
-            "y": 8
-          },
-          "id": 1,
-          "interval": null,
-          "links": [],
-          "mappingType": 1,
-          "mappingTypes": [
-            {
-              "name": "value to text",
-              "value": 1
-            },
-            {
-              "name": "range to text",
-              "value": 2
-            }
-          ],
-          "maxDataPoints": 100,
-          "nullPointMode": "connected",
-          "nullText": null,
-          "options": {},
-          "postfix": "",
-          "postfixFontSize": "50%",
-          "prefix": "",
-          "prefixFontSize": "50%",
-          "rangeMaps": [
-            {
-              "from": "null",
-              "text": "N/A",
-              "to": "null"
-            }
-          ],
-          "sparkline": {
-            "fillColor": "rgba(31, 118, 189, 0.18)",
-            "full": true,
-            "lineColor": "rgb(31, 120, 193)",
-            "show": true
-          },
-          "tableColumn": "",
-          "targets": [
-            {
-              "expr": "mongodb_connections{instance=~\"$env\",state=\"current\"}",
-              "format": "time_series",
-              "intervalFactor": 2,
-              "legendFormat": "",
-              "metric": "mongodb_connections",
-              "refId": "A",
-              "step": 1800
-            }
-          ],
-          "thresholds": "",
-          "title": "Open Connections",
-          "type": "singlestat",
-          "valueFontSize": "80%",
-          "valueMaps": [
-            {
-              "op": "=",
-              "text": "N/A",
-              "value": "null"
-            }
-          ],
-          "valueName": "avg"
-        },
         {
           "collapsed": false,
           "gridPos": {
@@ -618,7 +520,7 @@ data:
           "id": 23,
           "panels": [],
           "repeat": null,
-          "title": "Resource Metrics",
+          "title": "Resources",
           "type": "row"
         },
         {
@@ -666,7 +568,7 @@ data:
           "steppedLine": false,
           "targets": [
             {
-              "expr": "mongodb_memory{instance=~\"$env\",type=~\"resident|virtual\"}",
+              "expr": "mongodb_memory{instance=~\"$instance\",type=~\"resident|virtual\"}",
               "format": "time_series",
               "interval": "",
               "intervalFactor": 2,
@@ -759,7 +661,7 @@ data:
           "steppedLine": false,
           "targets": [
             {
-              "expr": "rate(mongodb_network_bytes_total{instance=~\"$env\"}[$interval])",
+              "expr": "rate(mongodb_network_bytes_total{instance=~\"$instance\"}[$__rate_interval])",
               "format": "time_series",
               "interval": "",
               "intervalFactor": 2,
@@ -814,9 +716,7 @@ data:
       "refresh": "5s",
       "schemaVersion": 19,
       "style": "dark",
-      "tags": [
-        "prometheus"
-      ],
+      "tags": [],
       "templating": {
         "list": [
           {
@@ -829,9 +729,9 @@ data:
             "definition": "",
             "hide": 0,
             "includeAll": true,
-            "label": "env",
+            "label": "instance",
             "multi": true,
-            "name": "env",
+            "name": "instance",
             "options": [],
             "query": "label_values(mongodb_connections, instance)",
             "refresh": 1,
@@ -951,5 +851,5 @@ data:
       "timezone": "browser",
       "title": "MongoDB",
       "uid": "HEK4NbtZk",
-      "version": 1
+      "version": 2
     }