Grafana dashboard: IPv4 packet stream analysis (Prometheus)
Description: Analysis of a real-time IPv4 packet stream as exported by prometheus-net/tzsp_packetstream_exporter

This is a visualization of the Docker container metrics provided by the [prometheus-net/tzsp_packetstream_exporter](https://github.com/prometheus-net/tzsp_packetstream_exporter) project.

[Source and issue reports on GitHub](https://github.com/prometheus-net/grafana-dashboards)

{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS-MEDIUM",
      "label": "prometheus-medium",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.5.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Analysis of a real-time IPv4 packet stream as exported by prometheus-net/tzsp_packetstream_exporter",
  "editable": true,
  "gnetId": 11609,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1580113846157,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS-MEDIUM}",
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": false,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(irate(tzsp_observed_bytes_total{instance =~ \"$instances\", from =~ \"$from\", to =~ \"$to\", protocol =~ \"$protocol\"}[3m]) * 8) by (to_type, protocol)",
          "legendFormat": "{{to_type}}/{{protocol}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Throughput per destination address type and protocol",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "bps",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "columns": [],
      "datasource": "${DS_PROMETHEUS-MEDIUM}",
      "fontSize": "100%",
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 0,
        "y": 8
      },
      "id": 4,
      "options": {},
      "pageSize": null,
      "showHeader": true,
      "sort": {
        "col": 1,
        "desc": false
      },
      "styles": [
        {
          "alias": "Time",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "pattern": "Value",
          "thresholds": [],
          "type": "number",
          "unit": "bps"
        },
        {
          "alias": "Address",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "from",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "expr": "sum(irate(tzsp_observed_bytes_total{instance =~ \"$instances\", from =~ \"$from\", to =~ \"$to\", protocol =~ \"$protocol\"}[3m]) * 8) by (from)",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Current throughput by source address",
      "transform": "table",
      "type": "table"
    },
    {
      "columns": [],
      "datasource": "${DS_PROMETHEUS-MEDIUM}",
      "fontSize": "100%",
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 12,
        "y": 8
      },
      "id": 5,
      "options": {},
      "pageSize": null,
      "showHeader": true,
      "sort": {
        "col": 1,
        "desc": false
      },
      "styles": [
        {
          "alias": "Time",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "pattern": "Value",
          "thresholds": [],
          "type": "number",
          "unit": "bps"
        },
        {
          "alias": "Address",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "to",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "expr": "sum(irate(tzsp_observed_bytes_total{instance =~ \"$instances\", from =~ \"$from\", to =~ \"$to\", protocol =~ \"$protocol\"}[3m]) * 8) by (to)",
          "format": "table",
          "instant": true,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Current throughput by destination address",
      "transform": "table",
      "type": "table"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 21,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS-MEDIUM}",
        "definition": "label_values(tzsp_observed_bytes_total, instance)",
        "hide": 0,
        "includeAll": false,
        "label": "Instance",
        "multi": false,
        "name": "instances",
        "options": [],
        "query": "label_values(tzsp_observed_bytes_total, instance)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 5,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS-MEDIUM}",
        "definition": "label_values(tzsp_observed_bytes_total{instance =~ \"$instances\"}, from)",
        "hide": 0,
        "includeAll": true,
        "label": "From",
        "multi": true,
        "name": "from",
        "options": [],
        "query": "label_values(tzsp_observed_bytes_total{instance =~ \"$instances\"}, from)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS-MEDIUM}",
        "definition": "label_values(tzsp_observed_bytes_total{instance =~ \"$instances\"}, to)",
        "hide": 0,
        "includeAll": true,
        "label": "To",
        "multi": true,
        "name": "to",
        "options": [],
        "query": "label_values(tzsp_observed_bytes_total{instance =~ \"$instances\"}, to)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS-MEDIUM}",
        "definition": "label_values(tzsp_observed_bytes_total{instance =~ \"$instances\"}, protocol)",
        "hide": 0,
        "includeAll": true,
        "label": "Protocols",
        "multi": true,
        "name": "protocol",
        "options": [],
        "query": "label_values(tzsp_observed_bytes_total{instance =~ \"$instances\"}, protocol)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-15m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "IPv4 packet stream analysis (Prometheus)",
  "uid": "MXhNeNsZz",
  "version": 9
}