Grafana dashboard: Speedtest MongoDB
Description: Visualize speedtest-cli (by Ookla) data in MongoDB

https://www.getpostman.com/collections/5086931755ae4fa55359.

{
  "__inputs": [
    {
      "name": "DS_MONGODB",
      "label": "MongoDB",
      "description": "",
      "type": "datasource",
      "pluginId": "grafana-mongodb-datasource",
      "pluginName": "MongoDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.0.0"
    },
    {
      "type": "datasource",
      "id": "grafana-mongodb-datasource",
      "name": "MongoDB",
      "version": "0.8.1"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Visualize speedtest-cli (by Ookla) data in MongoDB",
  "editable": true,
  "gnetId": 13656,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "datasource": "${DS_MONGODB}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 10,
      "panels": [],
      "title": "Bandwidth",
      "type": "row"
    },
    {
      "aliasColors": {
        "download": "purple",
        "upload": "blue"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_MONGODB}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 1
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pluginVersion": "7.0.0",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "rawQuery": true,
          "refId": "A",
          "target": "db.normalized_speedtest.aggregate([{\n        \"$match\": {\n            \"ts\": {\n                \"$gte\": \"$from\",\n                \"$lte\": \"$to\"\n            }\n        }\n    },\n    {\n        \"$sort\": {\n            \"ts\": 1\n        }\n    },\n    {\n        \"$project\": {\n            \"name\": \"download\",\n            \"value\": \"$downloadMbps\",\n            \"ts\": \"$ts\",\n            \"_id\": 0\n        }\n    }\n])",
          "type": "timeserie"
        },
        {
          "rawQuery": true,
          "refId": "B",
          "target": "db.normalized_speedtest.aggregate([{\n        \"$match\": {\n            \"ts\": {\n                \"$gte\": \"$from\",\n                \"$lte\": \"$to\"\n            }\n        }\n    },\n    {\n        \"$sort\": {\n            \"ts\": 1\n        }\n    },\n    {\n        \"$project\": {\n            \"name\": \"upload\",\n            \"value\": \"$uploadMbps\",\n            \"ts\": \"$ts\",\n            \"_id\": 0\n        }\n    }\n])",
          "type": "timeserie"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Bandwidth Graph",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:653",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:654",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "${DS_MONGODB}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 7
              },
              {
                "color": "green",
                "value": 30
              }
            ]
          },
          "unit": "Mbps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 12,
        "y": 1
      },
      "id": 12,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "rawQuery": true,
          "refId": "A",
          "target": "db.normalized_speedtest.aggregate([{\n        \"$match\": {\n            \"ts\": {\n                \"$gte\": \"$from\",\n                \"$lte\": \"$to\"\n            }\n        }\n    },\n    {\n        \"$sort\": {\n            \"ts\": 1\n        }\n    },\n    {\n        \"$project\": {\n            \"name\": \"download\",\n            \"value\": \"$downloadMbps\",\n            \"ts\": \"$ts\",\n            \"_id\": 0\n        }\n    }\n])",
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Download Stats",
      "type": "stat"
    },
    {
      "datasource": "${DS_MONGODB}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "red",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 1.5
              },
              {
                "color": "green",
                "value": 2.5
              }
            ]
          },
          "unit": "Mbps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 18,
        "y": 1
      },
      "id": 11,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "rawQuery": true,
          "refId": "A",
          "target": "db.normalized_speedtest.aggregate([{\n        \"$match\": {\n            \"ts\": {\n                \"$gte\": \"$from\",\n                \"$lte\": \"$to\"\n            }\n        }\n    },\n    {\n        \"$sort\": {\n            \"ts\": 1\n        }\n    },\n    {\n        \"$project\": {\n            \"name\": \"upload\",\n            \"value\": \"$uploadMbps\",\n            \"ts\": \"$ts\",\n            \"_id\": 0\n        }\n    }\n])",
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Upload Stats",
      "type": "stat"
    },
    {
      "collapsed": false,
      "datasource": "${DS_MONGODB}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "id": 8,
      "panels": [],
      "title": "Packets",
      "type": "row"
    },
    {
      "datasource": "${DS_MONGODB}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 80
              },
              {
                "color": "red",
                "value": 150
              }
            ]
          },
          "unit": "ms"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 0,
        "y": 10
      },
      "id": 6,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "rawQuery": true,
          "refId": "A",
          "target": "db.normalized_speedtest.aggregate([{\n        \"$match\": {\n            \"ts\": {\n                \"$gte\": \"$from\",\n                \"$lte\": \"$to\"\n            }\n        }\n    },\n    {\n        \"$sort\": {\n            \"ts\": 1\n        }\n    },\n    {\n        \"$project\": {\n            \"name\": \"ping latency\",\n            \"value\": \"$pingLatency\",\n            \"ts\": \"$ts\",\n            \"_id\": 0\n        }\n    }\n])",
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Ping",
      "type": "stat"
    },
    {
      "datasource": "${DS_MONGODB}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 20
              },
              {
                "color": "red",
                "value": 30
              }
            ]
          },
          "unit": "ms"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 8,
        "y": 10
      },
      "id": 13,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "rawQuery": true,
          "refId": "A",
          "target": "db.normalized_speedtest.aggregate([{\n        \"$match\": {\n            \"ts\": {\n                \"$gte\": \"$from\",\n                \"$lte\": \"$to\"\n            }\n        }\n    },\n    {\n        \"$sort\": {\n            \"ts\": 1\n        }\n    },\n    {\n        \"$project\": {\n            \"name\": \"ping jitter\",\n            \"value\": \"$pingJitter\",\n            \"ts\": \"$ts\",\n            \"_id\": 0\n        }\n    }\n])",
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Jitter",
      "type": "stat"
    },
    {
      "datasource": "${DS_MONGODB}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "dark-yellow",
                "value": 0.5
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 8,
        "x": 16,
        "y": 10
      },
      "id": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "values": false
        }
      },
      "pluginVersion": "7.0.0",
      "targets": [
        {
          "rawQuery": true,
          "refId": "A",
          "target": "db.normalized_speedtest.aggregate([{\n        \"$match\": {\n            \"ts\": {\n                \"$gte\": \"$from\",\n                \"$lte\": \"$to\"\n            }\n        }\n    },\n    {\n        \"$sort\": {\n            \"ts\": 1\n        }\n    },\n    {\n        \"$project\": {\n            \"name\": \"packe loss\",\n            \"value\": \"$packetLoss\",\n            \"ts\": \"$ts\",\n            \"_id\": 0\n        }\n    }\n])",
          "type": "timeserie"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Packet Loss",
      "type": "stat"
    }
  ],
  "refresh": "",
  "schemaVersion": 25,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Speedtest MongoDB",
  "uid": "9z0MQ7kGk",
  "version": 13
}