{
  "panels": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "cfbskvs8upds0b"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "fillOpacity": 10,
            "lineWidth": 2,
            "stacking": {
              "mode": "none"
            }
          },
          "unit": "Bps"
        }
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 1,
      "targets": [
        {
          "expr": "rate(node_network_transmit_bytes_total{device=\"tailscale0\"}[5m])",
          "legendFormat": "{{instance}}"
        }
      ],
      "title": "Tailscale TX Rate by Host",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "cfbskvs8upds0b"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "fillOpacity": 10,
            "lineWidth": 2,
            "stacking": {
              "mode": "none"
            }
          },
          "unit": "Bps"
        }
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 2,
      "targets": [
        {
          "expr": "rate(node_network_receive_bytes_total{device=\"tailscale0\"}[5m])",
          "legendFormat": "{{instance}}"
        }
      ],
      "title": "Tailscale RX Rate by Host",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "cfbskvs8upds0b"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "fillOpacity": 20,
            "lineWidth": 2,
            "stacking": {
              "mode": "normal"
            }
          },
          "unit": "Bps"
        }
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 8
      },
      "id": 3,
      "targets": [
        {
          "expr": "sum(rate(node_network_transmit_bytes_total{device=\"tailscale0\"}[5m]))",
          "legendFormat": "Total TX"
        },
        {
          "expr": "sum(rate(node_network_receive_bytes_total{device=\"tailscale0\"}[5m]))",
          "legendFormat": "Total RX"
        }
      ],
      "title": "Total Tailnet Bandwidth",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "cfbskvs8upds0b"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "fillOpacity": 30,
            "lineWidth": 1,
            "stacking": {
              "mode": "normal"
            }
          },
          "unit": "Bps"
        }
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 8
      },
      "id": 4,
      "targets": [
        {
          "expr": "rate(node_network_transmit_bytes_total{device=\"tailscale0\"}[5m]) + rate(node_network_receive_bytes_total{device=\"tailscale0\"}[5m])",
          "legendFormat": "{{instance}}"
        }
      ],
      "title": "Tailscale TX+RX Rate (Stacked by Host)",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "cfbskvs8upds0b"
      },
      "fieldConfig": {
        "defaults": {
          "thresholds": {
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 10485760
              },
              {
                "color": "red",
                "value": 52428800
              }
            ]
          },
          "unit": "Bps"
        }
      },
      "gridPos": {
        "h": 4,
        "w": 24,
        "x": 0,
        "y": 16
      },
      "id": 5,
      "options": {
        "graphMode": "area",
        "textMode": "auto"
      },
      "targets": [
        {
          "expr": "rate(node_network_transmit_bytes_total{device=\"tailscale0\"}[5m])",
          "legendFormat": "{{instance}}"
        }
      ],
      "title": "Current TX Rate",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "cfbskvs8upds0b"
      },
      "fieldConfig": {
        "defaults": {
          "thresholds": {
            "steps": [
              {
                "color": "blue",
                "value": null
              }
            ]
          },
          "unit": "bytes"
        }
      },
      "gridPos": {
        "h": 4,
        "w": 24,
        "x": 0,
        "y": 20
      },
      "id": 6,
      "options": {
        "graphMode": "none",
        "textMode": "auto"
      },
      "targets": [
        {
          "expr": "node_network_transmit_bytes_total{device=\"tailscale0\"}",
          "legendFormat": "{{instance}} TX"
        }
      ],
      "title": "Total Data Transferred (since reset)",
      "type": "stat"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 39,
  "tags": [
    "tailscale",
    "network"
  ],
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timezone": "browser",
  "title": "Tailscale Bandwidth",
  "uid": "tailscale-bandwidth"
}
