Advertisement
ThePie

Untitled

Apr 4th, 2024
712
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 29.56 KB | None | 0 0
  1. {
  2.   "annotations": {
  3.     "list": [
  4.       {
  5.         "builtIn": 1,
  6.         "datasource": {
  7.           "type": "grafana",
  8.           "uid": "-- Grafana --"
  9.         },
  10.         "enable": true,
  11.         "hide": true,
  12.         "iconColor": "rgba(0, 211, 255, 1)",
  13.         "name": "Annotations & Alerts",
  14.         "target": {
  15.           "limit": 100,
  16.           "matchAny": false,
  17.           "tags": [],
  18.           "type": "dashboard"
  19.         },
  20.         "type": "dashboard"
  21.       }
  22.     ]
  23.   },
  24.   "editable": true,
  25.   "fiscalYearStartMonth": 0,
  26.   "graphTooltip": 0,
  27.   "id": 10,
  28.   "links": [
  29.     {
  30.       "asDropdown": true,
  31.       "icon": "external link",
  32.       "includeVars": false,
  33.       "keepTime": false,
  34.       "tags": [
  35.         "unifi-poller"
  36.       ],
  37.       "targetBlank": false,
  38.       "title": "UniFi Poller",
  39.       "tooltip": "",
  40.       "type": "dashboards",
  41.       "url": ""
  42.     }
  43.   ],
  44.   "liveNow": false,
  45.   "panels": [
  46.     {
  47.       "datasource": {
  48.         "type": "influxdb",
  49.         "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  50.       },
  51.       "fieldConfig": {
  52.         "defaults": {
  53.           "color": {
  54.             "mode": "thresholds"
  55.           },
  56.           "mappings": [],
  57.           "max": 1200000000000,
  58.           "min": 0,
  59.           "thresholds": {
  60.             "mode": "percentage",
  61.             "steps": [
  62.               {
  63.                 "color": "green",
  64.                 "value": null
  65.               },
  66.               {
  67.                 "color": "#EAB839",
  68.                 "value": 75
  69.               },
  70.               {
  71.                 "color": "red",
  72.                 "value": 90
  73.               }
  74.             ]
  75.           },
  76.           "unit": "decbytes"
  77.         },
  78.         "overrides": []
  79.       },
  80.       "gridPos": {
  81.         "h": 7,
  82.         "w": 12,
  83.         "x": 0,
  84.         "y": 0
  85.       },
  86.       "id": 3,
  87.       "options": {
  88.         "orientation": "auto",
  89.         "reduceOptions": {
  90.           "calcs": [
  91.             "lastNotNull"
  92.           ],
  93.           "fields": "",
  94.           "values": false
  95.         },
  96.         "showThresholdLabels": false,
  97.         "showThresholdMarkers": true
  98.       },
  99.       "pluginVersion": "9.5.5",
  100.       "targets": [
  101.         {
  102.           "datasource": {
  103.             "type": "influxdb",
  104.             "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  105.           },
  106.           "groupBy": [
  107.             {
  108.               "params": [
  109.                 "$__interval"
  110.               ],
  111.               "type": "time"
  112.             },
  113.             {
  114.               "params": [
  115.                 "null"
  116.               ],
  117.               "type": "fill"
  118.             }
  119.           ],
  120.           "orderByTime": "ASC",
  121.           "query": "SELECT (r_end - r_start + t_end - t_start) as Total FROM\n  (SELECT first(tx_bytes) as t_start FROM usw WHERE $timeFilter),\n  (SELECT last(tx_bytes) as t_end FROM usw WHERE $timeFilter),\n  (SELECT first(rx_bytes) as r_start FROM usw WHERE $timeFilter),\n  (SELECT last(rx_bytes) as r_end FROM usw WHERE $timeFilter)\nfill(previous)",
  122.           "rawQuery": true,
  123.           "refId": "A",
  124.           "resultFormat": "table",
  125.           "select": [
  126.             [
  127.               {
  128.                 "params": [
  129.                   "value"
  130.                 ],
  131.                 "type": "field"
  132.               },
  133.               {
  134.                 "params": [],
  135.                 "type": "mean"
  136.               }
  137.             ]
  138.           ],
  139.           "tags": []
  140.         },
  141.         {
  142.           "datasource": {
  143.             "type": "influxdb",
  144.             "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  145.           },
  146.           "groupBy": [
  147.             {
  148.               "params": [
  149.                 "$__interval"
  150.               ],
  151.               "type": "time"
  152.             },
  153.             {
  154.               "params": [
  155.                 "null"
  156.               ],
  157.               "type": "fill"
  158.             }
  159.           ],
  160.           "hide": false,
  161.           "measurement": "usw",
  162.           "orderByTime": "ASC",
  163.           "policy": "autogen",
  164.           "refId": "B",
  165.           "resultFormat": "time_series",
  166.           "select": [
  167.             [
  168.               {
  169.                 "params": [
  170.                   "tx_bytes"
  171.                 ],
  172.                 "type": "field"
  173.               },
  174.               {
  175.                 "params": [],
  176.                 "type": "last"
  177.               },
  178.               {
  179.                 "params": [
  180.                   "Download"
  181.                 ],
  182.                 "type": "alias"
  183.               }
  184.             ],
  185.             [
  186.               {
  187.                 "params": [
  188.                   "rx_bytes"
  189.                 ],
  190.                 "type": "field"
  191.               },
  192.               {
  193.                 "params": [],
  194.                 "type": "last"
  195.               },
  196.               {
  197.                 "params": [
  198.                   "Upload"
  199.                 ],
  200.                 "type": "alias"
  201.               }
  202.             ]
  203.           ],
  204.           "tags": []
  205.         }
  206.       ],
  207.       "title": "Cumulative WAN Throughput",
  208.       "type": "gauge"
  209.     },
  210.     {
  211.       "datasource": {
  212.         "type": "influxdb",
  213.         "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  214.       },
  215.       "fieldConfig": {
  216.         "defaults": {
  217.           "color": {
  218.             "mode": "thresholds"
  219.           },
  220.           "mappings": [],
  221.           "max": 1200000000000,
  222.           "min": 0,
  223.           "thresholds": {
  224.             "mode": "percentage",
  225.             "steps": [
  226.               {
  227.                 "color": "blue",
  228.                 "value": null
  229.               }
  230.             ]
  231.           },
  232.           "unit": "decbytes"
  233.         },
  234.         "overrides": []
  235.       },
  236.       "gridPos": {
  237.         "h": 7,
  238.         "w": 12,
  239.         "x": 12,
  240.         "y": 0
  241.       },
  242.       "id": 5,
  243.       "options": {
  244.         "orientation": "auto",
  245.         "reduceOptions": {
  246.           "calcs": [
  247.             "lastNotNull"
  248.           ],
  249.           "fields": "",
  250.           "values": false
  251.         },
  252.         "showThresholdLabels": false,
  253.         "showThresholdMarkers": true
  254.       },
  255.       "pluginVersion": "9.5.5",
  256.       "targets": [
  257.         {
  258.           "datasource": {
  259.             "type": "influxdb",
  260.             "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  261.           },
  262.           "query": "SELECT (r_end - r_start + t_end - t_start) as Total FROM\n  (SELECT first(tx_bytes) as t_start FROM \"autogen\".\"usw_ports\" WHERE $timeFilter),\n  (SELECT last(tx_bytes) as t_end FROM \"autogen\".\"usw_ports\" WHERE $timeFilter),\n  (SELECT first(rx_bytes) as r_start FROM \"autogen\".\"usw_ports\" WHERE $timeFilter),\n  (SELECT last(rx_bytes) as r_end FROM \"autogen\".\"usw_ports\" WHERE $timeFilter)\nfill(previous)",
  263.           "rawQuery": true,
  264.           "refId": "A",
  265.           "resultFormat": "table"
  266.         },
  267.         {
  268.           "datasource": {
  269.             "type": "influxdb",
  270.             "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  271.           },
  272.           "groupBy": [
  273.             {
  274.               "params": [
  275.                 "$__interval"
  276.               ],
  277.               "type": "time"
  278.             },
  279.             {
  280.               "params": [
  281.                 "null"
  282.               ],
  283.               "type": "fill"
  284.             }
  285.           ],
  286.           "hide": false,
  287.           "measurement": "usw_ports",
  288.           "orderByTime": "ASC",
  289.           "policy": "autogen",
  290.           "refId": "B",
  291.           "resultFormat": "time_series",
  292.           "select": [
  293.             [
  294.               {
  295.                 "params": [
  296.                   "tx_bytes"
  297.                 ],
  298.                 "type": "field"
  299.               },
  300.               {
  301.                 "params": [],
  302.                 "type": "last"
  303.               },
  304.               {
  305.                 "params": [
  306.                   "Download"
  307.                 ],
  308.                 "type": "alias"
  309.               }
  310.             ],
  311.             [
  312.               {
  313.                 "params": [
  314.                   "rx_bytes"
  315.                 ],
  316.                 "type": "field"
  317.               },
  318.               {
  319.                 "params": [],
  320.                 "type": "last"
  321.               },
  322.               {
  323.                 "params": [
  324.                   "Upload"
  325.                 ],
  326.                 "type": "alias"
  327.               }
  328.             ]
  329.           ],
  330.           "tags": []
  331.         }
  332.       ],
  333.       "title": "Cumulative LAN Throughput",
  334.       "type": "gauge"
  335.     },
  336.     {
  337.       "datasource": {
  338.         "type": "influxdb",
  339.         "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  340.       },
  341.       "fieldConfig": {
  342.         "defaults": {
  343.           "color": {
  344.             "mode": "palette-classic"
  345.           },
  346.           "custom": {
  347.             "axisCenteredZero": false,
  348.             "axisColorMode": "text",
  349.             "axisLabel": "",
  350.             "axisPlacement": "auto",
  351.             "barAlignment": 0,
  352.             "drawStyle": "line",
  353.             "fillOpacity": 0,
  354.             "gradientMode": "none",
  355.             "hideFrom": {
  356.               "legend": false,
  357.               "tooltip": false,
  358.               "viz": false
  359.             },
  360.             "lineInterpolation": "linear",
  361.             "lineWidth": 1,
  362.             "pointSize": 5,
  363.             "scaleDistribution": {
  364.               "type": "linear"
  365.             },
  366.             "showPoints": "auto",
  367.             "spanNulls": false,
  368.             "stacking": {
  369.               "group": "A",
  370.               "mode": "none"
  371.             },
  372.             "thresholdsStyle": {
  373.               "mode": "off"
  374.             }
  375.           },
  376.           "mappings": [],
  377.           "max": 1200000000000,
  378.           "min": 0,
  379.           "thresholds": {
  380.             "mode": "percentage",
  381.             "steps": [
  382.               {
  383.                 "color": "green",
  384.                 "value": null
  385.               },
  386.               {
  387.                 "color": "#EAB839",
  388.                 "value": 75
  389.               },
  390.               {
  391.                 "color": "red",
  392.                 "value": 90
  393.               }
  394.             ]
  395.           },
  396.           "unit": "decbytes"
  397.         },
  398.         "overrides": []
  399.       },
  400.       "gridPos": {
  401.         "h": 1,
  402.         "w": 24,
  403.         "x": 0,
  404.         "y": 7
  405.       },
  406.       "id": 6,
  407.       "options": {
  408.         "legend": {
  409.           "calcs": [],
  410.           "displayMode": "list",
  411.           "placement": "bottom",
  412.           "showLegend": false
  413.         },
  414.         "tooltip": {
  415.           "mode": "single",
  416.           "sort": "none"
  417.         }
  418.       },
  419.       "pluginVersion": "9.5.5",
  420.       "targets": [
  421.         {
  422.           "datasource": {
  423.             "type": "influxdb",
  424.             "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  425.           },
  426.           "query": "SELECT (r_end - r_start + t_end - t_start) as tr_total FROM\n  (SELECT first(tx_bytes) as t_start FROM usg_wan_ports WHERE $timeFilter),\n  (SELECT last(tx_bytes) as t_end FROM usg_wan_ports WHERE $timeFilter),\n  (SELECT first(rx_bytes) as r_start FROM usg_wan_ports WHERE $timeFilter),\n  (SELECT last(rx_bytes) as r_end FROM usg_wan_ports WHERE $timeFilter)\nfill(previous)",
  427.           "rawQuery": true,
  428.           "refId": "A",
  429.           "resultFormat": "table"
  430.         }
  431.       ],
  432.       "title": "Cumulative WAN Throughput Alert",
  433.       "type": "timeseries"
  434.     },
  435.     {
  436.       "datasource": {
  437.         "type": "influxdb",
  438.         "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  439.       },
  440.       "fieldConfig": {
  441.         "defaults": {
  442.           "color": {
  443.             "mode": "palette-classic"
  444.           },
  445.           "custom": {
  446.             "axisCenteredZero": false,
  447.             "axisColorMode": "text",
  448.             "axisLabel": "",
  449.             "axisPlacement": "auto",
  450.             "barAlignment": 0,
  451.             "drawStyle": "line",
  452.             "fillOpacity": 0,
  453.             "gradientMode": "none",
  454.             "hideFrom": {
  455.               "legend": false,
  456.               "tooltip": false,
  457.               "viz": false
  458.             },
  459.             "lineInterpolation": "linear",
  460.             "lineStyle": {
  461.               "fill": "solid"
  462.             },
  463.             "lineWidth": 1,
  464.             "pointSize": 5,
  465.             "scaleDistribution": {
  466.               "type": "linear"
  467.             },
  468.             "showPoints": "auto",
  469.             "spanNulls": true,
  470.             "stacking": {
  471.               "group": "A",
  472.               "mode": "none"
  473.             },
  474.             "thresholdsStyle": {
  475.               "mode": "off"
  476.             }
  477.           },
  478.           "mappings": [],
  479.           "min": 0,
  480.           "thresholds": {
  481.             "mode": "absolute",
  482.             "steps": [
  483.               {
  484.                 "color": "green",
  485.                 "value": null
  486.               }
  487.             ]
  488.           },
  489.           "unit": "decbytes"
  490.         },
  491.         "overrides": []
  492.       },
  493.       "gridPos": {
  494.         "h": 10,
  495.         "w": 24,
  496.         "x": 0,
  497.         "y": 8
  498.       },
  499.       "id": 4,
  500.       "options": {
  501.         "legend": {
  502.           "calcs": [],
  503.           "displayMode": "list",
  504.           "placement": "bottom",
  505.           "showLegend": true
  506.         },
  507.         "tooltip": {
  508.           "mode": "multi",
  509.           "sort": "none"
  510.         }
  511.       },
  512.       "targets": [
  513.         {
  514.           "datasource": {
  515.             "type": "influxdb",
  516.             "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  517.           },
  518.           "groupBy": [
  519.             {
  520.               "params": [
  521.                 "$__interval"
  522.               ],
  523.               "type": "time"
  524.             },
  525.             {
  526.               "params": [
  527.                 "null"
  528.               ],
  529.               "type": "fill"
  530.             }
  531.           ],
  532.           "measurement": "usg_wan_ports",
  533.           "orderByTime": "ASC",
  534.           "policy": "autogen",
  535.           "query": "SELECT mean_rx, mean_tx FROM \n  (SELECT first(tx_bytes) as t_start FROM usg_wan_ports WHERE $timeFilter),\n  (SELECT last(tx_bytes) as t_end FROM usg_wan_ports WHERE $timeFilter),\n  (SELECT first(rx_bytes) as r_start FROM usg_wan_ports WHERE $timeFilter),\n  (SELECT last(rx_bytes) as r_end FROM usg_wan_ports WHERE $timeFilter),\n  (SELECT mean(\"rx_bytes\") as mean_rx FROM usg_wan_ports WHERE $timeFilter GROUP BY time($__interval) fill(null)),\n  (SELECT mean(\"tx_bytes\") as mean_tx FROM usg_wan_ports WHERE $timeFilter GROUP BY time($__interval) fill(null))\nWHERE $timeFilter\n",
  536.           "rawQuery": true,
  537.           "refId": "A",
  538.           "resultFormat": "time_series",
  539.           "select": [
  540.             [
  541.               {
  542.                 "params": [
  543.                   "rx_bytes"
  544.                 ],
  545.                 "type": "field"
  546.               },
  547.               {
  548.                 "params": [],
  549.                 "type": "mean"
  550.               }
  551.             ],
  552.             [
  553.               {
  554.                 "params": [
  555.                   "tx_bytes"
  556.                 ],
  557.                 "type": "field"
  558.               },
  559.               {
  560.                 "params": [],
  561.                 "type": "mean"
  562.               }
  563.             ]
  564.           ],
  565.           "tags": []
  566.         }
  567.       ],
  568.       "title": "Cumulative WAN Throughput",
  569.       "transformations": [],
  570.       "type": "timeseries"
  571.     },
  572.     {
  573.       "datasource": {
  574.         "type": "influxdb",
  575.         "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  576.       },
  577.       "fieldConfig": {
  578.         "defaults": {
  579.           "color": {
  580.             "mode": "palette-classic"
  581.           },
  582.           "custom": {
  583.             "axisCenteredZero": false,
  584.             "axisColorMode": "text",
  585.             "axisLabel": "",
  586.             "axisPlacement": "auto",
  587.             "barAlignment": 0,
  588.             "drawStyle": "line",
  589.             "fillOpacity": 25,
  590.             "gradientMode": "none",
  591.             "hideFrom": {
  592.               "legend": false,
  593.               "tooltip": false,
  594.               "viz": false
  595.             },
  596.             "lineInterpolation": "smooth",
  597.             "lineWidth": 1,
  598.             "pointSize": 5,
  599.             "scaleDistribution": {
  600.               "type": "linear"
  601.             },
  602.             "showPoints": "auto",
  603.             "spanNulls": false,
  604.             "stacking": {
  605.               "group": "A",
  606.               "mode": "none"
  607.             },
  608.             "thresholdsStyle": {
  609.               "mode": "off"
  610.             }
  611.           },
  612.           "mappings": [],
  613.           "thresholds": {
  614.             "mode": "absolute",
  615.             "steps": [
  616.               {
  617.                 "color": "green",
  618.                 "value": null
  619.               },
  620.               {
  621.                 "color": "red",
  622.                 "value": 80
  623.               }
  624.             ]
  625.           },
  626.           "unit": "Bps"
  627.         },
  628.         "overrides": [
  629.           {
  630.             "matcher": {
  631.               "id": "byName",
  632.               "options": "difference"
  633.             },
  634.             "properties": [
  635.               {
  636.                 "id": "displayName",
  637.                 "value": "Rx"
  638.               }
  639.             ]
  640.           },
  641.           {
  642.             "matcher": {
  643.               "id": "byName",
  644.               "options": "difference_1"
  645.             },
  646.             "properties": [
  647.               {
  648.                 "id": "displayName",
  649.                 "value": "Tx"
  650.               },
  651.               {
  652.                 "id": "custom.transform",
  653.                 "value": "negative-Y"
  654.               }
  655.             ]
  656.           }
  657.         ]
  658.       },
  659.       "gridPos": {
  660.         "h": 10,
  661.         "w": 24,
  662.         "x": 0,
  663.         "y": 18
  664.       },
  665.       "hideTimeOverride": true,
  666.       "id": 2,
  667.       "options": {
  668.         "legend": {
  669.           "calcs": [],
  670.           "displayMode": "list",
  671.           "placement": "bottom",
  672.           "showLegend": false
  673.         },
  674.         "tooltip": {
  675.           "mode": "multi",
  676.           "sort": "none"
  677.         }
  678.       },
  679.       "pluginVersion": "9.0.6",
  680.       "targets": [
  681.         {
  682.           "datasource": {
  683.             "type": "influxdb",
  684.             "uid": "YT4I7YGVz"
  685.           },
  686.           "groupBy": [
  687.             {
  688.               "params": [
  689.                 "1m"
  690.               ],
  691.               "type": "time"
  692.             },
  693.             {
  694.               "params": [
  695.                 "null"
  696.               ],
  697.               "type": "fill"
  698.             }
  699.           ],
  700.           "measurement": "usw_ports",
  701.           "orderByTime": "ASC",
  702.           "policy": "autogen",
  703.           "query": "SELECT difference(mean(\"rx_bytes\")), difference(mean(\"tx_bytes\")) FROM \"usw_ports\" WHERE (\"device_name\" = 'Office Lite 8 PoE' AND \"port_id\" = 'Office Lite 8 PoE Port 5') AND $timeFilter GROUP BY time($__interval) fill(null)",
  704.           "rawQuery": false,
  705.           "refId": "A",
  706.           "resultFormat": "logs",
  707.           "select": [
  708.             [
  709.               {
  710.                 "params": [
  711.                   "rx_bytes"
  712.                 ],
  713.                 "type": "field"
  714.               },
  715.               {
  716.                 "params": [],
  717.                 "type": "mean"
  718.               },
  719.               {
  720.                 "params": [],
  721.                 "type": "difference"
  722.               },
  723.               {
  724.                 "params": [
  725.                   " / 60"
  726.                 ],
  727.                 "type": "math"
  728.               }
  729.             ],
  730.             [
  731.               {
  732.                 "params": [
  733.                   "tx_bytes"
  734.                 ],
  735.                 "type": "field"
  736.               },
  737.               {
  738.                 "params": [],
  739.                 "type": "mean"
  740.               },
  741.               {
  742.                 "params": [],
  743.                 "type": "difference"
  744.               },
  745.               {
  746.                 "params": [
  747.                   " / 60"
  748.                 ],
  749.                 "type": "math"
  750.               }
  751.             ]
  752.           ],
  753.           "tags": [
  754.             {
  755.               "key": "device_name::tag",
  756.               "operator": "=",
  757.               "value": "Dream Machine Pro"
  758.             },
  759.             {
  760.               "condition": "AND",
  761.               "key": "port_idx::tag",
  762.               "operator": "=",
  763.               "value": "9"
  764.             }
  765.           ]
  766.         }
  767.       ],
  768.       "title": "WAN Current Rates",
  769.       "type": "timeseries"
  770.     },
  771.     {
  772.       "datasource": {
  773.         "type": "influxdb",
  774.         "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  775.       },
  776.       "description": "",
  777.       "fieldConfig": {
  778.         "defaults": {
  779.           "color": {
  780.             "mode": "thresholds"
  781.           },
  782.           "custom": {
  783.             "align": "auto",
  784.             "cellOptions": {
  785.               "type": "auto"
  786.             },
  787.             "inspect": false
  788.           },
  789.           "mappings": [],
  790.           "thresholds": {
  791.             "mode": "absolute",
  792.             "steps": [
  793.               {
  794.                 "color": "green",
  795.                 "value": null
  796.               },
  797.               {
  798.                 "color": "red",
  799.                 "value": 80
  800.               }
  801.             ]
  802.           }
  803.         },
  804.         "overrides": [
  805.           {
  806.             "matcher": {
  807.               "id": "byRegexp",
  808.               "options": "/^Bytes/"
  809.             },
  810.             "properties": [
  811.               {
  812.                 "id": "unit",
  813.                 "value": "decbytes"
  814.               },
  815.               {
  816.                 "id": "decimals",
  817.                 "value": 1
  818.               },
  819.               {
  820.                 "id": "custom.align"
  821.               }
  822.             ]
  823.           },
  824.           {
  825.             "matcher": {
  826.               "id": "byName",
  827.               "options": "mac"
  828.             },
  829.             "properties": [
  830.               {
  831.                 "id": "displayName",
  832.                 "value": "Device MAC"
  833.               },
  834.               {
  835.                 "id": "unit",
  836.                 "value": "short"
  837.               },
  838.               {
  839.                 "id": "decimals",
  840.                 "value": 2
  841.               },
  842.               {
  843.                 "id": "custom.align"
  844.               }
  845.             ]
  846.           },
  847.           {
  848.             "matcher": {
  849.               "id": "byName",
  850.               "options": "Uptime"
  851.             },
  852.             "properties": [
  853.               {
  854.                 "id": "unit",
  855.                 "value": "s"
  856.               },
  857.               {
  858.                 "id": "decimals",
  859.                 "value": 2
  860.               },
  861.               {
  862.                 "id": "custom.align"
  863.               }
  864.             ]
  865.           }
  866.         ]
  867.       },
  868.       "gridPos": {
  869.         "h": 12,
  870.         "w": 24,
  871.         "x": 0,
  872.         "y": 28
  873.       },
  874.       "id": 8,
  875.       "links": [],
  876.       "options": {
  877.         "cellHeight": "sm",
  878.         "footer": {
  879.           "countRows": false,
  880.           "fields": "",
  881.           "reducer": [
  882.             "sum"
  883.           ],
  884.           "show": false
  885.         },
  886.         "frameIndex": 0,
  887.         "showHeader": true,
  888.         "sortBy": [
  889.           {
  890.             "desc": true,
  891.             "displayName": "Bytes Total"
  892.           }
  893.         ]
  894.       },
  895.       "pluginVersion": "9.5.5",
  896.       "targets": [
  897.         {
  898.           "datasource": {
  899.             "type": "influxdb",
  900.             "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  901.           },
  902.           "groupBy": [
  903.             {
  904.               "params": [
  905.                 "mac"
  906.               ],
  907.               "type": "tag"
  908.             }
  909.           ],
  910.           "hide": false,
  911.           "measurement": "clients",
  912.           "orderByTime": "ASC",
  913.           "policy": "autogen",
  914.           "query": "SELECT last(\"essid\") AS \"ESSID\", last(\"uptime\") AS \"Uptime\", mean(\"rx_bytes\") AS \"Bytes Rx\", mean(\"tx_bytes\") AS \"Bytes Tx\", last(\"ip\") AS \"Address\", last(\"hostname\") AS \"Name\" FROM \"autogen\".\"clients\" WHERE $timeFilter GROUP BY \"mac\"",
  915.           "rawQuery": false,
  916.           "refId": "A",
  917.           "resultFormat": "table",
  918.           "select": [
  919.             [
  920.               {
  921.                 "params": [
  922.                   "essid"
  923.                 ],
  924.                 "type": "field"
  925.               },
  926.               {
  927.                 "params": [],
  928.                 "type": "last"
  929.               },
  930.               {
  931.                 "params": [
  932.                   "ESSID"
  933.                 ],
  934.                 "type": "alias"
  935.               }
  936.             ],
  937.             [
  938.               {
  939.                 "params": [
  940.                   "uptime"
  941.                 ],
  942.                 "type": "field"
  943.               },
  944.               {
  945.                 "params": [],
  946.                 "type": "last"
  947.               },
  948.               {
  949.                 "params": [
  950.                   "Uptime"
  951.                 ],
  952.                 "type": "alias"
  953.               }
  954.             ],
  955.             [
  956.               {
  957.                 "params": [
  958.                   "rx_bytes"
  959.                 ],
  960.                 "type": "field"
  961.               },
  962.               {
  963.                 "params": [],
  964.                 "type": "mean"
  965.               },
  966.               {
  967.                 "params": [
  968.                   "Bytes Rx"
  969.                 ],
  970.                 "type": "alias"
  971.               }
  972.             ],
  973.             [
  974.               {
  975.                 "params": [
  976.                   "tx_bytes"
  977.                 ],
  978.                 "type": "field"
  979.               },
  980.               {
  981.                 "params": [],
  982.                 "type": "mean"
  983.               },
  984.               {
  985.                 "params": [
  986.                   "Bytes Tx"
  987.                 ],
  988.                 "type": "alias"
  989.               }
  990.             ],
  991.             [
  992.               {
  993.                 "params": [
  994.                   "ip"
  995.                 ],
  996.                 "type": "field"
  997.               },
  998.               {
  999.                 "params": [],
  1000.                 "type": "last"
  1001.               },
  1002.               {
  1003.                 "params": [
  1004.                   "Address"
  1005.                 ],
  1006.                 "type": "alias"
  1007.               }
  1008.             ],
  1009.             [
  1010.               {
  1011.                 "params": [
  1012.                   "hostname"
  1013.                 ],
  1014.                 "type": "field"
  1015.               },
  1016.               {
  1017.                 "params": [],
  1018.                 "type": "last"
  1019.               },
  1020.               {
  1021.                 "params": [
  1022.                   "Name"
  1023.                 ],
  1024.                 "type": "alias"
  1025.               }
  1026.             ]
  1027.           ],
  1028.           "tags": []
  1029.         },
  1030.         {
  1031.           "datasource": {
  1032.             "type": "influxdb",
  1033.             "uid": "c41e2d38-d75a-4234-a388-4f6818042d65"
  1034.           },
  1035.           "groupBy": [
  1036.             {
  1037.               "params": [
  1038.                 "$__interval"
  1039.               ],
  1040.               "type": "time"
  1041.             },
  1042.             {
  1043.               "params": [
  1044.                 "null"
  1045.               ],
  1046.               "type": "fill"
  1047.             }
  1048.           ],
  1049.           "hide": false,
  1050.           "orderByTime": "ASC",
  1051.           "query": "SELECT ESSID, Uptime, Address, Hostname, BytesRx, BytesTx, r_start, t_start, r_end, t_end\nFROM \n  (SELECT last(\"essid\") AS \"ESSID\" FROM \"autogen\".\"clients\" WHERE $timeFilter),\n  (SELECT last(\"uptime\") AS \"Uptime\" FROM \"autogen\".\"clients\" WHERE $timeFilter),\n  (SELECT last(\"ip\") AS \"Address\" FROM \"autogen\".\"clients\" WHERE $timeFilter),\n  (SELECT last(\"hostname\") AS \"Hostname\" FROM \"autogen\".\"clients\" WHERE $timeFilter),\n\n  (SELECT mean(\"rx_bytes\") AS \"BytesRx\" FROM \"autogen\".\"clients\" WHERE $timeFilter),\n  (SELECT mean(\"tx_bytes\") AS \"BytesTx\" FROM \"autogen\".\"clients\" WHERE $timeFilter),\n\n  (SELECT first(tx_bytes) as t_start FROM \"autogen\".\"clients\" WHERE $timeFilter),\n  (SELECT last(tx_bytes) as t_end FROM \"autogen\".\"clients\" WHERE $timeFilter),\n  (SELECT first(rx_bytes) as r_start FROM \"autogen\".\"clients\" WHERE $timeFilter),\n  (SELECT last(rx_bytes) as r_end FROM \"autogen\".\"clients\" WHERE $timeFilter)\n\nWHERE $timeFilter GROUP BY \"mac\" fill(previous)",
  1052.           "rawQuery": true,
  1053.           "refId": "B",
  1054.           "resultFormat": "table",
  1055.           "select": [
  1056.             [
  1057.               {
  1058.                 "params": [
  1059.                   "value"
  1060.                 ],
  1061.                 "type": "field"
  1062.               },
  1063.               {
  1064.                 "params": [],
  1065.                 "type": "mean"
  1066.               }
  1067.             ]
  1068.           ],
  1069.           "tags": []
  1070.         }
  1071.       ],
  1072.       "title": "Clients",
  1073.       "transform": "table",
  1074.       "transformations": [
  1075.         {
  1076.           "id": "organize",
  1077.           "options": {
  1078.             "excludeByName": {
  1079.               "Time": true,
  1080.               "channel": true,
  1081.               "radio_name": true,
  1082.               "radio_proto": true
  1083.             },
  1084.             "indexByName": {
  1085.               "Address": 3,
  1086.               "Bytes Rx": 6,
  1087.               "Bytes Tx": 7,
  1088.               "ESSID": 4,
  1089.               "Name": 2,
  1090.               "Time": 0,
  1091.               "Uptime": 5,
  1092.               "mac": 1
  1093.             },
  1094.             "renameByName": {}
  1095.           }
  1096.         },
  1097.         {
  1098.           "id": "calculateField",
  1099.           "options": {
  1100.             "alias": "Bytes Total",
  1101.             "binary": {
  1102.               "left": "Bytes Rx",
  1103.               "reducer": "sum",
  1104.               "right": "Bytes Tx"
  1105.             },
  1106.             "mode": "binary",
  1107.             "reduce": {
  1108.               "reducer": "sum"
  1109.             },
  1110.             "replaceFields": false
  1111.           }
  1112.         }
  1113.       ],
  1114.       "type": "table"
  1115.     }
  1116.   ],
  1117.   "refresh": "30s",
  1118.   "schemaVersion": 38,
  1119.   "style": "dark",
  1120.   "tags": [
  1121.     "unifi",
  1122.     "unifi-poller"
  1123.   ],
  1124.   "templating": {
  1125.     "list": []
  1126.   },
  1127.   "time": {
  1128.     "from": "now/M",
  1129.     "to": "now"
  1130.   },
  1131.   "timepicker": {},
  1132.   "timezone": "",
  1133.   "title": "Unifi: Overview",
  1134.   "uid": "d0c5adb7-b45a-441e-a632-e3d8127259ea",
  1135.   "version": 27,
  1136.   "weekStart": ""
  1137. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement