{
    "__inputs": [
      {
        "name": "DS_INFLUXDB-UNIFI",
        "label": "influxdb-unifi",
        "description": "",
        "type": "datasource",
        "pluginId": "influxdb",
        "pluginName": "InfluxDB"
      }
    ],
    "__elements": {},
    "__requires": [
      {
        "type": "grafana",
        "id": "grafana",
        "name": "Grafana",
        "version": "11.5.2"
      },
      {
        "type": "datasource",
        "id": "influxdb",
        "name": "InfluxDB",
        "version": "1.0.0"
      },
      {
        "type": "panel",
        "id": "timeseries",
        "name": "Time series",
        "version": ""
      }
    ],
    "annotations": {
      "list": [
        {
          "builtIn": 1,
          "datasource": {
            "type": "grafana",
            "uid": "-- Grafana --"
          },
          "enable": true,
          "hide": true,
          "iconColor": "rgba(0, 211, 255, 1)",
          "name": "Annotations & Alerts",
          "type": "dashboard"
        }
      ]
    },
    "editable": true,
    "fiscalYearStartMonth": 0,
    "graphTooltip": 0,
    "id": null,
    "links": [],
    "panels": [
      {
        "collapsed": false,
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 0
        },
        "id": 1,
        "panels": [],
        "title": "Overview",
        "type": "row"
      },
      {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB-UNIFI}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "barWidthFactor": 0.6,
              "drawStyle": "line",
              "fillOpacity": 20,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 2,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            },
            "unit": "Mbps"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 6,
          "w": 12,
          "x": 0,
          "y": 1
        },
        "id": 2,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "hideZeros": false,
            "mode": "single",
            "sort": "none"
          }
        },
        "pluginVersion": "11.5.2",
        "targets": [
          {
            "query": "from(bucket: \"unifi\") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == \"uap\" and r._field == \"bytes\") |> group(columns: [\"name\"]) |> derivative(unit: 1s, nonNegative: true) |> map(fn: (r) => ({ r with _value: r._value * 8.0 / 1000000.0 })) |> aggregateWindow(every: 1m, fn: mean)",
            "refId": "A",
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB-UNIFI}"
            }
          }
        ],
        "title": "AP Throughput (Mbps)",
        "type": "timeseries"
      },
      {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB-UNIFI}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "fixedColor": "green",
              "mode": "fixed"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "barWidthFactor": 0.6,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            },
            "unit": "short"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 6,
          "w": 12,
          "x": 12,
          "y": 1
        },
        "id": 3,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "hideZeros": false,
            "mode": "single",
            "sort": "none"
          }
        },
        "pluginVersion": "11.5.2",
        "targets": [
          {
            "query": "from(bucket: \"unifi\") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == \"uap\" and r._field == \"num_sta\") |> group(columns: [\"name\"]) |> aggregateWindow(every: 1m, fn: last)",
            "refId": "A",
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB-UNIFI}"
            }
          }
        ],
        "title": "Clients per AP",
        "type": "timeseries"
      },
      {
        "collapsed": false,
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 7
        },
        "id": 4,
        "panels": [],
        "title": "SSID Load",
        "type": "row"
      },
      {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB-UNIFI}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "barWidthFactor": 0.6,
              "drawStyle": "line",
              "fillOpacity": 25,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            },
            "unit": "Mbps"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 6,
          "w": 24,
          "x": 0,
          "y": 8
        },
        "id": 5,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "hideZeros": false,
            "mode": "single",
            "sort": "none"
          }
        },
        "pluginVersion": "11.5.2",
        "targets": [
          {
            "query": "from(bucket: \"unifi\") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == \"uap_vaps\") |> filter(fn: (r) => r._field == \"rx_bytes\" or r._field == \"tx_bytes\") |> group(columns: [\"name\", \"_field\"]) |> derivative(unit: 1s, nonNegative: true) |> map(fn: (r) => ({ r with _value: r._value * 8.0 / 1000000.0 })) |> aggregateWindow(every: 1m, fn: mean)",
            "refId": "A",
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB-UNIFI}"
            }
          }
        ],
        "title": "SSID Load (Traffic per WLAN, Mbps)",
        "type": "timeseries"
      },
      {
        "collapsed": false,
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 14
        },
        "id": 6,
        "panels": [],
        "title": "Clients (RF & Throughput)",
        "type": "row"
      },
      {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB-UNIFI}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "barWidthFactor": 0.6,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "red",
                  "value": null
                },
                {
                  "color": "yellow",
                  "value": -70
                },
                {
                  "color": "green",
                  "value": -60
                }
              ]
            },
            "unit": "dBm"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 6,
          "w": 12,
          "x": 0,
          "y": 15
        },
        "id": 7,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "hideZeros": false,
            "mode": "single",
            "sort": "none"
          }
        },
        "pluginVersion": "11.5.2",
        "targets": [
          {
            "query": "from(bucket: \"unifi\") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == \"clients\" and r._field == \"signal\") |> group(columns: [\"name\"]) |> aggregateWindow(every: 1m, fn: mean)",
            "refId": "A",
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB-UNIFI}"
            }
          }
        ],
        "title": "Client RSSI / Signal Quality (dBm)",
        "type": "timeseries"
      },
      {
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_INFLUXDB-UNIFI}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "barWidthFactor": 0.6,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 2,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            },
            "unit": "Mbps"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 6,
          "w": 12,
          "x": 12,
          "y": 15
        },
        "id": 8,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "hideZeros": false,
            "mode": "single",
            "sort": "none"
          }
        },
        "pluginVersion": "11.5.2",
        "targets": [
          {
            "query": "from(bucket: \"unifi\") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r._measurement == \"clients\") |> filter(fn: (r) => r._field == \"rx_bytes\" or r._field == \"tx_bytes\") |> group(columns: [\"name\", \"_field\"]) |> derivative(unit: 1s, nonNegative: true) |> map(fn: (r) => ({ r with _value: r._value * 8.0 / 1000000.0 })) |> aggregateWindow(every: 1m, fn: mean)",
            "refId": "A",
            "datasource": {
              "type": "influxdb",
              "uid": "${DS_INFLUXDB-UNIFI}"
            }
          }
        ],
        "title": "Client RX / TX Throughput (Top Talkers, Mbps)",
        "type": "timeseries"
      }
    ],
    "refresh": "30s",
    "schemaVersion": 40,
    "tags": [],
    "templating": {
      "list": []
    },
    "time": {
      "from": "now-30m",
      "to": "now"
    },
    "timepicker": {},
    "timezone": "browser",
    "title": "UniFi UAP – RF, Clients & SSID Load (Flux)",
    "uid": "df7vhffof47wgc",
    "version": 1,
    "weekStart": ""
  }