From cd147708fdac11492797abe36e1884f03ffaaa6c Mon Sep 17 00:00:00 2001 From: rchac Date: Mon, 6 Feb 2023 18:41:23 -0700 Subject: [PATCH] Add back v1.3 directory --- .gitmodules | 3 + old/v1.3/INTEGRATION_HOWTO.md | 149 + old/v1.3/LibreQoS.py | 1255 +++++++++ old/v1.3/README.md | 46 + old/v1.3/ShapedDevices.example.csv | 14 + old/v1.3/cpumap-pping | 1 + old/v1.3/graphInfluxDB.py | 557 ++++ old/v1.3/influxDBdashboardTemplate.json | 2390 +++++++++++++++++ .../influxDBdashboardTemplate_v2.5.1.json | 1 + old/v1.3/integrationCommon.py | 421 +++ old/v1.3/integrationSplynx.py | 125 + old/v1.3/integrationUISP.py | 220 ++ old/v1.3/ispConfig.example.py | 101 + old/v1.3/mikrotikDHCPRouterList.csv | 2 + old/v1.3/mikrotikFindIPv6.py | 52 + old/v1.3/network.example.json | 75 + old/v1.3/scheduler.py | 62 + old/v1.3/testGraph.py | 333 +++ old/v1.3/testIP.py | 54 + old/v1.3/testdata/ispConfig.py | 2 + old/v1.3/testdata/sample_layout.png | Bin 0 -> 63014 bytes 21 files changed, 5863 insertions(+) create mode 100644 old/v1.3/INTEGRATION_HOWTO.md create mode 100755 old/v1.3/LibreQoS.py create mode 100644 old/v1.3/README.md create mode 100644 old/v1.3/ShapedDevices.example.csv create mode 160000 old/v1.3/cpumap-pping create mode 100644 old/v1.3/graphInfluxDB.py create mode 100644 old/v1.3/influxDBdashboardTemplate.json create mode 100644 old/v1.3/influxDBdashboardTemplate_v2.5.1.json create mode 100644 old/v1.3/integrationCommon.py create mode 100644 old/v1.3/integrationSplynx.py create mode 100644 old/v1.3/integrationUISP.py create mode 100644 old/v1.3/ispConfig.example.py create mode 100644 old/v1.3/mikrotikDHCPRouterList.csv create mode 100644 old/v1.3/mikrotikFindIPv6.py create mode 100644 old/v1.3/network.example.json create mode 100644 old/v1.3/scheduler.py create mode 100644 old/v1.3/testGraph.py create mode 100644 old/v1.3/testIP.py create mode 100644 old/v1.3/testdata/ispConfig.py create mode 100644 old/v1.3/testdata/sample_layout.png diff --git a/.gitmodules b/.gitmodules index dedd1df3..abd2e670 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,3 +14,6 @@ path = old/v1.2/xdp-cpumap-tc url = https://github.com/xdp-project/xdp-cpumap-tc.git +[submodule "old/v1.3/cpumap-pping"] + path = old/v1.3/cpumap-pping + url = https://github.com/thebracket/cpumap-pping diff --git a/old/v1.3/INTEGRATION_HOWTO.md b/old/v1.3/INTEGRATION_HOWTO.md new file mode 100644 index 00000000..793ae32a --- /dev/null +++ b/old/v1.3/INTEGRATION_HOWTO.md @@ -0,0 +1,149 @@ +# LibreQoS Integrations + +If you need to create an integration for your network, we've tried to give you the tools you need. We currently ship integrations for UISP and Spylnx. We'd love to include more. + +### Overall Concept + +LibreQoS enforces customer bandwidth limits, and applies CAKE-based optimizations at several levels: + +* Per-user Cake flows are created. These require the maximum bandwidth permitted per customer. + * Customers can have more than one device that share a pool of bandwidth. Customers are grouped into "circuits" +* *Optional* Access points can have a speed limit/queue, applied to all customers associated with the access point. +* *Optional* Sites can contain access points, and apply a speed limit/queue to all access points (and associated circuits). +* *Optional* Sites can be nested beneath other sites and access point, providing for a queue hierarchy that represents physical limitations of backhaul connections. + +Additionally, you might grow to have more than one shaper - and need to express your network topology from the perspective of different parts of your network. (For example, if *Site A* and *Site B* both have Internet connections - you want to generate an efficient topology for both sites. It's helpful if you can derive this from the same overall topology) + +LibreQoS's network modeling accomplishes this by modeling your network as a *graph*: a series of interconnected nodes, each featuring a "parent". Any "node" (entry) in the graph can be turned into a "root" node, allowing you to generate the `network.json` and `ShapedDevices.csv` files required to manage your customers from the perspective of that root node. + +### Flat Shaping + +The simplest form of integration produces a "flat" network. This is the highest performance model in terms of raw throughput, but lacks the ability to provide shaping at the access point or site level: every customer site is parented directly off the root. + +> For an integration, it's recommended that you fetch the customer/device data from your management system rather than type them all in Python. + +A flat integration is relatively simple. Start by importing the common API: + +```python +from integrationCommon import isIpv4Permitted, fixSubnet, NetworkGraph, NetworkNode, NodeType +``` + +Then create an empty network graph (it will grow to represent your network): + +```python +net = NetworkGraph() +``` + +Once you have your `NetworkGraph` object, you start adding customers and devices. Customers may have any number of devices. You can add a single customer with one device as follows: + +```python +# Add the customer +customer = NetworkNode( + id="Unique Customer ID", + displayName="The Doe Family", + type=NodeType.client, + download=100, # Download is in Mbit/second + upload=20, # Upload is in Mbit/second + address="1 My Road, My City, My State") +net.addRawNode(customer) # Insert the customer ID + +# Give them a device +device = NetworkNode( + id="Unique Device ID", + displayName="Doe Family CPE", + parentId="Unique Customer ID", # must match the customer's ID + type=NodeType.device, + ipv4=["100.64.1.5/32"], # As many as you need, express networks as the network ID - e.g. 192.168.100.0/24 + ipv6=["feed:beef::12/64"], # Same again. May be [] for none. + mac="00:00:5e:00:53:af" +) +net.addRawNode(device) +``` + +If the customer has multiple devices, you can add as many as you want - with `ParentId` continuing to match the parent customer's `id`. + +Once you have entered all of your customers, you can finish the integration: + +```python +net.prepareTree() # This is required, and builds parent-child relationships. +net.createNetworkJson() # Create `network.json` +net.createShapedDevices() # Create the `ShapedDevices.csv` file. +``` + +### Detailed Hierarchies + +Creating a full hierarchy (with as many levels as you want) uses a similar strategy to flat networks---we recommend that you start by reading the "flat shaping" section above. + +Start by importing the common API: + +```python +from integrationCommon import isIpv4Permitted, fixSubnet, NetworkGraph, NetworkNode, NodeType +``` + +Then create an empty network graph (it will grow to represent your network): + +```python +net = NetworkGraph() +``` + +Now you can start to insert sites and access points. Sites and access points are inserted like customer or device nodes: they have a unique ID, and a `ParentId`. Customers can then use a `ParentId` of the site or access point beneath which they should be located. + +For example, let's create `Site_1` and `Site_2` - at the top of the tree: + +```python +net.addRawNode(NetworkNode(id="Site_1", displayName="Site_1", parentId="", type=NodeType.site, download=1000, upload=1000)) +net.addRawNode(NetworkNode(id="Site_2", displayName="Site_2", parentId="", type=NodeType.site, download=500, upload=500)) +``` + +Let's attach some access points and point-of-presence sites: + +```python +net.addRawNode(NetworkNode(id="AP_A", displayName="AP_A", parentId="Site_1", type=NodeType.ap, download=500, upload=500)) +net.addRawNode(NetworkNode(id="Site_3", displayName="Site_3", parentId="Site_1", type=NodeType.site, download=500, upload=500)) +net.addRawNode(NetworkNode(id="PoP_5", displayName="PoP_5", parentId="Site_3", type=NodeType.site, download=200, upload=200)) +net.addRawNode(NetworkNode(id="AP_9", displayName="AP_9", parentId="PoP_5", type=NodeType.ap, download=120, upload=120)) +net.addRawNode(NetworkNode(id="PoP_6", displayName="PoP_6", parentId="PoP_5", type=NodeType.site, download=60, upload=60)) +net.addRawNode(NetworkNode(id="AP_11", displayName="AP_11", parentId="PoP_6", type=NodeType.ap, download=30, upload=30)) +net.addRawNode(NetworkNode(id="PoP_1", displayName="PoP_1", parentId="Site_2", type=NodeType.site, download=200, upload=200)) +net.addRawNode(NetworkNode(id="AP_7", displayName="AP_7", parentId="PoP_1", type=NodeType.ap, download=100, upload=100)) +net.addRawNode(NetworkNode(id="AP_1", displayName="AP_1", parentId="Site_2", type=NodeType.ap, download=150, upload=150)) +``` + +When you attach a customer, you can specify a tree entry (e.g. `PoP_5`) as a parent: + +```python +# Add the customer +customer = NetworkNode( + id="Unique Customer ID", + displayName="The Doe Family", + parentId="PoP_5", + type=NodeType.client, + download=100, # Download is in Mbit/second + upload=20, # Upload is in Mbit/second + address="1 My Road, My City, My State") +net.addRawNode(customer) # Insert the customer ID + +# Give them a device +device = NetworkNode( + id="Unique Device ID", + displayName="Doe Family CPE", + parentId="Unique Customer ID", # must match the customer's ID + type=NodeType.device, + ipv4=["100.64.1.5/32"], # As many as you need, express networks as the network ID - e.g. 192.168.100.0/24 + ipv6=["feed:beef::12/64"], # Same again. May be [] for none. + mac="00:00:5e:00:53:af" +) +net.addRawNode(device) +``` + +Once you have entered all of your network topology and customers, you can finish the integration: + +```python +net.prepareTree() # This is required, and builds parent-child relationships. +net.createNetworkJson() # Create `network.json` +net.createShapedDevices() # Create the `ShapedDevices.csv` file. +``` + +You can also add a call to `net.plotNetworkGraph(False)` (use `True` to also include every customer; this can make for a HUGE file) to create a PDF file (currently named `network.pdf.pdf`) displaying your topology. The example shown here looks like this: + +![](testdata/sample_layout.png) diff --git a/old/v1.3/LibreQoS.py b/old/v1.3/LibreQoS.py new file mode 100755 index 00000000..dba2184a --- /dev/null +++ b/old/v1.3/LibreQoS.py @@ -0,0 +1,1255 @@ +#!/usr/bin/python3 +# v1.3 + +import csv +import io +import ipaddress +import json +import math +import os +import os.path +import subprocess +from subprocess import PIPE, STDOUT +from datetime import datetime, timedelta +import multiprocessing +import warnings +import psutil +import argparse +import logging +import shutil +import binpacking + +from ispConfig import sqm, upstreamBandwidthCapacityDownloadMbps, upstreamBandwidthCapacityUploadMbps, \ + interfaceA, interfaceB, enableActualShellCommands, useBinPackingToBalanceCPU, monitorOnlyMode, \ + runShellCommandsAsSudo, generatedPNDownloadMbps, generatedPNUploadMbps, queuesAvailableOverride, \ + OnAStick + +# Automatically account for TCP overhead of plans. For example a 100Mbps plan needs to be set to 109Mbps for the user to ever see that result on a speed test +# Does not apply to nodes of any sort, just endpoint devices +tcpOverheadFactor = 1.09 + +def shell(command): + if enableActualShellCommands: + if runShellCommandsAsSudo: + command = 'sudo ' + command + logging.info(command) + commands = command.split(' ') + proc = subprocess.Popen(commands, stdout=subprocess.PIPE) + for line in io.TextIOWrapper(proc.stdout, encoding="utf-8"): # or another encoding + if logging.DEBUG <= logging.root.level: + print(line) + if ("RTNETLINK answers" in line) or ("We have an error talking to the kernel" in line): + warnings.warn("Command: '" + command + "' resulted in " + line, stacklevel=2) + else: + logging.info(command) + +def shellTC(command): + if enableActualShellCommands: + print(command) + commands = command.split(' ') + proc = subprocess.Popen(commands, stdout=subprocess.PIPE) + for line in io.TextIOWrapper(proc.stdout, encoding="utf-8"): # or another encoding + if logging.DEBUG <= logging.root.level: + print(line) + if ("RTNETLINK answers" in line) or ("We have an error talking to the kernel" in line): + warnings.warn("Command: '" + command + "' resulted in " + line, stacklevel=2) + raise SystemError("Command: '" + command + "' resulted in " + line) + +def checkIfFirstRunSinceBoot(): + if os.path.isfile("lastRun.txt"): + with open("lastRun.txt", 'r') as file: + lastRun = datetime.strptime(file.read(), "%d-%b-%Y (%H:%M:%S.%f)") + systemRunningSince = datetime.fromtimestamp(psutil.boot_time()) + if systemRunningSince > lastRun: + print("First time run since system boot.") + return True + else: + print("Not first time run since system boot.") + return False + else: + print("First time run since system boot.") + return True + +def clearPriorSettings(interfaceA, interfaceB): + if enableActualShellCommands: + # Clear tc filter + shell('tc qdisc delete dev ' + interfaceA + ' root') + shell('tc qdisc delete dev ' + interfaceB + ' root') + #shell('tc qdisc delete dev ' + interfaceA) + #shell('tc qdisc delete dev ' + interfaceB) + +def tearDown(interfaceA, interfaceB): + # Full teardown of everything for exiting LibreQoS + if enableActualShellCommands: + # Clear IP filters and remove xdp program from interfaces + result = os.system('./xdp_iphash_to_cpu_cmdline clear') + # The daemon is controling this now, let's not confuse things + #shell('ip link set dev ' + interfaceA + ' xdp off') + #shell('ip link set dev ' + interfaceB + ' xdp off') + clearPriorSettings(interfaceA, interfaceB) + +def findQueuesAvailable(): + # Find queues and CPU cores available. Use min between those two as queuesAvailable + if enableActualShellCommands: + if queuesAvailableOverride == 0: + queuesAvailable = 0 + path = '/sys/class/net/' + interfaceA + '/queues/' + directory_contents = os.listdir(path) + for item in directory_contents: + if "tx-" in str(item): + queuesAvailable += 1 + print("NIC queues:\t\t\t" + str(queuesAvailable)) + else: + queuesAvailable = queuesAvailableOverride + print("NIC queues (Override):\t\t\t" + str(queuesAvailable)) + cpuCount = multiprocessing.cpu_count() + print("CPU cores:\t\t\t" + str(cpuCount)) + if queuesAvailable < 2: + raise SystemError('Only 1 NIC rx/tx queue avaialable. You will need to use a NIC with 2 or more rx/tx queues available.') + if queuesAvailable < 2: + raise SystemError('Only 1 CPU core avaialable. You will need to use a CPU with 2 or more CPU cores.') + queuesAvailable = min(queuesAvailable,cpuCount) + print("queuesAvailable set to:\t" + str(queuesAvailable)) + else: + print("As enableActualShellCommands is False, CPU core / queue count has been set to 16") + logging.info("NIC queues:\t\t\t" + str(16)) + cpuCount = multiprocessing.cpu_count() + logging.info("CPU cores:\t\t\t" + str(16)) + logging.info("queuesAvailable set to:\t" + str(16)) + queuesAvailable = 16 + return queuesAvailable + +def validateNetworkAndDevices(): + # Verify Network.json is valid json + networkValidatedOrNot = True + with open('network.json') as file: + try: + temporaryVariable = json.load(file) # put JSON-data to a variable + except json.decoder.JSONDecodeError: + warnings.warn("network.json is an invalid JSON file", stacklevel=2) # in case json is invalid + networkValidatedOrNot = False + if networkValidatedOrNot == True: + print("network.json passed validation") + # Verify ShapedDevices.csv is valid + devicesValidatedOrNot = True # True by default, switches to false if ANY entry in ShapedDevices.csv fails validation + rowNum = 2 + with open('ShapedDevices.csv') as csv_file: + csv_reader = csv.reader(csv_file, delimiter=',') + #Remove comments if any + commentsRemoved = [] + for row in csv_reader: + if not row[0].startswith('#'): + commentsRemoved.append(row) + #Remove header + commentsRemoved.pop(0) + seenTheseIPsAlready = [] + for row in commentsRemoved: + circuitID, circuitName, deviceID, deviceName, ParentNode, mac, ipv4_input, ipv6_input, downloadMin, uploadMin, downloadMax, uploadMax, comment = row + # Must have circuitID, it's a unique identifier requried for stateful changes to queue structure + if circuitID == '': + warnings.warn("No Circuit ID provided in ShapedDevices.csv at row " + str(rowNum), stacklevel=2) + devicesValidatedOrNot = False + # Each entry in ShapedDevices.csv can have multiple IPv4s or IPv6s seperated by commas. Split them up and parse each to ensure valid + ipv4_subnets_and_hosts = [] + ipv6_subnets_and_hosts = [] + if ipv4_input != "": + try: + ipv4_input = ipv4_input.replace(' ','') + if "," in ipv4_input: + ipv4_list = ipv4_input.split(',') + else: + ipv4_list = [ipv4_input] + for ipEntry in ipv4_list: + if ipEntry in seenTheseIPsAlready: + warnings.warn("Provided IPv4 '" + ipEntry + "' in ShapedDevices.csv at row " + str(rowNum) + " is duplicate.", stacklevel=2) + devicesValidatedOrNot = False + seenTheseIPsAlready.append(ipEntry) + else: + if (type(ipaddress.ip_network(ipEntry)) is ipaddress.IPv4Network) or (type(ipaddress.ip_address(ipEntry)) is ipaddress.IPv4Address): + ipv4_subnets_and_hosts.extend(ipEntry) + else: + warnings.warn("Provided IPv4 '" + ipEntry + "' in ShapedDevices.csv at row " + str(rowNum) + " is not valid.", stacklevel=2) + devicesValidatedOrNot = False + seenTheseIPsAlready.append(ipEntry) + except: + warnings.warn("Provided IPv4 '" + ipv4_input + "' in ShapedDevices.csv at row " + str(rowNum) + " is not valid.", stacklevel=2) + devicesValidatedOrNot = False + if ipv6_input != "": + try: + ipv6_input = ipv6_input.replace(' ','') + if "," in ipv6_input: + ipv6_list = ipv6_input.split(',') + else: + ipv6_list = [ipv6_input] + for ipEntry in ipv6_list: + if ipEntry in seenTheseIPsAlready: + warnings.warn("Provided IPv6 '" + ipEntry + "' in ShapedDevices.csv at row " + str(rowNum) + " is duplicate.", stacklevel=2) + devicesValidatedOrNot = False + seenTheseIPsAlready.append(ipEntry) + else: + if (type(ipaddress.ip_network(ipEntry)) is ipaddress.IPv6Network) or (type(ipaddress.ip_address(ipEntry)) is ipaddress.IPv6Address): + ipv6_subnets_and_hosts.extend(ipEntry) + else: + warnings.warn("Provided IPv6 '" + ipEntry + "' in ShapedDevices.csv at row " + str(rowNum) + " is not valid.", stacklevel=2) + devicesValidatedOrNot = False + seenTheseIPsAlready.append(ipEntry) + except: + warnings.warn("Provided IPv6 '" + ipv6_input + "' in ShapedDevices.csv at row " + str(rowNum) + " is not valid.", stacklevel=2) + devicesValidatedOrNot = False + try: + a = int(downloadMin) + if a < 1: + warnings.warn("Provided downloadMin '" + downloadMin + "' in ShapedDevices.csv at row " + str(rowNum) + " is < 1 Mbps.", stacklevel=2) + devicesValidatedOrNot = False + except: + warnings.warn("Provided downloadMin '" + downloadMin + "' in ShapedDevices.csv at row " + str(rowNum) + " is not a valid integer.", stacklevel=2) + devicesValidatedOrNot = False + try: + a = int(uploadMin) + if a < 1: + warnings.warn("Provided uploadMin '" + uploadMin + "' in ShapedDevices.csv at row " + str(rowNum) + " is < 1 Mbps.", stacklevel=2) + devicesValidatedOrNot = False + except: + warnings.warn("Provided uploadMin '" + uploadMin + "' in ShapedDevices.csv at row " + str(rowNum) + " is not a valid integer.", stacklevel=2) + devicesValidatedOrNot = False + try: + a = int(downloadMax) + if a < 2: + warnings.warn("Provided downloadMax '" + downloadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is < 2 Mbps.", stacklevel=2) + devicesValidatedOrNot = False + except: + warnings.warn("Provided downloadMax '" + downloadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is not a valid integer.", stacklevel=2) + devicesValidatedOrNot = False + try: + a = int(uploadMax) + if a < 2: + warnings.warn("Provided uploadMax '" + uploadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is < 2 Mbps.", stacklevel=2) + devicesValidatedOrNot = False + except: + warnings.warn("Provided uploadMax '" + uploadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is not a valid integer.", stacklevel=2) + devicesValidatedOrNot = False + + try: + if int(downloadMin) > int(downloadMax): + warnings.warn("Provided downloadMin '" + downloadMin + "' in ShapedDevices.csv at row " + str(rowNum) + " is greater than downloadMax", stacklevel=2) + devicesValidatedOrNot = False + if int(uploadMin) > int(uploadMax): + warnings.warn("Provided uploadMin '" + downloadMin + "' in ShapedDevices.csv at row " + str(rowNum) + " is greater than uploadMax", stacklevel=2) + devicesValidatedOrNot = False + except: + devicesValidatedOrNot = False + + rowNum += 1 + if devicesValidatedOrNot == True: + print("ShapedDevices.csv passed validation") + else: + print("ShapedDevices.csv failed validation") + + if (devicesValidatedOrNot == True) and (devicesValidatedOrNot == True): + return True + else: + return False + +def loadSubscriberCircuits(shapedDevicesFile): + # Load Subscriber Circuits & Devices + subscriberCircuits = [] + knownCircuitIDs = [] + counterForCircuitsWithoutParentNodes = 0 + dictForCircuitsWithoutParentNodes = {} + with open(shapedDevicesFile) as csv_file: + csv_reader = csv.reader(csv_file, delimiter=',') + # Remove comments if any + commentsRemoved = [] + for row in csv_reader: + if not row[0].startswith('#'): + commentsRemoved.append(row) + # Remove header + commentsRemoved.pop(0) + for row in commentsRemoved: + circuitID, circuitName, deviceID, deviceName, ParentNode, mac, ipv4_input, ipv6_input, downloadMin, uploadMin, downloadMax, uploadMax, comment = row + # If in monitorOnlyMode, override bandwidth rates to where no shaping will actually occur + if monitorOnlyMode == True: + downloadMin = 10000 + uploadMin = 10000 + downloadMax = 10000 + uploadMax = 10000 + ipv4_subnets_and_hosts = [] + # Each entry in ShapedDevices.csv can have multiple IPv4s or IPv6s seperated by commas. Split them up and parse each + if ipv4_input != "": + ipv4_input = ipv4_input.replace(' ','') + if "," in ipv4_input: + ipv4_list = ipv4_input.split(',') + else: + ipv4_list = [ipv4_input] + for ipEntry in ipv4_list: + ipv4_subnets_and_hosts.append(ipEntry) + ipv6_subnets_and_hosts = [] + if ipv6_input != "": + ipv6_input = ipv6_input.replace(' ','') + if "," in ipv6_input: + ipv6_list = ipv6_input.split(',') + else: + ipv6_list = [ipv6_input] + for ipEntry in ipv6_list: + ipv6_subnets_and_hosts.append(ipEntry) + # If there is something in the circuit ID field + if circuitID != "": + # Seen circuit before + if circuitID in knownCircuitIDs: + for circuit in subscriberCircuits: + if circuit['circuitID'] == circuitID: + if circuit['ParentNode'] != "none": + if circuit['ParentNode'] != ParentNode: + errorMessageString = "Device " + deviceName + " with deviceID " + deviceID + " had different Parent Node from other devices of circuit ID #" + circuitID + raise ValueError(errorMessageString) + # Check if bandwidth parameters match other cdevices of this same circuit ID, but only check if monitorOnlyMode is Off + if monitorOnlyMode == False: + if ((circuit['minDownload'] != round(int(downloadMin)*tcpOverheadFactor)) + or (circuit['minUpload'] != round(int(uploadMin)*tcpOverheadFactor)) + or (circuit['maxDownload'] != round(int(downloadMax)*tcpOverheadFactor)) + or (circuit['maxUpload'] != round(int(uploadMax)*tcpOverheadFactor))): + warnings.warn("Device " + deviceName + " with ID " + deviceID + " had different bandwidth parameters than other devices on this circuit. Will instead use the bandwidth parameters defined by the first device added to its circuit.", stacklevel=2) + devicesListForCircuit = circuit['devices'] + thisDevice = { + "deviceID": deviceID, + "deviceName": deviceName, + "mac": mac, + "ipv4s": ipv4_subnets_and_hosts, + "ipv6s": ipv6_subnets_and_hosts, + "comment": comment + } + devicesListForCircuit.append(thisDevice) + circuit['devices'] = devicesListForCircuit + # Have not seen circuit before + else: + knownCircuitIDs.append(circuitID) + if ParentNode == "": + ParentNode = "none" + ParentNode = ParentNode.strip() + deviceListForCircuit = [] + thisDevice = { + "deviceID": deviceID, + "deviceName": deviceName, + "mac": mac, + "ipv4s": ipv4_subnets_and_hosts, + "ipv6s": ipv6_subnets_and_hosts, + "comment": comment + } + deviceListForCircuit.append(thisDevice) + thisCircuit = { + "circuitID": circuitID, + "circuitName": circuitName, + "ParentNode": ParentNode, + "devices": deviceListForCircuit, + "minDownload": round(int(downloadMin)*tcpOverheadFactor), + "minUpload": round(int(uploadMin)*tcpOverheadFactor), + "maxDownload": round(int(downloadMax)*tcpOverheadFactor), + "maxUpload": round(int(uploadMax)*tcpOverheadFactor), + "classid": '', + "comment": comment + } + if thisCircuit['ParentNode'] == 'none': + thisCircuit['idForCircuitsWithoutParentNodes'] = counterForCircuitsWithoutParentNodes + dictForCircuitsWithoutParentNodes[counterForCircuitsWithoutParentNodes] = ((round(int(downloadMax)*tcpOverheadFactor))+(round(int(uploadMax)*tcpOverheadFactor))) + counterForCircuitsWithoutParentNodes += 1 + subscriberCircuits.append(thisCircuit) + # If there is nothing in the circuit ID field + else: + # Copy deviceName to circuitName if none defined already + if circuitName == "": + circuitName = deviceName + if ParentNode == "": + ParentNode = "none" + ParentNode = ParentNode.strip() + deviceListForCircuit = [] + thisDevice = { + "deviceID": deviceID, + "deviceName": deviceName, + "mac": mac, + "ipv4s": ipv4_subnets_and_hosts, + "ipv6s": ipv6_subnets_and_hosts, + } + deviceListForCircuit.append(thisDevice) + thisCircuit = { + "circuitID": circuitID, + "circuitName": circuitName, + "ParentNode": ParentNode, + "devices": deviceListForCircuit, + "minDownload": round(int(downloadMin)*tcpOverheadFactor), + "minUpload": round(int(uploadMin)*tcpOverheadFactor), + "maxDownload": round(int(downloadMax)*tcpOverheadFactor), + "maxUpload": round(int(uploadMax)*tcpOverheadFactor), + "classid": '', + "comment": comment + } + if thisCircuit['ParentNode'] == 'none': + thisCircuit['idForCircuitsWithoutParentNodes'] = counterForCircuitsWithoutParentNodes + dictForCircuitsWithoutParentNodes[counterForCircuitsWithoutParentNodes] = ((round(int(downloadMax)*tcpOverheadFactor))+(round(int(uploadMax)*tcpOverheadFactor))) + counterForCircuitsWithoutParentNodes += 1 + subscriberCircuits.append(thisCircuit) + return (subscriberCircuits, dictForCircuitsWithoutParentNodes) + +def refreshShapers(): + + # Starting + print("refreshShapers starting at " + datetime.now().strftime("%d/%m/%Y %H:%M:%S")) + + + # Warn user if enableActualShellCommands is False, because that would mean no actual commands are executing + if enableActualShellCommands == False: + warnings.warn("enableActualShellCommands is set to False. None of the commands below will actually be executed. Simulated run.", stacklevel=2) + # Warn user if monitorOnlyMode is True, because that would mean no actual shaping is happening + if monitorOnlyMode == True: + warnings.warn("monitorOnlyMode is set to True. Shaping will not occur.", stacklevel=2) + + + # Check if first run since boot + isThisFirstRunSinceBoot = checkIfFirstRunSinceBoot() + + + # Files + shapedDevicesFile = 'ShapedDevices.csv' + networkJSONfile = 'network.json' + + + # Check validation + safeToRunRefresh = False + print("Validating input files '" + shapedDevicesFile + "' and '" + networkJSONfile + "'") + if (validateNetworkAndDevices() == True): + shutil.copyfile('ShapedDevices.csv', 'lastGoodConfig.csv') + shutil.copyfile('network.json', 'lastGoodConfig.json') + print("Backed up good config as lastGoodConfig.csv and lastGoodConfig.json") + safeToRunRefresh = True + else: + if (isThisFirstRunSinceBoot == False): + warnings.warn("Validation failed. Because this is not the first run since boot (queues already set up) - will now exit.", stacklevel=2) + safeToRunRefresh = False + else: + warnings.warn("Validation failed. However - because this is the first run since boot - will load queues from last good config", stacklevel=2) + shapedDevicesFile = 'lastGoodConfig.csv' + networkJSONfile = 'lastGoodConfig.json' + safeToRunRefresh = True + + if safeToRunRefresh == True: + + # Load Subscriber Circuits & Devices + subscriberCircuits, dictForCircuitsWithoutParentNodes = loadSubscriberCircuits(shapedDevicesFile) + + + # Load network heirarchy + with open(networkJSONfile, 'r') as j: + network = json.loads(j.read()) + + + # Pull rx/tx queues / CPU cores available + queuesAvailable = findQueuesAvailable() + stickOffset = 0 + if OnAStick: + print("On-a-stick override dividing queues") + # The idea here is that download use queues 0 - n/2, upload uses the other half + queuesAvailable = math.floor(queuesAvailable / 2) + stickOffset = queuesAvailable + + # If in monitorOnlyMode, override network.json bandwidth rates to where no shaping will actually occur + if monitorOnlyMode == True: + def overrideNetworkBandwidths(data): + for elem in data: + if 'children' in data[elem]: + overrideNetworkBandwidths(data[elem]['children']) + data[elem]['downloadBandwidthMbpsMin'] = 10000 + data[elem]['uploadBandwidthMbpsMin'] = 10000 + overrideNetworkBandwidths(network) + + # Generate Parent Nodes. Spread ShapedDevices.csv which lack defined ParentNode across these (balance across CPUs) + print("Generating parent nodes") + existingPNs = 0 + for node in network: + existingPNs += 1 + generatedPNs = [] + numberOfGeneratedPNs = queuesAvailable-existingPNs + # If in monitorOnlyMode, override bandwidth rates to where no shaping will actually occur + if monitorOnlyMode == True: + chosenDownloadMbps = 10000 + chosenUploadMbps = 10000 + else: + chosenDownloadMbps = generatedPNDownloadMbps + chosenUploadMbps = generatedPNDownloadMbps + for x in range(numberOfGeneratedPNs): + genPNname = "Generated_PN_" + str(x+1) + network[genPNname] = { + "downloadBandwidthMbps": chosenDownloadMbps, + "uploadBandwidthMbps": chosenUploadMbps + } + generatedPNs.append(genPNname) + if useBinPackingToBalanceCPU: + print("Using binpacking module to sort circuits by CPU core") + bins = binpacking.to_constant_bin_number(dictForCircuitsWithoutParentNodes, numberOfGeneratedPNs) + genPNcounter = 0 + for binItem in bins: + sumItem = 0 + logging.info(generatedPNs[genPNcounter] + " will contain " + str(len(binItem)) + " circuits") + for key in binItem.keys(): + for circuit in subscriberCircuits: + if circuit['ParentNode'] == 'none': + if circuit['idForCircuitsWithoutParentNodes'] == key: + circuit['ParentNode'] = generatedPNs[genPNcounter] + genPNcounter += 1 + if genPNcounter >= queuesAvailable: + genPNcounter = 0 + print("Finished binpacking") + else: + genPNcounter = 0 + for circuit in subscriberCircuits: + if circuit['ParentNode'] == 'none': + circuit['ParentNode'] = generatedPNs[genPNcounter] + genPNcounter += 1 + if genPNcounter >= queuesAvailable: + genPNcounter = 0 + print("Generated parent nodes created") + + # Find the bandwidth minimums for each node by combining mimimums of devices lower in that node's heirarchy + def findBandwidthMins(data, depth): + tabs = ' ' * depth + minDownload = 0 + minUpload = 0 + for elem in data: + for circuit in subscriberCircuits: + if elem == circuit['ParentNode']: + minDownload += circuit['minDownload'] + minUpload += circuit['minUpload'] + if 'children' in data[elem]: + minDL, minUL = findBandwidthMins(data[elem]['children'], depth+1) + minDownload += minDL + minUpload += minUL + data[elem]['downloadBandwidthMbpsMin'] = minDownload + data[elem]['uploadBandwidthMbpsMin'] = minUpload + return minDownload, minUpload + logging.info("Finding the bandwidth minimums for each node") + minDownload, minUpload = findBandwidthMins(network, 0) + logging.info("Found the bandwidth minimums for each node") + + # Parse network structure and add devices from ShapedDevices.csv + parentNodes = [] + minorByCPUpreloaded = {} + knownClassIDs = [] + # Track minor counter by CPU. This way we can have > 32000 hosts (htb has u16 limit to minor handle) + for x in range(queuesAvailable): + minorByCPUpreloaded[x+1] = 3 + def traverseNetwork(data, depth, major, minorByCPU, queue, parentClassID, upParentClassID, parentMaxDL, parentMaxUL): + for node in data: + circuitsForThisNetworkNode = [] + nodeClassID = hex(major) + ':' + hex(minorByCPU[queue]) + upNodeClassID = hex(major+stickOffset) + ':' + hex(minorByCPU[queue]) + data[node]['classid'] = nodeClassID + data[node]['up_classid'] = upNodeClassID + if depth == 0: + parentClassID = hex(major) + ':' + upParentClassID = hex(major+stickOffset) + ':' + data[node]['parentClassID'] = parentClassID + data[node]['up_parentClassID'] = upParentClassID + # If in monitorOnlyMode, override bandwidth rates to where no shaping will actually occur + if monitorOnlyMode == True: + data[node]['downloadBandwidthMbps'] = 10000 + data[node]['uploadBandwidthMbps'] = 10000 + # If not in monitorOnlyMode + else: + # Cap based on this node's max bandwidth, or parent node's max bandwidth, whichever is lower + data[node]['downloadBandwidthMbps'] = min(data[node]['downloadBandwidthMbps'],parentMaxDL) + data[node]['uploadBandwidthMbps'] = min(data[node]['uploadBandwidthMbps'],parentMaxUL) + # Calculations are done in findBandwidthMins(), determine optimal HTB rates (mins) and ceils (maxs) + # For some reason that doesn't always yield the expected result, so it's better to play with ceil more than rate + # Here we override the rate as 95% of ceil. + data[node]['downloadBandwidthMbpsMin'] = round(data[node]['downloadBandwidthMbps']*.95) + data[node]['uploadBandwidthMbpsMin'] = round(data[node]['uploadBandwidthMbps']*.95) + + data[node]['classMajor'] = hex(major) + data[node]['up_classMajor'] = hex(major + stickOffset) + data[node]['classMinor'] = hex(minorByCPU[queue]) + data[node]['cpuNum'] = hex(queue-1) + data[node]['up_cpuNum'] = hex(queue-1+stickOffset) + thisParentNode = { + "parentNodeName": node, + "classID": nodeClassID, + "maxDownload": data[node]['downloadBandwidthMbps'], + "maxUpload": data[node]['uploadBandwidthMbps'], + } + parentNodes.append(thisParentNode) + minorByCPU[queue] = minorByCPU[queue] + 1 + for circuit in subscriberCircuits: + #If a device from ShapedDevices.csv lists this node as its Parent Node, attach it as a leaf to this node HTB + if node == circuit['ParentNode']: + if monitorOnlyMode == False: + if circuit['maxDownload'] > data[node]['downloadBandwidthMbps']: + warnings.warn("downloadMax of Circuit ID [" + circuit['circuitID'] + "] exceeded that of its parent node. Reducing to that of its parent node now.", stacklevel=2) + if circuit['maxUpload'] > data[node]['uploadBandwidthMbps']: + warnings.warn("uploadMax of Circuit ID [" + circuit['circuitID'] + "] exceeded that of its parent node. Reducing to that of its parent node now.", stacklevel=2) + parentString = hex(major) + ':' + flowIDstring = hex(major) + ':' + hex(minorByCPU[queue]) + upFlowIDstring = hex(major + stickOffset) + ':' + hex(minorByCPU[queue]) + circuit['classid'] = flowIDstring + circuit['up_classid'] = upFlowIDstring + print("Added up_classid to circuit: " + circuit['up_classid']) + # Create circuit dictionary to be added to network structure, eventually output as queuingStructure.json + maxDownload = min(circuit['maxDownload'],data[node]['downloadBandwidthMbps']) + maxUpload = min(circuit['maxUpload'],data[node]['uploadBandwidthMbps']) + minDownload = min(circuit['minDownload'],maxDownload) + minUpload = min(circuit['minUpload'],maxUpload) + thisNewCircuitItemForNetwork = { + 'maxDownload' : maxDownload, + 'maxUpload' : maxUpload, + 'minDownload' : minDownload, + 'minUpload' : minUpload, + "circuitID": circuit['circuitID'], + "circuitName": circuit['circuitName'], + "ParentNode": circuit['ParentNode'], + "devices": circuit['devices'], + "classid": flowIDstring, + "up_classid" : upFlowIDstring, + "classMajor": hex(major), + "up_classMajor" : hex(major + stickOffset), + "classMinor": hex(minorByCPU[queue]), + "comment": circuit['comment'] + } + # Generate TC commands to be executed later + thisNewCircuitItemForNetwork['devices'] = circuit['devices'] + circuitsForThisNetworkNode.append(thisNewCircuitItemForNetwork) + minorByCPU[queue] = minorByCPU[queue] + 1 + if len(circuitsForThisNetworkNode) > 0: + data[node]['circuits'] = circuitsForThisNetworkNode + # Recursive call this function for children nodes attached to this node + if 'children' in data[node]: + # We need to keep tabs on the minor counter, because we can't have repeating class IDs. Here, we bring back the minor counter from the recursive function + minorByCPU[queue] = minorByCPU[queue] + 1 + minorByCPU = traverseNetwork(data[node]['children'], depth+1, major, minorByCPU, queue, nodeClassID, upNodeClassID, data[node]['downloadBandwidthMbps'], data[node]['uploadBandwidthMbps']) + # If top level node, increment to next queue / cpu core + if depth == 0: + if queue >= queuesAvailable: + queue = 1 + major = queue + else: + queue += 1 + major += 1 + return minorByCPU + # Here is the actual call to the recursive traverseNetwork() function. finalMinor is not used. + minorByCPU = traverseNetwork(network, 0, major=1, minorByCPU=minorByCPUpreloaded, queue=1, parentClassID=None, upParentClassID=None, parentMaxDL=upstreamBandwidthCapacityDownloadMbps, parentMaxUL=upstreamBandwidthCapacityUploadMbps) + + linuxTCcommands = [] + xdpCPUmapCommands = [] + devicesShaped = [] + # Root HTB Setup + # Create MQ qdisc for each CPU core / rx-tx queue. Generate commands to create corresponding HTB and leaf classes. Prepare commands for execution later + thisInterface = interfaceA + logging.info("# MQ Setup for " + thisInterface) + command = 'qdisc replace dev ' + thisInterface + ' root handle 7FFF: mq' + linuxTCcommands.append(command) + for queue in range(queuesAvailable): + command = 'qdisc add dev ' + thisInterface + ' parent 7FFF:' + hex(queue+1) + ' handle ' + hex(queue+1) + ': htb default 2' + linuxTCcommands.append(command) + command = 'class add dev ' + thisInterface + ' parent ' + hex(queue+1) + ': classid ' + hex(queue+1) + ':1 htb rate '+ str(upstreamBandwidthCapacityDownloadMbps) + 'mbit ceil ' + str(upstreamBandwidthCapacityDownloadMbps) + 'mbit' + linuxTCcommands.append(command) + command = 'qdisc add dev ' + thisInterface + ' parent ' + hex(queue+1) + ':1 ' + sqm + linuxTCcommands.append(command) + # Default class - traffic gets passed through this limiter with lower priority if it enters the top HTB without a specific class. + # Technically, that should not even happen. So don't expect much if any traffic in this default class. + # Only 1/4 of defaultClassCapacity is guarenteed (to prevent hitting ceiling of upstream), for the most part it serves as an "up to" ceiling. + command = 'class add dev ' + thisInterface + ' parent ' + hex(queue+1) + ':1 classid ' + hex(queue+1) + ':2 htb rate ' + str(round((upstreamBandwidthCapacityDownloadMbps-1)/4)) + 'mbit ceil ' + str(upstreamBandwidthCapacityDownloadMbps-1) + 'mbit prio 5' + linuxTCcommands.append(command) + command = 'qdisc add dev ' + thisInterface + ' parent ' + hex(queue+1) + ':2 ' + sqm + linuxTCcommands.append(command) + + # Note the use of stickOffset, and not replacing the root queue if we're on a stick + thisInterface = interfaceB + logging.info("# MQ Setup for " + thisInterface) + if not OnAStick: + command = 'qdisc replace dev ' + thisInterface + ' root handle 7FFF: mq' + linuxTCcommands.append(command) + for queue in range(queuesAvailable): + command = 'qdisc add dev ' + thisInterface + ' parent 7FFF:' + hex(queue+stickOffset+1) + ' handle ' + hex(queue+stickOffset+1) + ': htb default 2' + linuxTCcommands.append(command) + command = 'class add dev ' + thisInterface + ' parent ' + hex(queue+stickOffset+1) + ': classid ' + hex(queue+stickOffset+1) + ':1 htb rate '+ str(upstreamBandwidthCapacityUploadMbps) + 'mbit ceil ' + str(upstreamBandwidthCapacityUploadMbps) + 'mbit' + linuxTCcommands.append(command) + command = 'qdisc add dev ' + thisInterface + ' parent ' + hex(queue+stickOffset+1) + ':1 ' + sqm + linuxTCcommands.append(command) + # Default class - traffic gets passed through this limiter with lower priority if it enters the top HTB without a specific class. + # Technically, that should not even happen. So don't expect much if any traffic in this default class. + # Only 1/4 of defaultClassCapacity is guarenteed (to prevent hitting ceiling of upstream), for the most part it serves as an "up to" ceiling. + command = 'class add dev ' + thisInterface + ' parent ' + hex(queue+stickOffset+1) + ':1 classid ' + hex(queue+stickOffset+1) + ':2 htb rate ' + str(round((upstreamBandwidthCapacityUploadMbps-1)/4)) + 'mbit ceil ' + str(upstreamBandwidthCapacityUploadMbps-1) + 'mbit prio 5' + linuxTCcommands.append(command) + command = 'qdisc add dev ' + thisInterface + ' parent ' + hex(queue+stickOffset+1) + ':2 ' + sqm + linuxTCcommands.append(command) + + + # Parse network structure. For each tier, generate commands to create corresponding HTB and leaf classes. Prepare commands for execution later + # Define lists for hash filters + def traverseNetwork(data): + for node in data: + command = 'class add dev ' + interfaceA + ' parent ' + data[node]['parentClassID'] + ' classid ' + data[node]['classMinor'] + ' htb rate '+ str(data[node]['downloadBandwidthMbpsMin']) + 'mbit ceil '+ str(data[node]['downloadBandwidthMbps']) + 'mbit prio 3' + linuxTCcommands.append(command) + print("Up ParentClassID: " + data[node]['up_parentClassID']) + print("ClassMinor: " + data[node]['classMinor']) + command = 'class add dev ' + interfaceB + ' parent ' + data[node]['up_parentClassID'] + ' classid ' + data[node]['classMinor'] + ' htb rate '+ str(data[node]['uploadBandwidthMbpsMin']) + 'mbit ceil '+ str(data[node]['uploadBandwidthMbps']) + 'mbit prio 3' + linuxTCcommands.append(command) + if 'circuits' in data[node]: + for circuit in data[node]['circuits']: + # Generate TC commands to be executed later + comment = " # CircuitID: " + circuit['circuitID'] + " DeviceIDs: " + for device in circuit['devices']: + comment = comment + device['deviceID'] + ', ' + if 'devices' in circuit: + if 'comment' in circuit['devices'][0]: + comment = comment + '| Comment: ' + circuit['devices'][0]['comment'] + command = 'class add dev ' + interfaceA + ' parent ' + data[node]['classid'] + ' classid ' + circuit['classMinor'] + ' htb rate '+ str(circuit['minDownload']) + 'mbit ceil '+ str(circuit['maxDownload']) + 'mbit prio 3' + linuxTCcommands.append(command) + # Only add CAKE / fq_codel qdisc if monitorOnlyMode is Off + if monitorOnlyMode == False: + command = 'qdisc add dev ' + interfaceA + ' parent ' + circuit['classMajor'] + ':' + circuit['classMinor'] + ' ' + sqm + linuxTCcommands.append(command) + command = 'class add dev ' + interfaceB + ' parent ' + data[node]['up_classid'] + ' classid ' + circuit['classMinor'] + ' htb rate '+ str(circuit['minUpload']) + 'mbit ceil '+ str(circuit['maxUpload']) + 'mbit prio 3' + linuxTCcommands.append(command) + # Only add CAKE / fq_codel qdisc if monitorOnlyMode is Off + if monitorOnlyMode == False: + command = 'qdisc add dev ' + interfaceB + ' parent ' + circuit['up_classMajor'] + ':' + circuit['classMinor'] + ' ' + sqm + linuxTCcommands.append(command) + pass + for device in circuit['devices']: + if device['ipv4s']: + for ipv4 in device['ipv4s']: + xdpCPUmapCommands.append('./xdp_iphash_to_cpu_cmdline add --ip ' + str(ipv4) + ' --cpu ' + data[node]['cpuNum'] + ' --classid ' + circuit['classid']) + if OnAStick: + xdpCPUmapCommands.append('./xdp_iphash_to_cpu_cmdline add --ip ' + str(ipv4) + ' --cpu ' + data[node]['up_cpuNum'] + ' --classid ' + circuit['up_classid'] + ' --upload 1') + if device['ipv6s']: + for ipv6 in device['ipv6s']: + xdpCPUmapCommands.append('./xdp_iphash_to_cpu_cmdline add --ip ' + str(ipv6) + ' --cpu ' + data[node]['cpuNum'] + ' --classid ' + circuit['classid']) + if OnAStick: + xdpCPUmapCommands.append('./xdp_iphash_to_cpu_cmdline add --ip ' + str(ipv6) + ' --cpu ' + data[node]['up_cpuNum'] + ' --classid ' + circuit['up_classid'] + ' --upload 1') + if device['deviceName'] not in devicesShaped: + devicesShaped.append(device['deviceName']) + # Recursive call this function for children nodes attached to this node + if 'children' in data[node]: + traverseNetwork(data[node]['children']) + # Here is the actual call to the recursive traverseNetwork() function. + traverseNetwork(network) + + # Save queuingStructure + queuingStructure = {} + queuingStructure['Network'] = network + queuingStructure['lastUsedClassIDCounterByCPU'] = minorByCPU + queuingStructure['generatedPNs'] = generatedPNs + with open('queuingStructure.json', 'w') as infile: + json.dump(queuingStructure, infile, indent=4) + + + # Record start time of actual filter reload + reloadStartTime = datetime.now() + + + # Clear Prior Settings + clearPriorSettings(interfaceA, interfaceB) + + + # Setup XDP and disable XPS regardless of whether it is first run or not (necessary to handle cases where systemctl stop was used) + xdpStartTime = datetime.now() + if enableActualShellCommands: + # Here we use os.system for the command, because otherwise it sometimes gltiches out with Popen in shell() + result = os.system('./xdp_iphash_to_cpu_cmdline clear') + # Set up XDP-CPUMAP-TC + logging.info("# XDP Setup") + # Commented out - the daemon does this + #shell('./cpumap-pping/bin/xps_setup.sh -d ' + interfaceA + ' --default --disable') + #shell('./cpumap-pping/bin/xps_setup.sh -d ' + interfaceB + ' --default --disable') + #shell('./cpumap-pping/src/xdp_iphash_to_cpu --dev ' + interfaceA + ' --lan') + #shell('./cpumap-pping/src/xdp_iphash_to_cpu --dev ' + interfaceB + ' --wan') + #shell('./cpumap-pping/src/tc_classify --dev-egress ' + interfaceA) + #shell('./cpumap-pping/src/tc_classify --dev-egress ' + interfaceB) + xdpEndTime = datetime.now() + + + # Execute actual Linux TC commands + tcStartTime = datetime.now() + print("Executing linux TC class/qdisc commands") + with open('linux_tc.txt', 'w') as f: + for command in linuxTCcommands: + logging.info(command) + f.write(f"{command}\n") + if logging.DEBUG <= logging.root.level: + # Do not --force in debug mode, so we can see any errors + shell("/sbin/tc -b linux_tc.txt") + else: + shell("/sbin/tc -f -b linux_tc.txt") + tcEndTime = datetime.now() + print("Executed " + str(len(linuxTCcommands)) + " linux TC class/qdisc commands") + + + tcEndTime = datetime.now() + print("Executed " + str(len(linuxTCcommands)) + " linux TC class/qdisc commands") + + + # Execute actual XDP-CPUMAP-TC filter commands + xdpFilterStartTime = datetime.now() + print("Executing XDP-CPUMAP-TC IP filter commands") + if enableActualShellCommands: + for command in xdpCPUmapCommands: + logging.info(command) + commands = command.split(' ') + proc = subprocess.Popen(commands, stdout=subprocess.DEVNULL) + else: + for command in xdpCPUmapCommands: + logging.info(command) + print("Executed " + str(len(xdpCPUmapCommands)) + " XDP-CPUMAP-TC IP filter commands") + #print(xdpCPUmapCommands) + xdpFilterEndTime = datetime.now() + + + # Record end time of all reload commands + reloadEndTime = datetime.now() + + + # Recap - warn operator if devices were skipped + devicesSkipped = [] + for circuit in subscriberCircuits: + for device in circuit['devices']: + if device['deviceName'] not in devicesShaped: + devicesSkipped.append((device['deviceName'],device['deviceID'])) + if len(devicesSkipped) > 0: + warnings.warn('Some devices were not shaped. Please check to ensure they have a valid ParentNode listed in ShapedDevices.csv:', stacklevel=2) + print("Devices not shaped:") + for entry in devicesSkipped: + name, idNum = entry + print('DeviceID: ' + idNum + '\t DeviceName: ' + name) + + # Save ShapedDevices.csv as ShapedDevices.lastLoaded.csv + shutil.copyfile('ShapedDevices.csv', 'ShapedDevices.lastLoaded.csv') + + # Save for stats + with open('statsByCircuit.json', 'w') as f: + f.write(json.dumps(subscriberCircuits, indent=4)) + with open('statsByParentNode.json', 'w') as f: + f.write(json.dumps(parentNodes, indent=4)) + + + # Record time this run completed at + # filename = os.path.join(_here, 'lastRun.txt') + with open("lastRun.txt", 'w') as file: + file.write(datetime.now().strftime("%d-%b-%Y (%H:%M:%S.%f)")) + + + # Report reload time + reloadTimeSeconds = ((reloadEndTime - reloadStartTime).seconds) + (((reloadEndTime - reloadStartTime).microseconds) / 1000000) + tcTimeSeconds = ((tcEndTime - tcStartTime).seconds) + (((tcEndTime - tcStartTime).microseconds) / 1000000) + xdpSetupTimeSeconds = ((xdpEndTime - xdpStartTime).seconds) + (((xdpEndTime - xdpStartTime).microseconds) / 1000000) + xdpFilterTimeSeconds = ((xdpFilterEndTime - xdpFilterStartTime).seconds) + (((xdpFilterEndTime - xdpFilterStartTime).microseconds) / 1000000) + print("Queue and IP filter reload completed in " + "{:g}".format(round(reloadTimeSeconds,1)) + " seconds") + print("\tTC commands: \t" + "{:g}".format(round(tcTimeSeconds,1)) + " seconds") + print("\tXDP setup: \t " + "{:g}".format(round(xdpSetupTimeSeconds,1)) + " seconds") + print("\tXDP filters: \t " + "{:g}".format(round(xdpFilterTimeSeconds,1)) + " seconds") + + + # Done + print("refreshShapers completed on " + datetime.now().strftime("%d/%m/%Y %H:%M:%S")) + +def refreshShapersUpdateOnly(): + # Starting + print("refreshShapers starting at " + datetime.now().strftime("%d/%m/%Y %H:%M:%S")) + + + # Warn user if enableActualShellCommands is False, because that would mean no actual commands are executing + if enableActualShellCommands == False: + warnings.warn("enableActualShellCommands is set to False. None of the commands below will actually be executed. Simulated run.", stacklevel=2) + + + # Files + shapedDevicesFile = 'ShapedDevices.csv' + networkJSONfile = 'network.json' + + + # Check validation + safeToRunRefresh = False + if (validateNetworkAndDevices() == True): + shutil.copyfile('ShapedDevices.csv', 'lastGoodConfig.csv') + shutil.copyfile('network.json', 'lastGoodConfig.json') + print("Backed up good config as lastGoodConfig.csv and lastGoodConfig.json") + safeToRunRefresh = True + else: + warnings.warn("Validation failed. Will now exit.", stacklevel=2) + + if safeToRunRefresh == True: + + # Load queuingStructure + with open('queuingStructure.json', 'r') as infile: + queuingStructure = json.loads(infile.read()) + + + network = queuingStructure['Network'] + lastUsedClassIDCounterByCPU = queuingStructure['lastUsedClassIDCounterByCPU'] + generatedPNs = queuingStructure['generatedPNs'] + + newlyUpdatedSubscriberCircuits, newlyUpdatedDictForCircuitsWithoutParentNodes = loadSubscriberCircuits('ShapedDevices.csv') + lastLoadedSubscriberCircuits, lastLoadedDictForCircuitsWithoutParentNodes = loadSubscriberCircuits('ShapedDevices.lastLoaded.csv') + + + # Load stats files + with open('statsByParentNode.json', 'r') as j: + parentNodes = json.loads(j.read()) + + with open('statsByCircuit.json', 'r') as j: + subscriberCircuits = json.loads(j.read()) + + newlyUpdatedSubscriberCircuitsByID = {} + for circuit in newlyUpdatedSubscriberCircuits: + circuitid = circuit['circuitID'] + newlyUpdatedSubscriberCircuitsByID[circuitid] = circuit + + lastLoadedSubscriberCircuitsByID = {} + for circuit in lastLoadedSubscriberCircuits: + circuitid = circuit['circuitID'] + lastLoadedSubscriberCircuitsByID[circuitid] = circuit + + + def removeDeviceIPsFromFilter(circuit): + for device in circuit['devices']: + for ipv4 in device['ipv4s']: + shell('./xdp_iphash_to_cpu_cmdline del ip ' + str(ipv4)) + for ipv6 in device['ipv6s']: + shell('./xdp_iphash_to_cpu_cmdline del ip ' + str(ipv6)) + + + def addDeviceIPsToFilter(circuit, cpuNumHex): + # TODO: Possible issue, check that the lqosd system expects the CPU in hex + for device in circuit['devices']: + for ipv4 in device['ipv4s']: + shell('./xdp_iphash_to_cpu_cmdline add --ip ' + str(ipv4) + ' --cpu ' + cpuNumHex + ' --classid ' + circuit['classid']) + for ipv6 in device['ipv6s']: + shell('./xdp_iphash_to_cpu_cmdline add --ip ' + str(ipv6) + ' --cpu ' + cpuNumHex + ' --classid ' + circuit['classid']) + + + def getAllParentNodes(data, allParentNodes): + for node in data: + if isinstance(node, str): + if (isinstance(data[node], dict)) and (node != 'children'): + thisParentNode = node + if thisParentNode not in allParentNodes: + allParentNodes.append(thisParentNode) + if 'children' in data[node]: + result = getAllParentNodes(data[node]['children'], allParentNodes) + for entry in result: + if entry not in allParentNodes: + allParentNodes.append(entry) + return allParentNodes + allParentNodes = getAllParentNodes(network, []) + + + def getClassIDofParentNodes(data, classIDOfParentNodes): + for node in data: + if isinstance(node, str): + if (isinstance(data[node], dict)) and (node != 'children'): + thisParentNode = node + classIDOfParentNodes[thisParentNode] = data[node]['classid'] + if 'children' in data[node]: + for child in data[node]['children']: + result = getClassIDofParentNodes(data[node]['children'], classIDOfParentNodes) + classIDOfParentNodes.update(result) + return classIDOfParentNodes + classIDOfParentNodes = getClassIDofParentNodes(network, {}) + + + def getAllCircuitIDs(data, allCircuitIDs): + for node in data: + if isinstance(node, str): + if (isinstance(data[node], dict)) and (node != 'children'): + thisParentNode = node + if 'circuits' in data[node]: + for circuit in data[node]['circuits']: + if circuit['circuitID'] not in allCircuitIDs: + allCircuitIDs.append(circuit['circuitID']) + if 'children' in data[node]: + for child in data[node]['children']: + result = getAllCircuitIDs(data[node]['children'], allCircuitIDs) + for entry in result: + if entry not in allCircuitIDs: + allCircuitIDs.append(result) + return allCircuitIDs + allCircuitIDs = getAllCircuitIDs(network, []) + + + def getClassIDofExistingCircuitID(data, classIDofExistingCircuitID): + for node in data: + if isinstance(node, str): + if (isinstance(data[node], dict)) and (node != 'children'): + thisParentNode = node + if 'circuits' in data[node]: + for circuit in data[node]['circuits']: + classIDofExistingCircuitID[circuit['circuitID']] = circuit['classid'] + if 'children' in data[node]: + for child in data[node]['children']: + result = getClassIDofExistingCircuitID(data[node]['children'], classIDofExistingCircuitID) + classIDofExistingCircuitID.update(result) + return classIDofExistingCircuitID + classIDofExistingCircuitID = getClassIDofExistingCircuitID(network, {}) + + + def getParentNodeOfCircuitID(data, parentNodeOfCircuitID, allCircuitIDs): + for node in data: + if isinstance(node, str): + if (isinstance(data[node], dict)) and (node != 'children'): + thisParentNode = node + if 'circuits' in data[node]: + for circuit in data[node]['circuits']: + parentNodeOfCircuitID[circuit['circuitID']] = thisParentNode + if 'children' in data[node]: + for child in data[node]['children']: + result = getParentNodeOfCircuitID(data[node]['children'], parentNodeOfCircuitID, allCircuitIDs) + parentNodeOfCircuitID.update(result) + return parentNodeOfCircuitID + parentNodeOfCircuitID = getParentNodeOfCircuitID(network, {}, allCircuitIDs) + + + def getCPUnumOfParentNodes(data, cpuNumOfParentNode): + for node in data: + if isinstance(node, str): + if (isinstance(data[node], dict)) and (node != 'children'): + thisParentNode = node + cpuNumOfParentNode[thisParentNode] = data[node]['cpuNum'] + if 'children' in data[node]: + for child in data[node]['children']: + result = getCPUnumOfParentNodes(data[node]['children'], cpuNumOfParentNode) + cpuNumOfParentNode.update(result) + return cpuNumOfParentNode + + cpuNumOfParentNodeHex = getCPUnumOfParentNodes(network, {}) + cpuNumOfParentNodeInt = {} + for key, value in cpuNumOfParentNodeHex.items(): + cpuNumOfParentNodeInt[key] = int(value,16) + 1 + + + def addCircuitHTBandQdisc(circuit, parentNodeClassID): + minor = circuit['classid'].split(':')[1] + for interface in [interfaceA, interfaceB]: + if interface == interfaceA: + rate = str(circuit['minDownload']) + ceil = str(circuit['maxDownload']) + else: + rate = str(circuit['minUpload']) + ceil = str(circuit['maxUpload']) + command = 'tc class add dev ' + interface + ' parent ' + parentNodeClassID + ' classid ' + minor + ' htb rate ' + rate + 'Mbit ceil ' + ceil + 'Mbit' + print(command) + shell(command) + # Only add CAKE / fq_codel qdisc if monitorOnlyMode is Off + if monitorOnlyMode == False: + command = 'tc qdisc add dev ' + interface + ' parent ' + classID + ' ' + sqm + print(command) + shell(command) + + + def delHTBclass(classid): + for interface in [interfaceA, interfaceB]: + command = 'tc class del dev ' + interface + ' classid ' + classid + print(command) + shell(command) + + + generatedPNcounter = 1 + circuitsIDsToRemove = [] + circuitsToUpdateByID = {} + circuitsToAddByParentNode = {} + for circuitID, circuit in lastLoadedSubscriberCircuitsByID.items(): + # Same circuit, update parameters (bandwidth, devices) + bandwidthChanged = False + devicesChanged = False + if (circuitID in newlyUpdatedSubscriberCircuitsByID) and (circuitID in lastLoadedSubscriberCircuitsByID): + if newlyUpdatedSubscriberCircuitsByID[circuitID]['maxDownload'] != lastLoadedSubscriberCircuitsByID[circuitID]['maxDownload']: + bandwidthChanged = True + if newlyUpdatedSubscriberCircuitsByID[circuitID]['maxUpload'] != lastLoadedSubscriberCircuitsByID[circuitID]['maxUpload']: + bandwidthChanged = True + if newlyUpdatedSubscriberCircuitsByID[circuitID]['minDownload'] != lastLoadedSubscriberCircuitsByID[circuitID]['minDownload']: + bandwidthChanged = True + if newlyUpdatedSubscriberCircuitsByID[circuitID]['minUpload'] != lastLoadedSubscriberCircuitsByID[circuitID]['minUpload']: + bandwidthChanged = True + if newlyUpdatedSubscriberCircuitsByID[circuitID]['devices'] != lastLoadedSubscriberCircuitsByID[circuitID]['devices']: + devicesChanged = True + if bandwidthChanged == True: + if newlyUpdatedSubscriberCircuitsByID[circuitID]['ParentNode'] == lastLoadedSubscriberCircuitsByID[circuitID]['ParentNode']: + parentNodeActual = circuit['ParentNode'] + if parentNodeActual == 'none': + # In flat network, there's still a Parent Node (GENERATED_PN_X) so we need to use that here + parentNodeActual = parentNodeOfCircuitID[circuitID] + parentNodeClassID = classIDOfParentNodes[parentNodeActual] + classid = classIDofExistingCircuitID[circuitID] + minor = classid.split(':')[1] + for interface in [interfaceA, interfaceB]: + if interface == interfaceA: + rate = str(newlyUpdatedSubscriberCircuitsByID[circuitID]['minDownload']) + ceil = str(newlyUpdatedSubscriberCircuitsByID[circuitID]['maxDownload']) + else: + rate = str(newlyUpdatedSubscriberCircuitsByID[circuitID]['minUpload']) + ceil = str(newlyUpdatedSubscriberCircuitsByID[circuitID]['maxUpload']) + command = 'tc class change dev ' + interface + ' parent ' + parentNodeClassID + ' classid ' + minor + ' htb rate ' + rate + 'Mbit ceil ' + ceil + 'Mbit' + shell(command) + else: + removeDeviceIPsFromFilter(lastLoadedSubscriberCircuitsByID[circuitID]) + # Delete HTB class, qdisc. Then recreat it. + classid = classIDofExistingCircuitID[circuitID] + circuit['classid'] = classid + delHTBclass(classID) + parentNodeClassID = classIDOfParentNodes[parentNodeOfCircuitID[circuitID]] + addCircuitHTBandQdisc(circuit, parentNodeClassID) + addDeviceIPsToFilter(newlyUpdatedSubscriberCircuitsByID[circuitID], cpuNum) + if devicesChanged: + parentNodeActual = circuit['ParentNode'] + if parentNodeActual == 'none': + # In flat network, there's still a Parent Node (GENERATED_PN_X) so we need to use that here + parentNodeActual = parentNodeOfCircuitID[circuitID] + cpuNumHex = cpuNumOfParentNodeHex[parentNodeActual] + parentNodeClassID = classIDOfParentNodes[parentNodeActual] + addDeviceIPsToFilter(newlyUpdatedSubscriberCircuitsByID[circuitID], cpuNumHex) + + newlyUpdatedSubscriberCircuitsByID[circuitID]['classid'] = lastLoadedSubscriberCircuitsByID[circuitID]['classid'] + if (bandwidthChanged) or (devicesChanged): + circuitsToUpdateByID[circuitID] = newlyUpdatedSubscriberCircuitsByID[circuitID] + + + # Removed circuit + if (circuitID in lastLoadedSubscriberCircuitsByID) and (circuitID not in newlyUpdatedSubscriberCircuitsByID): + circuitsIDsToRemove.append(circuitID) + removeDeviceIPsFromFilter(lastLoadedSubscriberCircuitsByID[circuitID]) + classid = classIDofExistingCircuitID[circuitID] + delHTBclass(classid) + + + # New circuit + for circuitID, circuit in newlyUpdatedSubscriberCircuitsByID.items(): + if (circuitID in newlyUpdatedSubscriberCircuitsByID) and (circuitID not in lastLoadedSubscriberCircuitsByID): + if newlyUpdatedSubscriberCircuitsByID[circuitID]['ParentNode'] == 'none': + newlyUpdatedSubscriberCircuitsByID[circuitID]['ParentNode'] = 'Generated_PN_' + str(generatedPNcounter) + generatedPNcounter += 1 + if generatedPNcounter > len(generatedPNs): + generatedPNcounter = 1 + cpuNumHex = cpuNumOfParentNodeHex[circuit['ParentNode']] + cpuNumInt = cpuNumOfParentNodeInt[circuit['ParentNode']] + parentNodeClassID = classIDOfParentNodes[circuit['ParentNode']] + classID = parentNodeClassID.split(':')[0] + ':' + hex(lastUsedClassIDCounterByCPU[str(cpuNumInt)]) + lastUsedClassIDCounterByCPU[str(cpuNumInt)] = lastUsedClassIDCounterByCPU[str(cpuNumInt)] + 1 + circuit['classid'] = classID + # Add HTB class, qdisc + addCircuitHTBandQdisc(circuit, parentNodeClassID) + addDeviceIPsToFilter(circuit, cpuNumHex) + if circuit['ParentNode'] in circuitsToAddByParentNode: + temp = circuitsToAddByParentNode[circuit['ParentNode']] + temp.append(circuit) + circuitsToAddByParentNode[circuit['ParentNode']] = temp + else: + temp = [] + temp.append(circuit) + circuitsToAddByParentNode[circuit['ParentNode']] = temp + + + # Update network structure reflecting new circuits, removals, and changes + itemsToChange = (circuitsIDsToRemove, circuitsToUpdateByID, circuitsToAddByParentNode) + def updateNetworkStructure(data, depth, itemsToChange): + circuitsIDsToRemove, circuitsToUpdateByID, circuitsToAddByParentNode = itemsToChange + for node in data: + if isinstance(node, str): + if (isinstance(data[node], dict)) and (node != 'children'): + thisParentNode = node + if 'circuits' in data[node]: + for circuit in data[node]['circuits']: + if circuit['circuitID'] in circuitsToUpdateByID: + circuit = circuitsToUpdateByID[circuit['circuitID']] + print('updated') + if circuit['circuitID'] in circuitsIDsToRemove: + data[node]['circuits'].remove(circuit) + if thisParentNode in circuitsToAddByParentNode: + if 'circuits' in data[node]: + temp = data[node]['circuits'] + for circuit in circuitsToAddByParentNode[thisParentNode]: + temp.append(circuit) + data[node]['circuits'] = temp + else: + temp = [] + for circuit in circuitsToAddByParentNode[thisParentNode]: + temp.append(circuit) + data[node]['circuits'] = temp + if 'children' in data[node]: + for child in data[node]['children']: + result = updateNetworkStructure(data[node]['children'][child], depth+1, itemsToChange) + data[node]['children'][child] = result + return data + network = updateNetworkStructure(network, 0 , itemsToChange) + + + # Record start time of actual filter reload + reloadStartTime = datetime.now() + + + # Record end time of all reload commands + reloadEndTime = datetime.now() + + + queuingStructure = {} + queuingStructure['Network'] = network + queuingStructure['lastUsedClassIDCounterByCPU'] = lastUsedClassIDCounterByCPU + queuingStructure['generatedPNs'] = generatedPNs + # Save queuingStructure + with open('queuingStructure.json', 'w') as infile: + json.dump(queuingStructure, infile, indent=4) + + + # copy ShapedDevices.csv and save as ShapedDevices.lastLoaded.csv and lastGoodConfig.csv + shutil.copyfile('ShapedDevices.csv', 'ShapedDevices.lastLoaded.csv') + shutil.copyfile('ShapedDevices.csv', 'lastGoodConfig.csv') + + + # Save for stats + with open('statsByCircuit.json', 'w') as f: + f.write(json.dumps(subscriberCircuits, indent=4)) + with open('statsByParentNode.json', 'w') as f: + f.write(json.dumps(parentNodes, indent=4)) + + + # Report reload time + reloadTimeSeconds = ((reloadEndTime - reloadStartTime).seconds) + (((reloadEndTime - reloadStartTime).microseconds) / 1000000) + print("Queue and IP filter partial reload completed in " + "{:g}".format(round(reloadTimeSeconds,1)) + " seconds") + + + # Done + print("refreshShapersUpdateOnly completed on " + datetime.now().strftime("%d/%m/%Y %H:%M:%S")) + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument( + '-d', '--debug', + help="Print lots of debugging statements", + action="store_const", dest="loglevel", const=logging.DEBUG, + default=logging.WARNING, + ) + parser.add_argument( + '-v', '--verbose', + help="Be verbose", + action="store_const", dest="loglevel", const=logging.INFO, + ) + parser.add_argument( + '--updateonly', + help="Only update to reflect changes in ShapedDevices.csv (partial reload)", + action=argparse.BooleanOptionalAction, + ) + parser.add_argument( + '--validate', + help="Just validate network.json and ShapedDevices.csv", + action=argparse.BooleanOptionalAction, + ) + parser.add_argument( + '--clearrules', + help="Clear ip filters, qdiscs, and xdp setup if any", + action=argparse.BooleanOptionalAction, + ) + args = parser.parse_args() + logging.basicConfig(level=args.loglevel) + + if args.validate: + status = validateNetworkAndDevices() + elif args.clearrules: + tearDown(interfaceA, interfaceB) + elif args.updateonly: + refreshShapersUpdateOnly() + else: + # Refresh and/or set up queues + refreshShapers() diff --git a/old/v1.3/README.md b/old/v1.3/README.md new file mode 100644 index 00000000..be2fd70f --- /dev/null +++ b/old/v1.3/README.md @@ -0,0 +1,46 @@ +# v1.3 (IPv4 + IPv6) + +![image](https://user-images.githubusercontent.com/22501920/202913336-256b591b-f372-44fe-995c-5e08ec08a925.png) + +## Features + +### Fast TCP Latency Tracking + +[@thebracket](https://github.com/thebracket/) has created [cpumap-pping](https://github.com/thebracket/cpumap-pping) which merges the functionality of the [xdp-cpumap-tc](https://github.com/xdp-project/xdp-cpumap-tc) and [ePPing](https://github.com/xdp-project/bpf-examples/tree/master/pping) projects, while keeping CPU use within ~1% of xdp-cpumap-tc. + +### Integrations + +- Added Splynx integration +- UISP integration overhaul by [@thebracket](https://github.com/thebracket/) +- [LMS integation](https://github.com/interduo/LMSLibreQoS) for Polish ISPs by [@interduo](https://github.com/interduo) + + +### Partial Queue Reload + +In v1.2 and prior, the the entire queue structure had to be reloaded to make any changes. This led to a few milliseconds of packet loss for some clients each time that reload happened. The scheduled.py was set to reload all queues each morning at 4AM to avoid any potential disruptions that could theoretically cause. + +Starting with v1.3 - LibreQoS tracks the state of the queues, and can do incremental changes without a full reload of all queues. Every 30 minutes - scheduler.py runs the CRM import, and runs a partial reload affecting just the queues that have changed. It still runs a full reload at 4AM. + +### v1.3 Improvements to help scale + +#### HTB major:minor handle + +HTB uses a hex handle for classes. It is two 16-bit hex values joined by a colon - major:minor (:). In LibreQoS, each CPU core uses a different major handle. + +In v1.2 and prior, the minor handle was unique across all CPUs, meaning only 30k subscribers could be added total. + +Starting with LibreQoS v1.3 - minor handles are counted independently by CPU core. With this change, the maximum possible subscriber qdiscs/classes goes from a hard limit of 30k to instead be 30k x CPU core count. So for a higher end system with a 64 core processor such as the AMD EPYCâ„¢ 7713P, that would mean ~1.9 million possible subscriber classes. Of course CPU use will be the bottleneck well before class handles are in that scenario. But at least we have that arbitrary 30k limit out of the way. + +#### "Circuit ID" Unique Identifier + +In order to improve queue reload time in v1.3, it was necessary to use a unique identifier for each circuit. We went with Circuit ID. It can be a number or string, it just needs to be unique between circuits, and the same for multiple devices in the same circuit. This allows us to avoid costly lookups when sorting through the queue structure. + +If you have your own script creating ShapedDevices.csv - you could use your CRM's unique identifier for customer services / circuits to serve as this Circuit ID. The UISP and Splynx integrations already do this automatically. + +## Compatability Notes + +The most major changes are the renaming of the fqorCake variable to "sqm", +and the addition of the Circuit identifier field. + +Also after upgrading to LibreQos v1.3, a reboot is required to clear out the +old ebpf code. diff --git a/old/v1.3/ShapedDevices.example.csv b/old/v1.3/ShapedDevices.example.csv new file mode 100644 index 00000000..a03e22ec --- /dev/null +++ b/old/v1.3/ShapedDevices.example.csv @@ -0,0 +1,14 @@ +#LibreQoS - autogenerated file - START +Circuit ID,Circuit Name,Device ID,Device Name,Parent Node,MAC,IPv4,IPv6,Download Min Mbps,Upload Min Mbps,Download Max Mbps,Upload Max Mbps,Comment +1,"968 Circle St., Gurnee, IL 60031",1,Device 1,AP_A,,"100.64.0.1, 100.64.0.14",,25,5,155,20, +2,"31 Marconi Street, Lake In The Hills, IL 60156",2,Device 2,AP_A,,100.64.0.2,,25,5,105,18, +3,"255 NW. Newport Ave., Jamestown, NY 14701",3,Device 3,AP_9,,100.64.0.3,,25,5,105,18, +4,"8493 Campfire Street, Peabody, MA 01960",4,Device 4,AP_9,,100.64.0.4,,25,5,105,18, +2794,"6 Littleton Drive, Ringgold, GA 30736",5,Device 5,AP_11,,100.64.0.5,,25,5,105,18, +2794,"6 Littleton Drive, Ringgold, GA 30736",6,Device 6,AP_11,,100.64.0.6,,25,5,105,18, +5,"93 Oklahoma Ave., Parsippany, NJ 07054",7,Device 7,AP_1,,100.64.0.7,,25,5,155,20, +6,"74 Bishop Ave., Bakersfield, CA 93306",8,Device 8,AP_1,,100.64.0.8,,25,5,105,18, +7,"9598 Peg Shop Drive, Lutherville Timonium, MD 21093",9,Device 9,AP_7,,100.64.0.9,,25,5,105,18, +8,"115 Gartner Rd., Gettysburg, PA 17325",10,Device 10,AP_7,,100.64.0.10,,25,5,105,18, +9,"525 Birchpond St., Romulus, MI 48174",11,Device 11,Site_1,,100.64.0.11,,25,5,105,18, +#LibreQoS - autogenerated file - EOF diff --git a/old/v1.3/cpumap-pping b/old/v1.3/cpumap-pping new file mode 160000 index 00000000..0d4df7f9 --- /dev/null +++ b/old/v1.3/cpumap-pping @@ -0,0 +1 @@ +Subproject commit 0d4df7f91885021f49d08b91720a9031be3ac7e7 diff --git a/old/v1.3/graphInfluxDB.py b/old/v1.3/graphInfluxDB.py new file mode 100644 index 00000000..449478bb --- /dev/null +++ b/old/v1.3/graphInfluxDB.py @@ -0,0 +1,557 @@ +import subprocess +import json +import subprocess +from datetime import datetime +from pathlib import Path +import statistics +import time +import psutil + +from influxdb_client import InfluxDBClient, Point +from influxdb_client.client.write_api import SYNCHRONOUS + +from ispConfig import interfaceA, interfaceB, influxDBEnabled, influxDBBucket, influxDBOrg, influxDBtoken, influxDBurl, sqm + + +def getInterfaceStats(interface): + command = 'tc -j -s qdisc show dev ' + interface + jsonAr = json.loads(subprocess.run(command.split(' '), stdout=subprocess.PIPE).stdout.decode('utf-8')) + jsonDict = {} + for element in filter(lambda e: 'parent' in e, jsonAr): + flowID = ':'.join(map(lambda p: f'0x{p}', element['parent'].split(':')[0:2])) + jsonDict[flowID] = element + del jsonAr + return jsonDict + + +def chunk_list(l, n): + for i in range(0, len(l), n): + yield l[i:i + n] + +def getCircuitBandwidthStats(subscriberCircuits, tinsStats): + interfaces = [interfaceA, interfaceB] + ifaceStats = list(map(getInterfaceStats, interfaces)) + + for circuit in subscriberCircuits: + if 'stats' not in circuit: + circuit['stats'] = {} + if 'currentQuery' in circuit['stats']: + circuit['stats']['priorQuery'] = circuit['stats']['currentQuery'] + circuit['stats']['currentQuery'] = {} + circuit['stats']['sinceLastQuery'] = {} + else: + #circuit['stats']['priorQuery'] = {} + #circuit['stats']['priorQuery']['time'] = datetime.now().isoformat() + circuit['stats']['currentQuery'] = {} + circuit['stats']['sinceLastQuery'] = {} + + #for entry in tinsStats: + if 'currentQuery' in tinsStats: + tinsStats['priorQuery'] = tinsStats['currentQuery'] + tinsStats['currentQuery'] = {} + tinsStats['sinceLastQuery'] = {} + else: + tinsStats['currentQuery'] = {} + tinsStats['sinceLastQuery'] = {} + + tinsStats['currentQuery'] = { 'Bulk': {'Download': {'sent_packets': 0.0, 'drops': 0.0}, 'Upload': {'sent_packets': 0.0, 'drops': 0.0}}, + 'BestEffort': {'Download': {'sent_packets': 0.0, 'drops': 0.0}, 'Upload': {'sent_packets': 0.0, 'drops': 0.0}}, + 'Video': {'Download': {'sent_packets': 0.0, 'drops': 0.0}, 'Upload': {'sent_packets': 0.0, 'drops': 0.0}}, + 'Voice': {'Download': {'sent_packets': 0.0, 'drops': 0.0}, 'Upload': {'sent_packets': 0.0, 'drops': 0.0}}, + } + tinsStats['sinceLastQuery'] = { 'Bulk': {'Download': {'sent_packets': 0.0, 'drops': 0.0}, 'Upload': {'sent_packets': 0.0, 'drops': 0.0}}, + 'BestEffort': {'Download': {'sent_packets': 0.0, 'drops': 0.0}, 'Upload': {'sent_packets': 0.0, 'drops': 0.0}}, + 'Video': {'Download': {'sent_packets': 0.0, 'drops': 0.0}, 'Upload': {'sent_packets': 0.0, 'drops': 0.0}}, + 'Voice': {'Download': {'sent_packets': 0.0, 'drops': 0.0}, 'Upload': {'sent_packets': 0.0, 'drops': 0.0}}, + } + + for circuit in subscriberCircuits: + for (interface, stats, dirSuffix) in zip(interfaces, ifaceStats, ['Download', 'Upload']): + + element = stats[circuit['classid']] if circuit['classid'] in stats else False + + if element: + bytesSent = float(element['bytes']) + drops = float(element['drops']) + packets = float(element['packets']) + if (element['drops'] > 0) and (element['packets'] > 0): + overloadFactor = float(round(element['drops']/element['packets'],3)) + else: + overloadFactor = 0.0 + + if 'cake diffserv4' in sqm: + tinCounter = 1 + for tin in element['tins']: + sent_packets = float(tin['sent_packets']) + ack_drops = float(tin['ack_drops']) + ecn_mark = float(tin['ecn_mark']) + tinDrops = float(tin['drops']) + trueDrops = ecn_mark + tinDrops - ack_drops + if tinCounter == 1: + tinsStats['currentQuery']['Bulk'][dirSuffix]['sent_packets'] += sent_packets + tinsStats['currentQuery']['Bulk'][dirSuffix]['drops'] += trueDrops + elif tinCounter == 2: + tinsStats['currentQuery']['BestEffort'][dirSuffix]['sent_packets'] += sent_packets + tinsStats['currentQuery']['BestEffort'][dirSuffix]['drops'] += trueDrops + elif tinCounter == 3: + tinsStats['currentQuery']['Video'][dirSuffix]['sent_packets'] += sent_packets + tinsStats['currentQuery']['Video'][dirSuffix]['drops'] += trueDrops + elif tinCounter == 4: + tinsStats['currentQuery']['Voice'][dirSuffix]['sent_packets'] += sent_packets + tinsStats['currentQuery']['Voice'][dirSuffix]['drops'] += trueDrops + tinCounter += 1 + + circuit['stats']['currentQuery']['bytesSent' + dirSuffix] = bytesSent + circuit['stats']['currentQuery']['packetDrops' + dirSuffix] = drops + circuit['stats']['currentQuery']['packetsSent' + dirSuffix] = packets + circuit['stats']['currentQuery']['overloadFactor' + dirSuffix] = overloadFactor + + #if 'cake diffserv4' in sqm: + # circuit['stats']['currentQuery']['tins'] = theseTins + + circuit['stats']['currentQuery']['time'] = datetime.now().isoformat() + + allPacketsDownload = 0.0 + allPacketsUpload = 0.0 + for circuit in subscriberCircuits: + circuit['stats']['sinceLastQuery']['bitsDownload'] = circuit['stats']['sinceLastQuery']['bitsUpload'] = 0.0 + circuit['stats']['sinceLastQuery']['bytesSentDownload'] = circuit['stats']['sinceLastQuery']['bytesSentUpload'] = 0.0 + circuit['stats']['sinceLastQuery']['packetDropsDownload'] = circuit['stats']['sinceLastQuery']['packetDropsUpload'] = 0.0 + circuit['stats']['sinceLastQuery']['packetsSentDownload'] = circuit['stats']['sinceLastQuery']['packetsSentUpload'] = 0.0 + + try: + circuit['stats']['sinceLastQuery']['bytesSentDownload'] = circuit['stats']['currentQuery']['bytesSentDownload'] - circuit['stats']['priorQuery']['bytesSentDownload'] + circuit['stats']['sinceLastQuery']['bytesSentUpload'] = circuit['stats']['currentQuery']['bytesSentUpload'] - circuit['stats']['priorQuery']['bytesSentUpload'] + except: + circuit['stats']['sinceLastQuery']['bytesSentDownload'] = 0.0 + circuit['stats']['sinceLastQuery']['bytesSentUpload'] = 0.0 + try: + circuit['stats']['sinceLastQuery']['packetDropsDownload'] = circuit['stats']['currentQuery']['packetDropsDownload'] - circuit['stats']['priorQuery']['packetDropsDownload'] + circuit['stats']['sinceLastQuery']['packetDropsUpload'] = circuit['stats']['currentQuery']['packetDropsUpload'] - circuit['stats']['priorQuery']['packetDropsUpload'] + except: + circuit['stats']['sinceLastQuery']['packetDropsDownload'] = 0.0 + circuit['stats']['sinceLastQuery']['packetDropsUpload'] = 0.0 + try: + circuit['stats']['sinceLastQuery']['packetsSentDownload'] = circuit['stats']['currentQuery']['packetsSentDownload'] - circuit['stats']['priorQuery']['packetsSentDownload'] + circuit['stats']['sinceLastQuery']['packetsSentUpload'] = circuit['stats']['currentQuery']['packetsSentUpload'] - circuit['stats']['priorQuery']['packetsSentUpload'] + except: + circuit['stats']['sinceLastQuery']['packetsSentDownload'] = 0.0 + circuit['stats']['sinceLastQuery']['packetsSentUpload'] = 0.0 + + allPacketsDownload += circuit['stats']['sinceLastQuery']['packetsSentDownload'] + allPacketsUpload += circuit['stats']['sinceLastQuery']['packetsSentUpload'] + + if 'priorQuery' in circuit['stats']: + if 'time' in circuit['stats']['priorQuery']: + currentQueryTime = datetime.fromisoformat(circuit['stats']['currentQuery']['time']) + priorQueryTime = datetime.fromisoformat(circuit['stats']['priorQuery']['time']) + deltaSeconds = (currentQueryTime - priorQueryTime).total_seconds() + circuit['stats']['sinceLastQuery']['bitsDownload'] = round( + ((circuit['stats']['sinceLastQuery']['bytesSentDownload'] * 8) / deltaSeconds)) if deltaSeconds > 0 else 0 + circuit['stats']['sinceLastQuery']['bitsUpload'] = round( + ((circuit['stats']['sinceLastQuery']['bytesSentUpload'] * 8) / deltaSeconds)) if deltaSeconds > 0 else 0 + else: + circuit['stats']['sinceLastQuery']['bitsDownload'] = (circuit['stats']['sinceLastQuery']['bytesSentDownload'] * 8) + circuit['stats']['sinceLastQuery']['bitsUpload'] = (circuit['stats']['sinceLastQuery']['bytesSentUpload'] * 8) + + tinsStats['sinceLastQuery']['Bulk']['Download']['dropPercentage'] = tinsStats['sinceLastQuery']['Bulk']['Upload']['dropPercentage'] = 0.0 + tinsStats['sinceLastQuery']['BestEffort']['Download']['dropPercentage'] = tinsStats['sinceLastQuery']['BestEffort']['Upload']['dropPercentage'] = 0.0 + tinsStats['sinceLastQuery']['Video']['Download']['dropPercentage'] = tinsStats['sinceLastQuery']['Video']['Upload']['dropPercentage'] = 0.0 + tinsStats['sinceLastQuery']['Voice']['Download']['dropPercentage'] = tinsStats['sinceLastQuery']['Voice']['Upload']['dropPercentage'] = 0.0 + + tinsStats['sinceLastQuery']['Bulk']['Download']['percentage'] = tinsStats['sinceLastQuery']['Bulk']['Upload']['percentage'] = 0.0 + tinsStats['sinceLastQuery']['BestEffort']['Download']['percentage'] = tinsStats['sinceLastQuery']['BestEffort']['Upload']['percentage'] = 0.0 + tinsStats['sinceLastQuery']['Video']['Download']['percentage'] = tinsStats['sinceLastQuery']['Video']['Upload']['percentage'] = 0.0 + tinsStats['sinceLastQuery']['Voice']['Download']['percentage'] = tinsStats['sinceLastQuery']['Voice']['Upload']['percentage'] = 0.0 + + try: + tinsStats['sinceLastQuery']['Bulk']['Download']['sent_packets'] = tinsStats['currentQuery']['Bulk']['Download']['sent_packets'] - tinsStats['priorQuery']['Bulk']['Download']['sent_packets'] + tinsStats['sinceLastQuery']['BestEffort']['Download']['sent_packets'] = tinsStats['currentQuery']['BestEffort']['Download']['sent_packets'] - tinsStats['priorQuery']['BestEffort']['Download']['sent_packets'] + tinsStats['sinceLastQuery']['Video']['Download']['sent_packets'] = tinsStats['currentQuery']['Video']['Download']['sent_packets'] - tinsStats['priorQuery']['Video']['Download']['sent_packets'] + tinsStats['sinceLastQuery']['Voice']['Download']['sent_packets'] = tinsStats['currentQuery']['Voice']['Download']['sent_packets'] - tinsStats['priorQuery']['Voice']['Download']['sent_packets'] + tinsStats['sinceLastQuery']['Bulk']['Upload']['sent_packets'] = tinsStats['currentQuery']['Bulk']['Upload']['sent_packets'] - tinsStats['priorQuery']['Bulk']['Upload']['sent_packets'] + tinsStats['sinceLastQuery']['BestEffort']['Upload']['sent_packets'] = tinsStats['currentQuery']['BestEffort']['Upload']['sent_packets'] - tinsStats['priorQuery']['BestEffort']['Upload']['sent_packets'] + tinsStats['sinceLastQuery']['Video']['Upload']['sent_packets'] = tinsStats['currentQuery']['Video']['Upload']['sent_packets'] - tinsStats['priorQuery']['Video']['Upload']['sent_packets'] + tinsStats['sinceLastQuery']['Voice']['Upload']['sent_packets'] = tinsStats['currentQuery']['Voice']['Upload']['sent_packets'] - tinsStats['priorQuery']['Voice']['Upload']['sent_packets'] + except: + tinsStats['sinceLastQuery']['Bulk']['Download']['sent_packets'] = tinsStats['sinceLastQuery']['BestEffort']['Download']['sent_packets'] = 0.0 + tinsStats['sinceLastQuery']['Video']['Download']['sent_packets'] = tinsStats['sinceLastQuery']['Voice']['Download']['sent_packets'] = 0.0 + tinsStats['sinceLastQuery']['Bulk']['Upload']['sent_packets'] = tinsStats['sinceLastQuery']['BestEffort']['Upload']['sent_packets'] = 0.0 + tinsStats['sinceLastQuery']['Video']['Upload']['sent_packets'] = tinsStats['sinceLastQuery']['Voice']['Upload']['sent_packets'] = 0.0 + + try: + tinsStats['sinceLastQuery']['Bulk']['Download']['drops'] = tinsStats['currentQuery']['Bulk']['Download']['drops'] - tinsStats['priorQuery']['Bulk']['Download']['drops'] + tinsStats['sinceLastQuery']['BestEffort']['Download']['drops'] = tinsStats['currentQuery']['BestEffort']['Download']['drops'] - tinsStats['priorQuery']['BestEffort']['Download']['drops'] + tinsStats['sinceLastQuery']['Video']['Download']['drops'] = tinsStats['currentQuery']['Video']['Download']['drops'] - tinsStats['priorQuery']['Video']['Download']['drops'] + tinsStats['sinceLastQuery']['Voice']['Download']['drops'] = tinsStats['currentQuery']['Voice']['Download']['drops'] - tinsStats['priorQuery']['Voice']['Download']['drops'] + tinsStats['sinceLastQuery']['Bulk']['Upload']['drops'] = tinsStats['currentQuery']['Bulk']['Upload']['drops'] - tinsStats['priorQuery']['Bulk']['Upload']['drops'] + tinsStats['sinceLastQuery']['BestEffort']['Upload']['drops'] = tinsStats['currentQuery']['BestEffort']['Upload']['drops'] - tinsStats['priorQuery']['BestEffort']['Upload']['drops'] + tinsStats['sinceLastQuery']['Video']['Upload']['drops'] = tinsStats['currentQuery']['Video']['Upload']['drops'] - tinsStats['priorQuery']['Video']['Upload']['drops'] + tinsStats['sinceLastQuery']['Voice']['Upload']['drops'] = tinsStats['currentQuery']['Voice']['Upload']['drops'] - tinsStats['priorQuery']['Voice']['Upload']['drops'] + except: + tinsStats['sinceLastQuery']['Bulk']['Download']['drops'] = tinsStats['sinceLastQuery']['BestEffort']['Download']['drops'] = 0.0 + tinsStats['sinceLastQuery']['Video']['Download']['drops'] = tinsStats['sinceLastQuery']['Voice']['Download']['drops'] = 0.0 + tinsStats['sinceLastQuery']['Bulk']['Upload']['drops'] = tinsStats['sinceLastQuery']['BestEffort']['Upload']['drops'] = 0.0 + tinsStats['sinceLastQuery']['Video']['Upload']['drops'] = tinsStats['sinceLastQuery']['Voice']['Upload']['drops'] = 0.0 + + try: + dlPerc = tinsStats['sinceLastQuery']['Bulk']['Download']['drops'] / tinsStats['sinceLastQuery']['Bulk']['Download']['sent_packets'] + ulPerc = tinsStats['sinceLastQuery']['Bulk']['Upload']['drops'] / tinsStats['sinceLastQuery']['Bulk']['Upload']['sent_packets'] + tinsStats['sinceLastQuery']['Bulk']['Download']['dropPercentage'] = max(round(dlPerc * 100.0, 3),0.0) + tinsStats['sinceLastQuery']['Bulk']['Upload']['dropPercentage'] = max(round(ulPerc * 100.0, 3),0.0) + + dlPerc = tinsStats['sinceLastQuery']['BestEffort']['Download']['drops'] / tinsStats['sinceLastQuery']['BestEffort']['Download']['sent_packets'] + ulPerc = tinsStats['sinceLastQuery']['BestEffort']['Upload']['drops'] / tinsStats['sinceLastQuery']['BestEffort']['Upload']['sent_packets'] + tinsStats['sinceLastQuery']['BestEffort']['Download']['dropPercentage'] = max(round(dlPerc * 100.0, 3),0.0) + tinsStats['sinceLastQuery']['BestEffort']['Upload']['dropPercentage'] = max(round(ulPerc * 100.0, 3),0.0) + + dlPerc = tinsStats['sinceLastQuery']['Video']['Download']['drops'] / tinsStats['sinceLastQuery']['Video']['Download']['sent_packets'] + ulPerc = tinsStats['sinceLastQuery']['Video']['Upload']['drops'] / tinsStats['sinceLastQuery']['Video']['Upload']['sent_packets'] + tinsStats['sinceLastQuery']['Video']['Download']['dropPercentage'] = max(round(dlPerc * 100.0, 3),0.0) + tinsStats['sinceLastQuery']['Video']['Upload']['dropPercentage'] = max(round(ulPerc * 100.0, 3),0.0) + + dlPerc = tinsStats['sinceLastQuery']['Voice']['Download']['drops'] / tinsStats['sinceLastQuery']['Voice']['Download']['sent_packets'] + ulPerc = tinsStats['sinceLastQuery']['Voice']['Upload']['drops'] / tinsStats['sinceLastQuery']['Voice']['Upload']['sent_packets'] + tinsStats['sinceLastQuery']['Voice']['Download']['dropPercentage'] = max(round(dlPerc * 100.0, 3),0.0) + tinsStats['sinceLastQuery']['Voice']['Upload']['dropPercentage'] = max(round(ulPerc * 100.0, 3),0.0) + except: + tinsStats['sinceLastQuery']['Bulk']['Download']['dropPercentage'] = 0.0 + tinsStats['sinceLastQuery']['Bulk']['Upload']['dropPercentage'] = 0.0 + tinsStats['sinceLastQuery']['BestEffort']['Download']['dropPercentage'] = 0.0 + tinsStats['sinceLastQuery']['BestEffort']['Upload']['dropPercentage'] = 0.0 + tinsStats['sinceLastQuery']['Video']['Download']['dropPercentage'] = 0.0 + tinsStats['sinceLastQuery']['Video']['Upload']['dropPercentage'] = 0.0 + tinsStats['sinceLastQuery']['Voice']['Download']['dropPercentage'] = 0.0 + tinsStats['sinceLastQuery']['Voice']['Upload']['dropPercentage'] = 0.0 + + try: + tinsStats['sinceLastQuery']['Bulk']['Download']['percentage'] = min(round((tinsStats['sinceLastQuery']['Bulk']['Download']['sent_packets']/allPacketsUpload)*100.0, 3),100.0) + tinsStats['sinceLastQuery']['Bulk']['Upload']['percentage'] = min(round((tinsStats['sinceLastQuery']['Bulk']['Upload']['sent_packets']/allPacketsUpload)*100.0, 3),100.0) + tinsStats['sinceLastQuery']['BestEffort']['Download']['percentage'] = min(round((tinsStats['sinceLastQuery']['BestEffort']['Download']['sent_packets']/allPacketsDownload)*100.0, 3),100.0) + tinsStats['sinceLastQuery']['BestEffort']['Upload']['percentage'] = min(round((tinsStats['sinceLastQuery']['BestEffort']['Upload']['sent_packets']/allPacketsUpload)*100.0, 3),100.0) + tinsStats['sinceLastQuery']['Video']['Download']['percentage'] = min(round((tinsStats['sinceLastQuery']['Video']['Download']['sent_packets']/allPacketsDownload)*100.0, 3),100.0) + tinsStats['sinceLastQuery']['Video']['Upload']['percentage'] = min(round((tinsStats['sinceLastQuery']['Video']['Upload']['sent_packets']/allPacketsUpload)*100.0, 3),100.0) + tinsStats['sinceLastQuery']['Voice']['Download']['percentage'] = min(round((tinsStats['sinceLastQuery']['Voice']['Download']['sent_packets']/allPacketsDownload)*100.0, 3),100.0) + tinsStats['sinceLastQuery']['Voice']['Upload']['percentage'] = min(round((tinsStats['sinceLastQuery']['Voice']['Upload']['sent_packets']/allPacketsUpload)*100.0, 3),100.0) + except: + # To avoid graphing 0.0 for all categories, which would show unusual graph results upon each queue reload, we just set these to None if the above calculations fail. + tinsStats['sinceLastQuery']['Bulk']['Download']['percentage'] = tinsStats['sinceLastQuery']['Bulk']['Upload']['percentage'] = None + tinsStats['sinceLastQuery']['BestEffort']['Download']['percentage'] = tinsStats['sinceLastQuery']['BestEffort']['Upload']['percentage'] = None + tinsStats['sinceLastQuery']['Video']['Download']['percentage'] = tinsStats['sinceLastQuery']['Video']['Upload']['percentage'] = None + tinsStats['sinceLastQuery']['Voice']['Download']['percentage'] = tinsStats['sinceLastQuery']['Voice']['Upload']['percentage'] = None + + return subscriberCircuits, tinsStats + + +def getParentNodeBandwidthStats(parentNodes, subscriberCircuits): + for parentNode in parentNodes: + thisNodeDropsDownload = 0 + thisNodeDropsUpload = 0 + thisNodeDropsTotal = 0 + thisNodeBitsDownload = 0 + thisNodeBitsUpload = 0 + packetsSentDownloadAggregate = 0.0 + packetsSentUploadAggregate = 0.0 + packetsSentTotalAggregate = 0.0 + circuitsMatched = 0 + thisParentNodeStats = {'sinceLastQuery': {}} + for circuit in subscriberCircuits: + if circuit['ParentNode'] == parentNode['parentNodeName']: + thisNodeBitsDownload += circuit['stats']['sinceLastQuery']['bitsDownload'] + thisNodeBitsUpload += circuit['stats']['sinceLastQuery']['bitsUpload'] + #thisNodeDropsDownload += circuit['packetDropsDownloadSinceLastQuery'] + #thisNodeDropsUpload += circuit['packetDropsUploadSinceLastQuery'] + thisNodeDropsTotal += (circuit['stats']['sinceLastQuery']['packetDropsDownload'] + circuit['stats']['sinceLastQuery']['packetDropsUpload']) + packetsSentDownloadAggregate += circuit['stats']['sinceLastQuery']['packetsSentDownload'] + packetsSentUploadAggregate += circuit['stats']['sinceLastQuery']['packetsSentUpload'] + packetsSentTotalAggregate += (circuit['stats']['sinceLastQuery']['packetsSentDownload'] + circuit['stats']['sinceLastQuery']['packetsSentUpload']) + circuitsMatched += 1 + if (packetsSentDownloadAggregate > 0) and (packetsSentUploadAggregate > 0): + #overloadFactorDownloadSinceLastQuery = float(round((thisNodeDropsDownload/packetsSentDownloadAggregate)*100.0, 3)) + #overloadFactorUploadSinceLastQuery = float(round((thisNodeDropsUpload/packetsSentUploadAggregate)*100.0, 3)) + overloadFactorTotalSinceLastQuery = float(round((thisNodeDropsTotal/packetsSentTotalAggregate)*100.0, 1)) + else: + #overloadFactorDownloadSinceLastQuery = 0.0 + #overloadFactorUploadSinceLastQuery = 0.0 + overloadFactorTotalSinceLastQuery = 0.0 + + thisParentNodeStats['sinceLastQuery']['bitsDownload'] = thisNodeBitsDownload + thisParentNodeStats['sinceLastQuery']['bitsUpload'] = thisNodeBitsUpload + thisParentNodeStats['sinceLastQuery']['packetDropsTotal'] = thisNodeDropsTotal + thisParentNodeStats['sinceLastQuery']['overloadFactorTotal'] = overloadFactorTotalSinceLastQuery + parentNode['stats'] = thisParentNodeStats + + return parentNodes + + +def getParentNodeLatencyStats(parentNodes, subscriberCircuits): + for parentNode in parentNodes: + if 'stats' not in parentNode: + parentNode['stats'] = {} + parentNode['stats']['sinceLastQuery'] = {} + + for parentNode in parentNodes: + thisParentNodeStats = {'sinceLastQuery': {}} + circuitsMatchedLatencies = [] + for circuit in subscriberCircuits: + if circuit['ParentNode'] == parentNode['parentNodeName']: + if circuit['stats']['sinceLastQuery']['tcpLatency'] != None: + circuitsMatchedLatencies.append(circuit['stats']['sinceLastQuery']['tcpLatency']) + if len(circuitsMatchedLatencies) > 0: + thisParentNodeStats['sinceLastQuery']['tcpLatency'] = statistics.median(circuitsMatchedLatencies) + else: + thisParentNodeStats['sinceLastQuery']['tcpLatency'] = None + parentNode['stats'] = thisParentNodeStats + return parentNodes + + +def getCircuitLatencyStats(subscriberCircuits): + command = './cpumap-pping/src/xdp_pping' + listOfEntries = json.loads(subprocess.run(command.split(' '), stdout=subprocess.PIPE).stdout.decode('utf-8')) + + tcpLatencyForClassID = {} + for entry in listOfEntries: + if 'tc' in entry: + handle = hex(int(entry['tc'].split(':')[0])) + ':' + hex(int(entry['tc'].split(':')[1])) + # To avoid outliers messing up avg for each circuit - cap at ceiling of 200ms + ceiling = 200.0 + tcpLatencyForClassID[handle] = min(entry['avg'], ceiling) + + for circuit in subscriberCircuits: + if 'stats' not in circuit: + circuit['stats'] = {} + circuit['stats']['sinceLastQuery'] = {} + + for circuit in subscriberCircuits: + classID = circuit['classid'] + if classID in tcpLatencyForClassID: + circuit['stats']['sinceLastQuery']['tcpLatency'] = tcpLatencyForClassID[classID] + else: + circuit['stats']['sinceLastQuery']['tcpLatency'] = None + + return subscriberCircuits + + +def getParentNodeDict(data, depth, parentNodeNameDict): + if parentNodeNameDict == None: + parentNodeNameDict = {} + + for elem in data: + if 'children' in data[elem]: + for child in data[elem]['children']: + parentNodeNameDict[child] = elem + tempDict = getParentNodeDict(data[elem]['children'], depth + 1, parentNodeNameDict) + parentNodeNameDict = dict(parentNodeNameDict, **tempDict) + return parentNodeNameDict + + +def parentNodeNameDictPull(): + # Load network heirarchy + with open('network.json', 'r') as j: + network = json.loads(j.read()) + parentNodeNameDict = getParentNodeDict(network, 0, None) + return parentNodeNameDict + +def refreshBandwidthGraphs(): + startTime = datetime.now() + with open('statsByParentNode.json', 'r') as j: + parentNodes = json.loads(j.read()) + + with open('statsByCircuit.json', 'r') as j: + subscriberCircuits = json.loads(j.read()) + + fileLoc = Path("tinsStats.json") + if fileLoc.is_file(): + with open(fileLoc, 'r') as j: + tinsStats = json.loads(j.read()) + else: + tinsStats = {} + + fileLoc = Path("longTermStats.json") + if fileLoc.is_file(): + with open(fileLoc, 'r') as j: + longTermStats = json.loads(j.read()) + droppedPacketsAllTime = longTermStats['droppedPacketsTotal'] + else: + longTermStats = {} + longTermStats['droppedPacketsTotal'] = 0.0 + droppedPacketsAllTime = 0.0 + + parentNodeNameDict = parentNodeNameDictPull() + + print("Retrieving circuit statistics") + subscriberCircuits, tinsStats = getCircuitBandwidthStats(subscriberCircuits, tinsStats) + print("Computing parent node statistics") + parentNodes = getParentNodeBandwidthStats(parentNodes, subscriberCircuits) + print("Writing data to InfluxDB") + client = InfluxDBClient( + url=influxDBurl, + token=influxDBtoken, + org=influxDBOrg + ) + + # Record current timestamp, use for all points added + timestamp = time.time_ns() + write_api = client.write_api(write_options=SYNCHRONOUS) + + chunkedsubscriberCircuits = list(chunk_list(subscriberCircuits, 200)) + + queriesToSendCount = 0 + for chunk in chunkedsubscriberCircuits: + queriesToSend = [] + for circuit in chunk: + bitsDownload = float(circuit['stats']['sinceLastQuery']['bitsDownload']) + bitsUpload = float(circuit['stats']['sinceLastQuery']['bitsUpload']) + if (bitsDownload > 0) and (bitsUpload > 0): + percentUtilizationDownload = round((bitsDownload / round(circuit['maxDownload'] * 1000000))*100.0, 1) + percentUtilizationUpload = round((bitsUpload / round(circuit['maxUpload'] * 1000000))*100.0, 1) + p = Point('Bandwidth').tag("Circuit", circuit['circuitName']).tag("ParentNode", circuit['ParentNode']).tag("Type", "Circuit").field("Download", bitsDownload).field("Upload", bitsUpload).time(timestamp) + queriesToSend.append(p) + p = Point('Utilization').tag("Circuit", circuit['circuitName']).tag("ParentNode", circuit['ParentNode']).tag("Type", "Circuit").field("Download", percentUtilizationDownload).field("Upload", percentUtilizationUpload).time(timestamp) + queriesToSend.append(p) + + write_api.write(bucket=influxDBBucket, record=queriesToSend) + # print("Added " + str(len(queriesToSend)) + " points to InfluxDB.") + queriesToSendCount += len(queriesToSend) + + queriesToSend = [] + for parentNode in parentNodes: + bitsDownload = float(parentNode['stats']['sinceLastQuery']['bitsDownload']) + bitsUpload = float(parentNode['stats']['sinceLastQuery']['bitsUpload']) + dropsTotal = float(parentNode['stats']['sinceLastQuery']['packetDropsTotal']) + overloadFactor = float(parentNode['stats']['sinceLastQuery']['overloadFactorTotal']) + droppedPacketsAllTime += dropsTotal + if (bitsDownload > 0) and (bitsUpload > 0): + percentUtilizationDownload = round((bitsDownload / round(parentNode['maxDownload'] * 1000000))*100.0, 1) + percentUtilizationUpload = round((bitsUpload / round(parentNode['maxUpload'] * 1000000))*100.0, 1) + p = Point('Bandwidth').tag("Device", parentNode['parentNodeName']).tag("ParentNode", parentNode['parentNodeName']).tag("Type", "Parent Node").field("Download", bitsDownload).field("Upload", bitsUpload).time(timestamp) + queriesToSend.append(p) + p = Point('Utilization').tag("Device", parentNode['parentNodeName']).tag("ParentNode", parentNode['parentNodeName']).tag("Type", "Parent Node").field("Download", percentUtilizationDownload).field("Upload", percentUtilizationUpload).time(timestamp) + queriesToSend.append(p) + p = Point('Overload').tag("Device", parentNode['parentNodeName']).tag("ParentNode", parentNode['parentNodeName']).tag("Type", "Parent Node").field("Overload", overloadFactor).time(timestamp) + queriesToSend.append(p) + + write_api.write(bucket=influxDBBucket, record=queriesToSend) + # print("Added " + str(len(queriesToSend)) + " points to InfluxDB.") + queriesToSendCount += len(queriesToSend) + + if 'cake diffserv4' in sqm: + queriesToSend = [] + listOfTins = ['Bulk', 'BestEffort', 'Video', 'Voice'] + for tin in listOfTins: + p = Point('Tin Drop Percentage').tag("Type", "Tin").tag("Tin", tin).field("Download", tinsStats['sinceLastQuery'][tin]['Download']['dropPercentage']).field("Upload", tinsStats['sinceLastQuery'][tin]['Upload']['dropPercentage']).time(timestamp) + queriesToSend.append(p) + # Check to ensure tin percentage has value (!= None) before graphing. During partial or full reload these will have a value of None. + if (tinsStats['sinceLastQuery'][tin]['Download']['percentage'] != None) and (tinsStats['sinceLastQuery'][tin]['Upload']['percentage'] != None): + p = Point('Tins Assigned').tag("Type", "Tin").tag("Tin", tin).field("Download", tinsStats['sinceLastQuery'][tin]['Download']['percentage']).field("Upload", tinsStats['sinceLastQuery'][tin]['Upload']['percentage']).time(timestamp) + queriesToSend.append(p) + + write_api.write(bucket=influxDBBucket, record=queriesToSend) + # print("Added " + str(len(queriesToSend)) + " points to InfluxDB.") + queriesToSendCount += len(queriesToSend) + + # Graph CPU use + cpuVals = psutil.cpu_percent(percpu=True) + queriesToSend = [] + for index, item in enumerate(cpuVals): + p = Point('CPU').field('CPU_' + str(index), item) + queriesToSend.append(p) + write_api.write(bucket=influxDBBucket, record=queriesToSend) + queriesToSendCount += len(queriesToSend) + + print("Added " + str(queriesToSendCount) + " points to InfluxDB.") + + client.close() + + with open('statsByParentNode.json', 'w') as f: + f.write(json.dumps(parentNodes, indent=4)) + + with open('statsByCircuit.json', 'w') as f: + f.write(json.dumps(subscriberCircuits, indent=4)) + + longTermStats['droppedPacketsTotal'] = droppedPacketsAllTime + with open('longTermStats.json', 'w') as f: + f.write(json.dumps(longTermStats, indent=4)) + + with open('tinsStats.json', 'w') as f: + f.write(json.dumps(tinsStats, indent=4)) + + endTime = datetime.now() + durationSeconds = round((endTime - startTime).total_seconds(), 2) + print("Graphs updated within " + str(durationSeconds) + " seconds.") + +def refreshLatencyGraphs(): + startTime = datetime.now() + with open('statsByParentNode.json', 'r') as j: + parentNodes = json.loads(j.read()) + + with open('statsByCircuit.json', 'r') as j: + subscriberCircuits = json.loads(j.read()) + + parentNodeNameDict = parentNodeNameDictPull() + + print("Retrieving circuit statistics") + subscriberCircuits = getCircuitLatencyStats(subscriberCircuits) + print("Computing parent node statistics") + parentNodes = getParentNodeLatencyStats(parentNodes, subscriberCircuits) + print("Writing data to InfluxDB") + client = InfluxDBClient( + url=influxDBurl, + token=influxDBtoken, + org=influxDBOrg + ) + + # Record current timestamp, use for all points added + timestamp = time.time_ns() + + write_api = client.write_api(write_options=SYNCHRONOUS) + + chunkedsubscriberCircuits = list(chunk_list(subscriberCircuits, 200)) + + queriesToSendCount = 0 + for chunk in chunkedsubscriberCircuits: + queriesToSend = [] + for circuit in chunk: + if circuit['stats']['sinceLastQuery']['tcpLatency'] != None: + tcpLatency = float(circuit['stats']['sinceLastQuery']['tcpLatency']) + p = Point('TCP Latency').tag("Circuit", circuit['circuitName']).tag("ParentNode", circuit['ParentNode']).tag("Type", "Circuit").field("TCP Latency", tcpLatency).time(timestamp) + queriesToSend.append(p) + write_api.write(bucket=influxDBBucket, record=queriesToSend) + queriesToSendCount += len(queriesToSend) + + queriesToSend = [] + for parentNode in parentNodes: + if parentNode['stats']['sinceLastQuery']['tcpLatency'] != None: + tcpLatency = float(parentNode['stats']['sinceLastQuery']['tcpLatency']) + p = Point('TCP Latency').tag("Device", parentNode['parentNodeName']).tag("ParentNode", parentNode['parentNodeName']).tag("Type", "Parent Node").field("TCP Latency", tcpLatency).time(timestamp) + queriesToSend.append(p) + + write_api.write(bucket=influxDBBucket, record=queriesToSend) + queriesToSendCount += len(queriesToSend) + + listOfAllLatencies = [] + for circuit in subscriberCircuits: + if circuit['stats']['sinceLastQuery']['tcpLatency'] != None: + listOfAllLatencies.append(circuit['stats']['sinceLastQuery']['tcpLatency']) + currentNetworkLatency = statistics.median(listOfAllLatencies) + p = Point('TCP Latency').tag("Type", "Network").field("TCP Latency", currentNetworkLatency).time(timestamp) + write_api.write(bucket=influxDBBucket, record=p) + queriesToSendCount += 1 + + print("Added " + str(queriesToSendCount) + " points to InfluxDB.") + + client.close() + + with open('statsByParentNode.json', 'w') as f: + f.write(json.dumps(parentNodes, indent=4)) + + with open('statsByCircuit.json', 'w') as f: + f.write(json.dumps(subscriberCircuits, indent=4)) + + endTime = datetime.now() + durationSeconds = round((endTime - startTime).total_seconds(), 2) + print("Graphs updated within " + str(durationSeconds) + " seconds.") + +if __name__ == '__main__': + refreshBandwidthGraphs() + refreshLatencyGraphs() diff --git a/old/v1.3/influxDBdashboardTemplate.json b/old/v1.3/influxDBdashboardTemplate.json new file mode 100644 index 00000000..97505429 --- /dev/null +++ b/old/v1.3/influxDBdashboardTemplate.json @@ -0,0 +1,2390 @@ +{ + "meta": { + "version": "1", + "type": "dashboard", + "name": "LibreQoS-Template", + "description": "template created from dashboard: LibreQoS" + }, + "content": { + "data": { + "type": "dashboard", + "attributes": { + "name": "LibreQoS", + "description": "" + }, + "relationships": { + "label": { + "data": [] + }, + "cell": { + "data": [ + { + "type": "cell", + "id": "0a3625ffd5af0000" + }, + { + "type": "cell", + "id": "0a3625ffd6ef0000" + }, + { + "type": "cell", + "id": "0a3625ffd72f0000" + }, + { + "type": "cell", + "id": "0a3625ffd76f0000" + }, + { + "type": "cell", + "id": "0a3625ffd7af0000" + }, + { + "type": "cell", + "id": "0a3625ffd7ef0000" + }, + { + "type": "cell", + "id": "0a3625ffe0ef0000" + }, + { + "type": "cell", + "id": "0a3625ffe22f0000" + }, + { + "type": "cell", + "id": "0a3625ffe3af0000" + }, + { + "type": "cell", + "id": "0a3625ffe3ef0000" + }, + { + "type": "cell", + "id": "0a3625ffe42f0000" + }, + { + "type": "cell", + "id": "0a3625ffe46f0000" + }, + { + "type": "cell", + "id": "0a3625ffec6f0000" + }, + { + "type": "cell", + "id": "0a3625fff02f0000" + }, + { + "type": "cell", + "id": "0a3702644613a000" + }, + { + "type": "cell", + "id": "0a3e54826cfc2000" + }, + { + "type": "cell", + "id": "0a3e55b7fdfc2000" + }, + { + "type": "cell", + "id": "0a45cb04f67c2000" + } + ] + }, + "variable": { + "data": [] + } + } + }, + "included": [ + { + "id": "0a3625ffd5af0000", + "type": "cell", + "attributes": { + "x": 0, + "y": 0, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffd5af0000" + } + } + } + }, + { + "id": "0a3625ffd6ef0000", + "type": "cell", + "attributes": { + "x": 5, + "y": 8, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffd6ef0000" + } + } + } + }, + { + "id": "0a3625ffd72f0000", + "type": "cell", + "attributes": { + "x": 0, + "y": 12, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffd72f0000" + } + } + } + }, + { + "id": "0a3625ffd76f0000", + "type": "cell", + "attributes": { + "x": 5, + "y": 0, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffd76f0000" + } + } + } + }, + { + "id": "0a3625ffd7af0000", + "type": "cell", + "attributes": { + "x": 10, + "y": 0, + "w": 2, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffd7af0000" + } + } + } + }, + { + "id": "0a3625ffd7ef0000", + "type": "cell", + "attributes": { + "x": 10, + "y": 16, + "w": 2, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffd7ef0000" + } + } + } + }, + { + "id": "0a3625ffe0ef0000", + "type": "cell", + "attributes": { + "x": 0, + "y": 24, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffe0ef0000" + } + } + } + }, + { + "id": "0a3625ffe22f0000", + "type": "cell", + "attributes": { + "x": 0, + "y": 20, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffe22f0000" + } + } + } + }, + { + "id": "0a3625ffe3af0000", + "type": "cell", + "attributes": { + "x": 5, + "y": 16, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffe3af0000" + } + } + } + }, + { + "id": "0a3625ffe3ef0000", + "type": "cell", + "attributes": { + "x": 0, + "y": 16, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffe3ef0000" + } + } + } + }, + { + "id": "0a3625ffe42f0000", + "type": "cell", + "attributes": { + "x": 5, + "y": 20, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffe42f0000" + } + } + } + }, + { + "id": "0a3625ffe46f0000", + "type": "cell", + "attributes": { + "x": 0, + "y": 4, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffe46f0000" + } + } + } + }, + { + "id": "0a3625ffec6f0000", + "type": "cell", + "attributes": { + "x": 5, + "y": 12, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625ffec6f0000" + } + } + } + }, + { + "id": "0a3625fff02f0000", + "type": "cell", + "attributes": { + "x": 10, + "y": 4, + "w": 2, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3625fff02f0000" + } + } + } + }, + { + "id": "0a3702644613a000", + "type": "cell", + "attributes": { + "x": 10, + "y": 8, + "w": 2, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3702644613a000" + } + } + } + }, + { + "id": "0a3e54826cfc2000", + "type": "cell", + "attributes": { + "x": 5, + "y": 4, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3e54826cfc2000" + } + } + } + }, + { + "id": "0a3e55b7fdfc2000", + "type": "cell", + "attributes": { + "x": 10, + "y": 12, + "w": 2, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a3e55b7fdfc2000" + } + } + } + }, + { + "id": "0a45cb04f67c2000", + "type": "cell", + "attributes": { + "x": 0, + "y": 8, + "w": 5, + "h": 4 + }, + "relationships": { + "view": { + "data": { + "type": "view", + "id": "0a45cb04f67c2000" + } + } + } + }, + { + "type": "view", + "id": "0a3625ffd5af0000", + "attributes": { + "name": "Download Bandwidth | Nodes", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Bandwidth\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> filter(fn: (r) => r[\"_field\"] == \"Download\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + }, + "y": { + "bounds": [ + "0", + "" + ], + "label": "bits per second", + "prefix": "", + "suffix": "bps", + "base": "10", + "scale": "linear" + } + }, + "type": "xy", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "monotoneX", + "colors": [ + { + "id": "d3804aa0-9930-45e5-879e-8a79b306d2bc", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "ff778217-93b4-41c1-baf9-5eac71c6969a", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "770d44dd-3a18-4132-af57-86f3a5fb4738", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "shadeBelow": false, + "position": "stacked", + "timeFormat": "", + "hoverDimension": "auto", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3625ffd6ef0000", + "attributes": { + "name": "Utilization | Nodes", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Utilization\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + }, + "y": { + "bounds": [ + "", + "" + ], + "label": "Percent Utilization", + "prefix": "", + "suffix": "%", + "base": "2", + "scale": "linear" + } + }, + "type": "xy", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "monotoneX", + "colors": [ + { + "id": "d3804aa0-9930-45e5-879e-8a79b306d2bc", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "ff778217-93b4-41c1-baf9-5eac71c6969a", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "770d44dd-3a18-4132-af57-86f3a5fb4738", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "shadeBelow": false, + "position": "overlaid", + "timeFormat": "", + "hoverDimension": "auto", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3625ffd72f0000", + "attributes": { + "name": "Download Bandwidth | Circuits", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Bandwidth\")\n |> filter(fn: (r) => r[\"Type\"] == \"Circuit\")\n |> filter(fn: (r) => r[\"_field\"] == \"Download\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + }, + "y": { + "bounds": [ + "", + "" + ], + "label": "bits per second", + "prefix": "", + "suffix": "bps", + "base": "10", + "scale": "linear" + } + }, + "type": "xy", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "monotoneX", + "colors": [ + { + "id": "d3804aa0-9930-45e5-879e-8a79b306d2bc", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "ff778217-93b4-41c1-baf9-5eac71c6969a", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "770d44dd-3a18-4132-af57-86f3a5fb4738", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "shadeBelow": false, + "position": "overlaid", + "timeFormat": "", + "hoverDimension": "auto", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3625ffd76f0000", + "attributes": { + "name": "Upload Bandwidth | Nodes", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Bandwidth\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> filter(fn: (r) => r[\"_field\"] == \"Upload\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + }, + "y": { + "bounds": [ + "0", + "" + ], + "label": "bits per second", + "prefix": "", + "suffix": "bps", + "base": "10", + "scale": "linear" + } + }, + "type": "xy", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "monotoneX", + "colors": [ + { + "id": "d3804aa0-9930-45e5-879e-8a79b306d2bc", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "ff778217-93b4-41c1-baf9-5eac71c6969a", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "770d44dd-3a18-4132-af57-86f3a5fb4738", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "shadeBelow": false, + "position": "stacked", + "timeFormat": "", + "hoverDimension": "auto", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3625ffd7af0000", + "attributes": { + "name": "Utilization | Nodes", + "properties": { + "shape": "chronograf-v2", + "type": "table", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Utilization\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> last()\n |> group(columns: [\"Type\", \"_time\"])\n\n |> sort(columns: [\"_value\", \"Device\"], desc: true)\n |> keep(columns: [\"_value\", \"Device\"])\n |> top(n:9, columns: [\"_value\"])", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "colors": [ + { + "id": "base", + "type": "text", + "hex": "#4591ED", + "name": "ocean", + "value": 0 + }, + { + "id": "ebf165e1-871a-4b10-b558-e039f376be40", + "type": "text", + "hex": "#FFD255", + "name": "thunder", + "value": 25 + }, + { + "id": "8b4b10e5-5b16-41b0-8f5b-97f22f8eace2", + "type": "text", + "hex": "#F95F53", + "name": "curacao", + "value": 50 + }, + { + "id": "a36e8317-8138-46a4-bec4-a7588d9f348c", + "type": "text", + "hex": "#BF3D5E", + "name": "ruby", + "value": 75 + } + ], + "tableOptions": { + "verticalTimeAxis": true, + "sortBy": { + "internalName": "_value", + "displayName": "_value", + "visible": true + }, + "wrapping": "", + "fixFirstColumn": false + }, + "fieldOptions": [ + { + "internalName": "_start", + "displayName": "_start", + "visible": false + }, + { + "internalName": "_stop", + "displayName": "_stop", + "visible": false + }, + { + "internalName": "_time", + "displayName": "_time", + "visible": false + }, + { + "internalName": "Device", + "displayName": "Device", + "visible": true + }, + { + "internalName": "_value", + "displayName": "_value", + "visible": true + }, + { + "internalName": "ParentNode", + "displayName": "ParentNode", + "visible": false + }, + { + "internalName": "Type", + "displayName": "Type", + "visible": false + }, + { + "internalName": "_field", + "displayName": "_field", + "visible": false + }, + { + "internalName": "_measurement", + "displayName": "_measurement", + "visible": false + } + ], + "timeFormat": "YYYY-MM-DD HH:mm:ss", + "decimalPlaces": { + "isEnforced": false, + "digits": 0 + }, + "note": "", + "showNoteWhenEmpty": false + } + } + }, + { + "type": "view", + "id": "0a3625ffd7ef0000", + "attributes": { + "name": "Overload | Nodes", + "properties": { + "shape": "chronograf-v2", + "type": "table", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Overload\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> last()\n |> group(columns: [\"Type\", \"_time\"])\n |> map(fn: (r) => ({ r with _value: r._value}))\n \n |> sort(columns: [\"_value\", \"Device\"], desc: true)\n |> keep(columns: [\"_value\", \"Device\"])\n |> top(n:9, columns: [\"_value\"])", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "colors": [ + { + "id": "base", + "type": "text", + "hex": "#4591ED", + "name": "ocean", + "value": 0 + }, + { + "id": "ebf165e1-871a-4b10-b558-e039f376be40", + "type": "text", + "hex": "#FFD255", + "name": "thunder", + "value": 25 + }, + { + "id": "8b4b10e5-5b16-41b0-8f5b-97f22f8eace2", + "type": "text", + "hex": "#F95F53", + "name": "curacao", + "value": 50 + }, + { + "id": "a36e8317-8138-46a4-bec4-a7588d9f348c", + "type": "text", + "hex": "#BF3D5E", + "name": "ruby", + "value": 75 + } + ], + "tableOptions": { + "verticalTimeAxis": true, + "sortBy": { + "internalName": "_value", + "displayName": "_value", + "visible": true + }, + "wrapping": "", + "fixFirstColumn": false + }, + "fieldOptions": [ + { + "internalName": "Device", + "displayName": "Device", + "visible": true + }, + { + "internalName": "_value", + "displayName": "_value", + "visible": true + } + ], + "timeFormat": "YYYY-MM-DD HH:mm:ss", + "decimalPlaces": { + "isEnforced": false, + "digits": 0 + }, + "note": "", + "showNoteWhenEmpty": false + } + } + }, + { + "type": "view", + "id": "0a3625ffe0ef0000", + "attributes": { + "name": "Overload Drops | Nodes", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Overload\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + }, + "y": { + "bounds": [ + "", + "" + ], + "label": "Percent Utilization", + "prefix": "", + "suffix": "%", + "base": "2", + "scale": "linear" + } + }, + "type": "xy", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "monotoneX", + "colors": [ + { + "id": "d3804aa0-9930-45e5-879e-8a79b306d2bc", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "ff778217-93b4-41c1-baf9-5eac71c6969a", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "770d44dd-3a18-4132-af57-86f3a5fb4738", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "shadeBelow": false, + "position": "overlaid", + "timeFormat": "", + "hoverDimension": "auto", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3625ffe22f0000", + "attributes": { + "name": "Download by Tin", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tins Assigned\")\n |> filter(fn: (r) => r[\"_field\"] == \"Download\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + }, + "y": { + "bounds": [ + "", + "" + ], + "label": "Percent", + "prefix": "", + "suffix": "%", + "base": "2", + "scale": "linear" + } + }, + "type": "xy", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "monotoneX", + "colors": [ + { + "id": "d3804aa0-9930-45e5-879e-8a79b306d2bc", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "ff778217-93b4-41c1-baf9-5eac71c6969a", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "770d44dd-3a18-4132-af57-86f3a5fb4738", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "shadeBelow": false, + "position": "overlaid", + "timeFormat": "", + "hoverDimension": "auto", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3625ffe3af0000", + "attributes": { + "name": "Drops by Tin | Upload", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tin Drop Percentage\")\n |> filter(fn: (r) => r[\"_field\"] == \"Upload\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + }, + "y": { + "bounds": [ + "", + "" + ], + "label": "Percent Drop", + "prefix": "", + "suffix": "%", + "base": "2", + "scale": "linear" + } + }, + "type": "xy", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "monotoneX", + "colors": [ + { + "id": "d3804aa0-9930-45e5-879e-8a79b306d2bc", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "ff778217-93b4-41c1-baf9-5eac71c6969a", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "770d44dd-3a18-4132-af57-86f3a5fb4738", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "shadeBelow": false, + "position": "overlaid", + "timeFormat": "", + "hoverDimension": "auto", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3625ffe3ef0000", + "attributes": { + "name": "Drops by Tin | Download", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tin Drop Percentage\")\n |> filter(fn: (r) => r[\"_field\"] == \"Download\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + }, + "y": { + "bounds": [ + "", + "" + ], + "label": "Percent Drop", + "prefix": "", + "suffix": "%", + "base": "2", + "scale": "linear" + } + }, + "type": "xy", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "monotoneX", + "colors": [ + { + "id": "d3804aa0-9930-45e5-879e-8a79b306d2bc", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "ff778217-93b4-41c1-baf9-5eac71c6969a", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "770d44dd-3a18-4132-af57-86f3a5fb4738", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "shadeBelow": false, + "position": "overlaid", + "timeFormat": "", + "hoverDimension": "auto", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3625ffe42f0000", + "attributes": { + "name": "Upload by Tin", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tins Assigned\")\n |> filter(fn: (r) => r[\"_field\"] == \"Upload\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + }, + "y": { + "bounds": [ + "", + "" + ], + "label": "Percent", + "prefix": "", + "suffix": "%", + "base": "2", + "scale": "linear" + } + }, + "type": "xy", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "monotoneX", + "colors": [ + { + "id": "d3804aa0-9930-45e5-879e-8a79b306d2bc", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "ff778217-93b4-41c1-baf9-5eac71c6969a", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "770d44dd-3a18-4132-af57-86f3a5fb4738", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "shadeBelow": false, + "position": "overlaid", + "timeFormat": "", + "hoverDimension": "auto", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3625ffe46f0000", + "attributes": { + "name": "TCP Latency | Circuits", + "properties": { + "shape": "chronograf-v2", + "type": "histogram", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Circuit\")\n |> filter(fn: (r) => r[\"_field\"] == \"TCP Latency\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "colors": [ + { + "id": "fd2dc3e9-d00b-44bd-97c0-b39748787656", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "9a32b733-aac8-4ee7-8f9e-41c0600b4270", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "3247c366-9139-4bef-aadc-78e5df8ef217", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "xColumn": "_value", + "fillColumns": [ + "ParentNode" + ], + "xAxisLabel": "RTT (ms)", + "position": "stacked", + "binCount": 140, + "note": "", + "showNoteWhenEmpty": false, + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3625ffec6f0000", + "attributes": { + "name": "Upload Bandwidth | Circuits", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Bandwidth\")\n |> filter(fn: (r) => r[\"Type\"] == \"Circuit\")\n |> filter(fn: (r) => r[\"_field\"] == \"Upload\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + }, + "y": { + "bounds": [ + "", + "" + ], + "label": "bits per second", + "prefix": "", + "suffix": "bps", + "base": "10", + "scale": "linear" + } + }, + "type": "xy", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "monotoneX", + "colors": [ + { + "id": "d3804aa0-9930-45e5-879e-8a79b306d2bc", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "ff778217-93b4-41c1-baf9-5eac71c6969a", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "770d44dd-3a18-4132-af57-86f3a5fb4738", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "shadeBelow": false, + "position": "overlaid", + "timeFormat": "", + "hoverDimension": "auto", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3625fff02f0000", + "attributes": { + "name": "TCP Latency | Nodes | Standard View", + "properties": { + "shape": "chronograf-v2", + "type": "table", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: median, createEmpty: false)\n |> last()\n |> group(columns: [\"Type\", \"_time\"])\n |> sort(columns: [\"_value\", \"Device\"], desc: true)\n |> keep(columns: [\"_value\", \"Device\"])\n |> top(n:9, columns: [\"_value\"])", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "colors": [ + { + "id": "base", + "type": "text", + "hex": "#32B08C", + "name": "viridian", + "value": 0 + }, + { + "id": "ebf165e1-871a-4b10-b558-e039f376be40", + "type": "text", + "hex": "#FFD255", + "name": "thunder", + "value": 75 + }, + { + "id": "a36e8317-8138-46a4-bec4-a7588d9f348c", + "type": "text", + "hex": "#BF3D5E", + "name": "ruby", + "value": 125 + } + ], + "tableOptions": { + "verticalTimeAxis": true, + "sortBy": { + "internalName": "_value", + "displayName": "_value", + "visible": true + }, + "wrapping": "", + "fixFirstColumn": false + }, + "fieldOptions": [ + { + "internalName": "Device", + "displayName": "Device", + "visible": true + }, + { + "internalName": "_value", + "displayName": "_value", + "visible": true + } + ], + "timeFormat": "YYYY-MM-DD HH:mm:ss", + "decimalPlaces": { + "isEnforced": false, + "digits": 0 + }, + "note": "", + "showNoteWhenEmpty": false + } + } + }, + { + "type": "view", + "id": "0a3702644613a000", + "attributes": { + "name": "TCP Latency | Nodes | Metaverse-Ready View", + "properties": { + "shape": "chronograf-v2", + "type": "table", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: median, createEmpty: false)\n |> last()\n |> group(columns: [\"Type\", \"_time\"])\n |> sort(columns: [\"_value\", \"Device\"], desc: true)\n |> keep(columns: [\"_value\", \"Device\"])\n |> top(n:9, columns: [\"_value\"])", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "colors": [ + { + "id": "base", + "type": "text", + "hex": "#4591ED", + "name": "ocean", + "value": 0 + }, + { + "id": "836815c4-8f0b-4296-9797-c4d2c66454da", + "type": "text", + "hex": "#32B08C", + "name": "viridian", + "value": 9 + }, + { + "id": "a36e8317-8138-46a4-bec4-a7588d9f348c", + "type": "text", + "hex": "#FFB94A", + "name": "pineapple", + "value": 20 + }, + { + "id": "dfec4920-0c00-4788-b3e2-d3cefcf9dbf6", + "type": "text", + "hex": "#F95F53", + "name": "curacao", + "value": 50 + }, + { + "id": "d322c223-c8d2-4ee2-9e26-fdd00b9911d9", + "type": "text", + "hex": "#BF3D5E", + "name": "ruby", + "value": 70 + }, + { + "id": "bb134440-7624-4055-884e-5712af40bf55", + "type": "text", + "hex": "#DC4E58", + "name": "fire", + "value": 100 + } + ], + "tableOptions": { + "verticalTimeAxis": true, + "sortBy": { + "internalName": "_value", + "displayName": "_value", + "visible": true + }, + "wrapping": "", + "fixFirstColumn": false + }, + "fieldOptions": [ + { + "internalName": "Device", + "displayName": "Device", + "visible": true + }, + { + "internalName": "_value", + "displayName": "_value", + "visible": true + } + ], + "timeFormat": "YYYY-MM-DD HH:mm:ss", + "decimalPlaces": { + "isEnforced": false, + "digits": 0 + }, + "note": "", + "showNoteWhenEmpty": false + } + } + }, + { + "type": "view", + "id": "0a3e54826cfc2000", + "attributes": { + "name": "TCP Latency | Network", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": " from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Network\")\n |> filter(fn: (r) => r[\"_field\"] == \"TCP Latency\")\n |> aggregateWindow(every: 60s, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")\n\nfrom(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Network\")\n |> filter(fn: (r) => r[\"_field\"] == \"TCP Latency\")\n |> aggregateWindow(every: 60s, fn: max, createEmpty: false)\n |> yield(name: \"max\")\n\nfrom(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Network\")\n |> filter(fn: (r) => r[\"_field\"] == \"TCP Latency\")\n |> aggregateWindow(every: 60s, fn: min, createEmpty: false)\n |> yield(name: \"min\")\n", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "", + "scale": "linear" + }, + "y": { + "bounds": null, + "label": "", + "prefix": "", + "suffix": "", + "base": "", + "scale": "linear" + } + }, + "type": "band", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "step", + "colors": [ + { + "id": "07e5a63c-177b-4f4f-8343-5ff0a3ad460f", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "c518431a-907b-4635-9e50-33e0ddd7c1cd", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "59acc504-b3e3-45b7-98b3-2d4790e50e61", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "timeFormat": "", + "hoverDimension": "auto", + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "upperColumn": "min", + "mainColumn": "mean", + "lowerColumn": "max", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + }, + { + "type": "view", + "id": "0a3e55b7fdfc2000", + "attributes": { + "name": "Utilization | Circuit", + "properties": { + "shape": "chronograf-v2", + "type": "table", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Utilization\")\n |> filter(fn: (r) => r[\"Type\"] == \"Circuit\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> last()\n |> group(columns: [\"Type\", \"_time\"])\n\n |> sort(columns: [\"_value\", \"Circuit\"], desc: true)\n |> keep(columns: [\"_value\", \"Circuit\"])\n |> top(n:9, columns: [\"_value\"])", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "colors": [ + { + "id": "base", + "type": "text", + "hex": "#4591ED", + "name": "ocean", + "value": 0 + }, + { + "id": "ebf165e1-871a-4b10-b558-e039f376be40", + "type": "text", + "hex": "#FFD255", + "name": "thunder", + "value": 25 + }, + { + "id": "8b4b10e5-5b16-41b0-8f5b-97f22f8eace2", + "type": "text", + "hex": "#F95F53", + "name": "curacao", + "value": 50 + }, + { + "id": "a36e8317-8138-46a4-bec4-a7588d9f348c", + "type": "text", + "hex": "#BF3D5E", + "name": "ruby", + "value": 75 + } + ], + "tableOptions": { + "verticalTimeAxis": true, + "sortBy": { + "internalName": "_value", + "displayName": "_value", + "visible": true + }, + "wrapping": "", + "fixFirstColumn": false + }, + "fieldOptions": [ + { + "internalName": "_start", + "displayName": "_start", + "visible": false + }, + { + "internalName": "_stop", + "displayName": "_stop", + "visible": false + }, + { + "internalName": "Circuit", + "displayName": "Circuit", + "visible": true + }, + { + "internalName": "_time", + "displayName": "_time", + "visible": false + }, + { + "internalName": "_value", + "displayName": "_value", + "visible": true + }, + { + "internalName": "Device", + "displayName": "Device", + "visible": true + }, + { + "internalName": "ParentNode", + "displayName": "ParentNode", + "visible": false + }, + { + "internalName": "Type", + "displayName": "Type", + "visible": false + }, + { + "internalName": "_field", + "displayName": "_field", + "visible": false + }, + { + "internalName": "_measurement", + "displayName": "_measurement", + "visible": false + } + ], + "timeFormat": "YYYY-MM-DD HH:mm:ss", + "decimalPlaces": { + "isEnforced": false, + "digits": 0 + }, + "note": "", + "showNoteWhenEmpty": false + } + } + }, + { + "type": "view", + "id": "0a45cb04f67c2000", + "attributes": { + "name": "TCP Latency | Nodes", + "properties": { + "shape": "chronograf-v2", + "queries": [ + { + "text": "from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> filter(fn: (r) => r[\"_field\"] == \"TCP Latency\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")", + "editMode": "advanced", + "name": "", + "builderConfig": { + "buckets": [], + "tags": [ + { + "key": "_measurement", + "values": [], + "aggregateFunctionType": "filter" + } + ], + "functions": [ + { + "name": "mean" + } + ], + "aggregateWindow": { + "period": "auto", + "fillValues": false + } + } + } + ], + "axes": { + "x": { + "bounds": [ + "", + "" + ], + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + }, + "y": { + "bounds": null, + "label": "", + "prefix": "", + "suffix": "", + "base": "10", + "scale": "linear" + } + }, + "type": "xy", + "staticLegend": { + "colorizeRows": true, + "opacity": 1, + "orientationThreshold": 100000000, + "widthRatio": 1 + }, + "geom": "monotoneX", + "colors": [ + { + "id": "9a3213f8-38be-4075-a164-0af0b13fde1c", + "type": "scale", + "hex": "#31C0F6", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "a236706f-192f-4538-b08f-b1a5944a67e9", + "type": "scale", + "hex": "#A500A5", + "name": "Nineteen Eighty Four", + "value": 0 + }, + { + "id": "53c9ec3a-c023-4326-b624-ebd7d9890929", + "type": "scale", + "hex": "#FF7E27", + "name": "Nineteen Eighty Four", + "value": 0 + } + ], + "note": "", + "showNoteWhenEmpty": false, + "xColumn": "_time", + "generateXAxisTicks": [], + "xTotalTicks": 0, + "xTickStart": 0, + "xTickStep": 0, + "yColumn": "_value", + "generateYAxisTicks": [], + "yTotalTicks": 0, + "yTickStart": 0, + "yTickStep": 0, + "shadeBelow": false, + "position": "overlaid", + "timeFormat": "", + "hoverDimension": "auto", + "legendColorizeRows": true, + "legendHide": false, + "legendOpacity": 1, + "legendOrientationThreshold": 100000000 + } + } + } + ] + }, + "labels": [] +} diff --git a/old/v1.3/influxDBdashboardTemplate_v2.5.1.json b/old/v1.3/influxDBdashboardTemplate_v2.5.1.json new file mode 100644 index 00000000..8fe2cf8a --- /dev/null +++ b/old/v1.3/influxDBdashboardTemplate_v2.5.1.json @@ -0,0 +1 @@ +[{"apiVersion":"influxdata.com/v2alpha1","kind":"Dashboard","metadata":{"name":"unbridled-goodall-cd9001"},"spec":{"charts":[{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"10","label":"bits per second","name":"y","scale":"linear","suffix":"bps"}],"colorizeRows":true,"colors":[{"id":"d3804aa0-9930-45e5-879e-8a79b306d2bc","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"ff778217-93b4-41c1-baf9-5eac71c6969a","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"770d44dd-3a18-4132-af57-86f3a5fb4738","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"monotoneX","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"Download Bandwidth | Nodes","opacity":1,"orientationThreshold":100000000,"position":"stacked","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Bandwidth\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> filter(fn: (r) => r[\"_field\"] == \"Download\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","yCol":"_value"},{"axes":[{"label":"RTT (ms)","name":"x"}],"binCount":140,"colors":[{"id":"fd2dc3e9-d00b-44bd-97c0-b39748787656","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"9a32b733-aac8-4ee7-8f9e-41c0600b4270","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"3247c366-9139-4bef-aadc-78e5df8ef217","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"fillColumns":["ParentNode"],"height":4,"kind":"Histogram","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"TCP Latency | Circuits","position":"stacked","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Circuit\")\n |> filter(fn: (r) => r[\"_field\"] == \"TCP Latency\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{},"width":5,"xCol":"_value","yPos":4},{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"10","name":"y","scale":"linear"}],"colorizeRows":true,"colors":[{"id":"9a3213f8-38be-4075-a164-0af0b13fde1c","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"a236706f-192f-4538-b08f-b1a5944a67e9","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"53c9ec3a-c023-4326-b624-ebd7d9890929","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"monotoneX","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"TCP Latency | Nodes","opacity":1,"orientationThreshold":100000000,"position":"overlaid","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> filter(fn: (r) => r[\"_field\"] == \"TCP Latency\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","yCol":"_value","yPos":8},{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"10","label":"bits per second","name":"y","scale":"linear","suffix":"bps"}],"colorizeRows":true,"colors":[{"id":"d3804aa0-9930-45e5-879e-8a79b306d2bc","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"ff778217-93b4-41c1-baf9-5eac71c6969a","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"770d44dd-3a18-4132-af57-86f3a5fb4738","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"monotoneX","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"Download Bandwidth | Circuits","opacity":1,"orientationThreshold":100000000,"position":"overlaid","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Bandwidth\")\n |> filter(fn: (r) => r[\"Type\"] == \"Circuit\")\n |> filter(fn: (r) => r[\"_field\"] == \"Download\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","yCol":"_value","yPos":12},{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"2","label":"Percent Drop","name":"y","scale":"linear","suffix":"%"}],"colorizeRows":true,"colors":[{"id":"d3804aa0-9930-45e5-879e-8a79b306d2bc","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"ff778217-93b4-41c1-baf9-5eac71c6969a","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"770d44dd-3a18-4132-af57-86f3a5fb4738","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"monotoneX","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"Drops by Tin | Download","opacity":1,"orientationThreshold":100000000,"position":"overlaid","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tin Drop Percentage\")\n |> filter(fn: (r) => r[\"_field\"] == \"Download\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","yCol":"_value","yPos":16},{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"2","label":"Percent","name":"y","scale":"linear","suffix":"%"}],"colorizeRows":true,"colors":[{"id":"d3804aa0-9930-45e5-879e-8a79b306d2bc","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"ff778217-93b4-41c1-baf9-5eac71c6969a","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"770d44dd-3a18-4132-af57-86f3a5fb4738","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"monotoneX","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"Download by Tin","opacity":1,"orientationThreshold":100000000,"position":"overlaid","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tins Assigned\")\n |> filter(fn: (r) => r[\"_field\"] == \"Download\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","yCol":"_value","yPos":20},{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"2","label":"Percent Utilization","name":"y","scale":"linear","suffix":"%"}],"colorizeRows":true,"colors":[{"id":"d3804aa0-9930-45e5-879e-8a79b306d2bc","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"ff778217-93b4-41c1-baf9-5eac71c6969a","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"770d44dd-3a18-4132-af57-86f3a5fb4738","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"monotoneX","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"Overload Drops | Nodes","opacity":1,"orientationThreshold":100000000,"position":"overlaid","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Overload\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","yCol":"_value","yPos":24},{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"10","label":"bits per second","name":"y","scale":"linear","suffix":"bps"}],"colorizeRows":true,"colors":[{"id":"d3804aa0-9930-45e5-879e-8a79b306d2bc","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"ff778217-93b4-41c1-baf9-5eac71c6969a","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"770d44dd-3a18-4132-af57-86f3a5fb4738","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"monotoneX","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"Upload Bandwidth | Nodes","opacity":1,"orientationThreshold":100000000,"position":"stacked","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Bandwidth\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> filter(fn: (r) => r[\"_field\"] == \"Upload\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","xPos":5,"yCol":"_value"},{"axes":[{"name":"x","scale":"linear"},{"name":"y","scale":"linear"}],"colorizeRows":true,"colors":[{"id":"07e5a63c-177b-4f4f-8343-5ff0a3ad460f","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"c518431a-907b-4635-9e50-33e0ddd7c1cd","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"59acc504-b3e3-45b7-98b3-2d4790e50e61","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"line","height":4,"hoverDimension":"auto","kind":"Band","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"lowerColumn":"max","mainColumn":"mean","name":"TCP Latency | Network","opacity":1,"orientationThreshold":100000000,"queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Network\")\n |> filter(fn: (r) => r[\"_field\"] == \"TCP Latency\")\n |> aggregateWindow(every: 60s, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")\n\nfrom(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Network\")\n |> filter(fn: (r) => r[\"_field\"] == \"TCP Latency\")\n |> aggregateWindow(every: 60s, fn: max, createEmpty: false)\n |> yield(name: \"max\")\n\nfrom(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Network\")\n |> filter(fn: (r) => r[\"_field\"] == \"TCP Latency\")\n |> aggregateWindow(every: 60s, fn: min, createEmpty: false)\n |> yield(name: \"min\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"upperColumn":"min","width":5,"widthRatio":1,"xCol":"_time","xPos":5,"yCol":"_value","yPos":4},{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"2","label":"Percent Utilization","name":"y","scale":"linear","suffix":"%"}],"colorizeRows":true,"colors":[{"id":"d3804aa0-9930-45e5-879e-8a79b306d2bc","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"ff778217-93b4-41c1-baf9-5eac71c6969a","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"770d44dd-3a18-4132-af57-86f3a5fb4738","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"monotoneX","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"Utilization | Nodes","opacity":1,"orientationThreshold":100000000,"position":"overlaid","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Utilization\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","xPos":5,"yCol":"_value","yPos":8},{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"10","label":"bits per second","name":"y","scale":"linear","suffix":"bps"}],"colorizeRows":true,"colors":[{"id":"d3804aa0-9930-45e5-879e-8a79b306d2bc","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"ff778217-93b4-41c1-baf9-5eac71c6969a","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"770d44dd-3a18-4132-af57-86f3a5fb4738","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"monotoneX","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"Upload Bandwidth | Circuits","opacity":1,"orientationThreshold":100000000,"position":"overlaid","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Bandwidth\")\n |> filter(fn: (r) => r[\"Type\"] == \"Circuit\")\n |> filter(fn: (r) => r[\"_field\"] == \"Upload\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","xPos":5,"yCol":"_value","yPos":12},{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"2","label":"Percent Drop","name":"y","scale":"linear","suffix":"%"}],"colorizeRows":true,"colors":[{"id":"d3804aa0-9930-45e5-879e-8a79b306d2bc","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"ff778217-93b4-41c1-baf9-5eac71c6969a","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"770d44dd-3a18-4132-af57-86f3a5fb4738","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"monotoneX","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"Drops by Tin | Upload","opacity":1,"orientationThreshold":100000000,"position":"overlaid","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tin Drop Percentage\")\n |> filter(fn: (r) => r[\"_field\"] == \"Upload\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","xPos":5,"yCol":"_value","yPos":16},{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"2","label":"Percent","name":"y","scale":"linear","suffix":"%"}],"colorizeRows":true,"colors":[{"id":"d3804aa0-9930-45e5-879e-8a79b306d2bc","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"ff778217-93b4-41c1-baf9-5eac71c6969a","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"770d44dd-3a18-4132-af57-86f3a5fb4738","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"monotoneX","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"Upload by Tin","opacity":1,"orientationThreshold":100000000,"position":"overlaid","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tins Assigned\")\n |> filter(fn: (r) => r[\"_field\"] == \"Upload\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","xPos":5,"yCol":"_value","yPos":20},{"axes":[{"base":"10","name":"x","scale":"linear"},{"base":"2","label":"Percent Utilization","name":"y","scale":"linear","suffix":"%"}],"colorizeRows":true,"colors":[{"id":"d3804aa0-9930-45e5-879e-8a79b306d2bc","name":"Nineteen Eighty Four","type":"scale","hex":"#31C0F6"},{"id":"ff778217-93b4-41c1-baf9-5eac71c6969a","name":"Nineteen Eighty Four","type":"scale","hex":"#A500A5"},{"id":"770d44dd-3a18-4132-af57-86f3a5fb4738","name":"Nineteen Eighty Four","type":"scale","hex":"#FF7E27"}],"geom":"line","height":4,"hoverDimension":"auto","kind":"Xy","legendColorizeRows":true,"legendOpacity":1,"legendOrientationThreshold":100000000,"name":"CPU","opacity":1,"orientationThreshold":100000000,"position":"overlaid","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"CPU\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"}],"staticLegend":{"colorizeRows":true,"opacity":1,"orientationThreshold":100000000,"widthRatio":1},"width":5,"widthRatio":1,"xCol":"_time","xPos":5,"yCol":"_value","yPos":24},{"colors":[{"id":"base","name":"ocean","type":"text","hex":"#4591ED"},{"id":"ebf165e1-871a-4b10-b558-e039f376be40","name":"thunder","type":"text","hex":"#FFD255","value":25},{"id":"8b4b10e5-5b16-41b0-8f5b-97f22f8eace2","name":"curacao","type":"text","hex":"#F95F53","value":50},{"id":"a36e8317-8138-46a4-bec4-a7588d9f348c","name":"ruby","type":"text","hex":"#BF3D5E","value":75}],"fieldOptions":[{"displayName":"_start","fieldName":"_start"},{"displayName":"_stop","fieldName":"_stop"},{"displayName":"_time","fieldName":"_time"},{"displayName":"Device","fieldName":"Device","visible":true},{"displayName":"_value","fieldName":"_value","visible":true},{"displayName":"ParentNode","fieldName":"ParentNode"},{"displayName":"Type","fieldName":"Type"},{"displayName":"_field","fieldName":"_field"},{"displayName":"_measurement","fieldName":"_measurement"}],"height":4,"kind":"Table","name":"Utilization | Nodes","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Utilization\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> last()\n |> group(columns: [\"Type\", \"_time\"])\n\n |> sort(columns: [\"_value\", \"Device\"], desc: true)\n |> keep(columns: [\"_value\", \"Device\"])\n |> top(n:9, columns: [\"_value\"])"}],"staticLegend":{},"tableOptions":{"sortBy":"_value","verticalTimeAxis":true},"timeFormat":"YYYY-MM-DD HH:mm:ss","width":2,"xPos":10},{"colors":[{"id":"base","name":"viridian","type":"text","hex":"#32B08C"},{"id":"ebf165e1-871a-4b10-b558-e039f376be40","name":"thunder","type":"text","hex":"#FFD255","value":75},{"id":"a36e8317-8138-46a4-bec4-a7588d9f348c","name":"ruby","type":"text","hex":"#BF3D5E","value":125}],"fieldOptions":[{"displayName":"Device","fieldName":"Device","visible":true},{"displayName":"_value","fieldName":"_value","visible":true}],"height":4,"kind":"Table","name":"TCP Latency | Nodes | Standard View","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: median, createEmpty: false)\n |> last()\n |> group(columns: [\"Type\", \"_time\"])\n |> sort(columns: [\"_value\", \"Device\"], desc: true)\n |> keep(columns: [\"_value\", \"Device\"])\n |> top(n:9, columns: [\"_value\"])"}],"staticLegend":{},"tableOptions":{"sortBy":"_value","verticalTimeAxis":true},"timeFormat":"YYYY-MM-DD HH:mm:ss","width":2,"xPos":10,"yPos":4},{"colors":[{"id":"base","name":"ocean","type":"text","hex":"#4591ED"},{"id":"836815c4-8f0b-4296-9797-c4d2c66454da","name":"viridian","type":"text","hex":"#32B08C","value":9},{"id":"a36e8317-8138-46a4-bec4-a7588d9f348c","name":"pineapple","type":"text","hex":"#FFB94A","value":20},{"id":"dfec4920-0c00-4788-b3e2-d3cefcf9dbf6","name":"curacao","type":"text","hex":"#F95F53","value":50},{"id":"d322c223-c8d2-4ee2-9e26-fdd00b9911d9","name":"ruby","type":"text","hex":"#BF3D5E","value":70},{"id":"bb134440-7624-4055-884e-5712af40bf55","name":"fire","type":"text","hex":"#DC4E58","value":100}],"fieldOptions":[{"displayName":"Device","fieldName":"Device","visible":true},{"displayName":"_value","fieldName":"_value","visible":true}],"height":4,"kind":"Table","name":"TCP Latency | Nodes | Metaverse-Ready View","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"TCP Latency\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: median, createEmpty: false)\n |> last()\n |> group(columns: [\"Type\", \"_time\"])\n |> sort(columns: [\"_value\", \"Device\"], desc: true)\n |> keep(columns: [\"_value\", \"Device\"])\n |> top(n:9, columns: [\"_value\"])"}],"staticLegend":{},"tableOptions":{"sortBy":"_value","verticalTimeAxis":true},"timeFormat":"YYYY-MM-DD HH:mm:ss","width":2,"xPos":10,"yPos":8},{"colors":[{"id":"base","name":"ocean","type":"text","hex":"#4591ED"},{"id":"ebf165e1-871a-4b10-b558-e039f376be40","name":"thunder","type":"text","hex":"#FFD255","value":25},{"id":"8b4b10e5-5b16-41b0-8f5b-97f22f8eace2","name":"curacao","type":"text","hex":"#F95F53","value":50},{"id":"a36e8317-8138-46a4-bec4-a7588d9f348c","name":"ruby","type":"text","hex":"#BF3D5E","value":75}],"fieldOptions":[{"displayName":"_start","fieldName":"_start"},{"displayName":"_stop","fieldName":"_stop"},{"displayName":"Circuit","fieldName":"Circuit","visible":true},{"displayName":"_time","fieldName":"_time"},{"displayName":"_value","fieldName":"_value","visible":true},{"displayName":"Device","fieldName":"Device","visible":true},{"displayName":"ParentNode","fieldName":"ParentNode"},{"displayName":"Type","fieldName":"Type"},{"displayName":"_field","fieldName":"_field"},{"displayName":"_measurement","fieldName":"_measurement"}],"height":4,"kind":"Table","name":"Utilization | Circuit","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Utilization\")\n |> filter(fn: (r) => r[\"Type\"] == \"Circuit\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> last()\n |> group(columns: [\"Type\", \"_time\"])\n\n |> sort(columns: [\"_value\", \"Circuit\"], desc: true)\n |> keep(columns: [\"_value\", \"Circuit\"])\n |> top(n:9, columns: [\"_value\"])"}],"staticLegend":{},"tableOptions":{"sortBy":"_value","verticalTimeAxis":true},"timeFormat":"YYYY-MM-DD HH:mm:ss","width":2,"xPos":10,"yPos":12},{"colors":[{"id":"base","name":"ocean","type":"text","hex":"#4591ED"},{"id":"ebf165e1-871a-4b10-b558-e039f376be40","name":"thunder","type":"text","hex":"#FFD255","value":25},{"id":"8b4b10e5-5b16-41b0-8f5b-97f22f8eace2","name":"curacao","type":"text","hex":"#F95F53","value":50},{"id":"a36e8317-8138-46a4-bec4-a7588d9f348c","name":"ruby","type":"text","hex":"#BF3D5E","value":75}],"fieldOptions":[{"displayName":"Device","fieldName":"Device","visible":true},{"displayName":"_value","fieldName":"_value","visible":true}],"height":4,"kind":"Table","name":"Overload | Nodes","queries":[{"query":"from(bucket: \"libreqos\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"] == \"Overload\")\n |> filter(fn: (r) => r[\"Type\"] == \"Parent Node\")\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\n |> last()\n |> group(columns: [\"Type\", \"_time\"])\n |> map(fn: (r) => ({ r with _value: r._value}))\n \n |> sort(columns: [\"_value\", \"Device\"], desc: true)\n |> keep(columns: [\"_value\", \"Device\"])\n |> top(n:9, columns: [\"_value\"])"}],"staticLegend":{},"tableOptions":{"sortBy":"_value","verticalTimeAxis":true},"timeFormat":"YYYY-MM-DD HH:mm:ss","width":2,"xPos":10,"yPos":16}],"name":"LibreQoS"}}] diff --git a/old/v1.3/integrationCommon.py b/old/v1.3/integrationCommon.py new file mode 100644 index 00000000..710713ef --- /dev/null +++ b/old/v1.3/integrationCommon.py @@ -0,0 +1,421 @@ +# Provides common functionality shared between +# integrations. + +from typing import List, Any +from ispConfig import allowedSubnets, ignoreSubnets, generatedPNUploadMbps, generatedPNDownloadMbps +import ipaddress +import enum + + +def isInAllowedSubnets(inputIP): + # Check whether an IP address occurs inside the allowedSubnets list + isAllowed = False + if '/' in inputIP: + inputIP = inputIP.split('/')[0] + for subnet in allowedSubnets: + if (ipaddress.ip_address(inputIP) in ipaddress.ip_network(subnet)): + isAllowed = True + return isAllowed + + +def isInIgnoredSubnets(inputIP): + # Check whether an IP address occurs within the ignoreSubnets list + isIgnored = False + if '/' in inputIP: + inputIP = inputIP.split('/')[0] + for subnet in ignoreSubnets: + if (ipaddress.ip_address(inputIP) in ipaddress.ip_network(subnet)): + isIgnored = True + return isIgnored + + +def isIpv4Permitted(inputIP): + # Checks whether an IP address is in Allowed Subnets. + # If it is, check that it isn't in Ignored Subnets. + # If it is allowed and not ignored, returns true. + # Otherwise, returns false. + return isInIgnoredSubnets(inputIP) == False and isInAllowedSubnets(inputIP) + + +def fixSubnet(inputIP): + # If an IP address has a CIDR other than /32 (e.g. 192.168.1.1/24), + # but doesn't appear as a network address (e.g. 192.168.1.0/24) + # then it probably isn't actually serving that whole subnet. + # This allows you to specify e.g. 192.168.1.0/24 is "the client + # on port 3" in the device, without falling afoul of UISP's inclusion + # of subnet masks in device IPs. + [rawIp, cidr] = inputIP.split('/') + if cidr != "32": + try: + subnet = ipaddress.ip_network(inputIP) + except: + # Not a network address + return rawIp + "/32" + return inputIP + +class NodeType(enum.IntEnum): + # Enumeration to define what type of node + # a NetworkNode is. + root = 1 + site = 2 + ap = 3 + client = 4 + clientWithChildren = 5 + device = 6 + + +class NetworkNode: + # Defines a node on a LibreQoS network graph. + # Nodes default to being disconnected, and + # will be mapped to the root of the overall + # graph. + + id: str + displayName: str + parentIndex: int + parentId: str + type: NodeType + downloadMbps: int + uploadMbps: int + ipv4: List + ipv6: List + address: str + mac: str + + def __init__(self, id: str, displayName: str = "", parentId: str = "", type: NodeType = NodeType.site, download: int = generatedPNDownloadMbps, upload: int = generatedPNUploadMbps, ipv4: List = [], ipv6: List = [], address: str = "", mac: str = "") -> None: + self.id = id + self.parentIndex = 0 + self.type = type + self.parentId = parentId + if displayName == "": + self.displayName = id + else: + self.displayName = displayName + self.downloadMbps = download + self.uploadMbps = upload + self.ipv4 = ipv4 + self.ipv6 = ipv6 + self.address = address + self.mac = mac + + +class NetworkGraph: + # Defines a network as a graph topology + # allowing any integration to build the + # graph via a common API, emitting + # ShapedDevices and network.json files + # via a common interface. + + nodes: List + ipv4ToIPv6: Any + excludeSites: List # Copied to allow easy in-test patching + exceptionCPEs: Any + + def __init__(self) -> None: + from ispConfig import findIPv6usingMikrotik, excludeSites, exceptionCPEs + self.nodes = [ + NetworkNode("FakeRoot", type=NodeType.root, + parentId="", displayName="Shaper Root") + ] + self.excludeSites = excludeSites + self.exceptionCPEs = exceptionCPEs + if findIPv6usingMikrotik: + from mikrotikFindIPv6 import pullMikrotikIPv6 + self.ipv4ToIPv6 = pullMikrotikIPv6() + else: + self.ipv4ToIPv6 = {} + + def addRawNode(self, node: NetworkNode) -> None: + # Adds a NetworkNode to the graph, unchanged. + # If a site is excluded (via excludedSites in ispConfig) + # it won't be added + if not node.displayName in self.excludeSites: + if node.displayName in self.exceptionCPEs.keys(): + node.parentId = self.exceptionCPEs[node.displayName] + self.nodes.append(node) + + def replaceRootNote(self, node: NetworkNode) -> None: + # Replaces the automatically generated root node + # with a new node. Useful when you have a top-level + # node specified (e.g. "uispSite" in the UISP + # integration) + self.nodes[0] = node + + def addNodeAsChild(self, parent: str, node: NetworkNode) -> None: + # Searches the existing graph for a named parent, + # adjusts the new node's parentIndex to match the new + # node. The parented node is then inserted. + # + # Exceptions are NOT applied, since we're explicitly + # specifying the parent - we're assuming you really + # meant it. + if node.displayName in self.excludeSites: return + parentIdx = 0 + for (i, node) in enumerate(self.nodes): + if node.id == parent: + parentIdx = i + node.parentIndex = parentIdx + self.nodes.append(node) + + def __reparentById(self) -> None: + # Scans the entire node tree, searching for parents + # by name. Entries are re-mapped to match the named + # parents. You can use this to build a tree from a + # blob of raw data. + for child in self.nodes: + if child.parentId != "": + for (i, node) in enumerate(self.nodes): + if node.id == child.parentId: + child.parentIndex = i + + def findNodeIndexById(self, id: str) -> int: + # Finds a single node by identity(id) + # Return -1 if not found + for (i, node) in enumerate(self.nodes): + if node.id == id: + return i + return -1 + + def findNodeIndexByName(self, name: str) -> int: + # Finds a single node by identity(name) + # Return -1 if not found + for (i, node) in enumerate(self.nodes): + if node.displayName == name: + return i + return -1 + + def findChildIndices(self, parentIndex: int) -> List: + # Returns the indices of all nodes with a + # parentIndex equal to the specified parameter + result = [] + for (i, node) in enumerate(self.nodes): + if node.parentIndex == parentIndex: + result.append(i) + return result + + def __promoteClientsWithChildren(self) -> None: + # Searches for client sites that have children, + # and changes their node type to clientWithChildren + for (i, node) in enumerate(self.nodes): + if node.type == NodeType.client: + for child in self.findChildIndices(i): + if self.nodes[child].type != NodeType.device: + node.type = NodeType.clientWithChildren + + def __clientsWithChildrenToSites(self) -> None: + toAdd = [] + for (i, node) in enumerate(self.nodes): + if node.type == NodeType.clientWithChildren: + siteNode = NetworkNode( + id=node.id + "_gen", + displayName="(Generated Site) " + node.displayName, + type=NodeType.site + ) + siteNode.parentIndex = node.parentIndex + node.parentId = siteNode.id + if node.type == NodeType.clientWithChildren: + node.type = NodeType.client + for child in self.findChildIndices(i): + if self.nodes[child].type == NodeType.client or self.nodes[child].type == NodeType.clientWithChildren or self.nodes[child].type == NodeType.site: + self.nodes[child].parentId = siteNode.id + toAdd.append(siteNode) + + for n in toAdd: + self.addRawNode(n) + + self.__reparentById() + + def __findUnconnectedNodes(self) -> List: + # Performs a tree-traversal and finds any nodes that + # aren't connected to the root. This is a "sanity check", + # and also an easy way to handle "flat" topologies and + # ensure that the unconnected nodes are re-connected to + # the root. + visited = [] + next = [0] + + while len(next) > 0: + nextTraversal = next.pop() + visited.append(nextTraversal) + for idx in self.findChildIndices(nextTraversal): + if idx not in visited: + next.append(idx) + + result = [] + for i, n in enumerate(self.nodes): + if i not in visited: + result.append(i) + return result + + def __reconnectUnconnected(self): + # Finds any unconnected nodes and reconnects + # them to the root + for idx in self.__findUnconnectedNodes(): + if self.nodes[idx].type == NodeType.site: + self.nodes[idx].parentIndex = 0 + for idx in self.__findUnconnectedNodes(): + if self.nodes[idx].type == NodeType.clientWithChildren: + self.nodes[idx].parentIndex = 0 + for idx in self.__findUnconnectedNodes(): + if self.nodes[idx].type == NodeType.client: + self.nodes[idx].parentIndex = 0 + + def prepareTree(self) -> None: + # Helper function that calls all the cleanup and mapping + # functions in the right order. Unless you are doing + # something special, you can use this instead of + # calling the functions individually + self.__reparentById() + self.__promoteClientsWithChildren() + self.__clientsWithChildrenToSites() + self.__reconnectUnconnected() + + def doesNetworkJsonExist(self): + # Returns true if "network.json" exists, false otherwise + import os + return os.path.isfile("network.json") + + def __isSite(self, index) -> bool: + return self.nodes[index].type == NodeType.ap or self.nodes[index].type == NodeType.site or self.nodes[index].type == NodeType.clientWithChildren + + def createNetworkJson(self): + import json + topLevelNode = {} + self.__visited = [] # Protection against loops - never visit twice + + for child in self.findChildIndices(0): + if child > 0 and self.__isSite(child): + topLevelNode[self.nodes[child].displayName] = self.__buildNetworkObject( + child) + + del self.__visited + + with open('network.json', 'w') as f: + json.dump(topLevelNode, f, indent=4) + + def __buildNetworkObject(self, idx): + # Private: used to recurse down the network tree while building + # network.json + self.__visited.append(idx) + node = { + "downloadBandwidthMbps": self.nodes[idx].downloadMbps, + "uploadBandwidthMbps": self.nodes[idx].uploadMbps, + } + children = {} + hasChildren = False + for child in self.findChildIndices(idx): + if child > 0 and self.__isSite(child) and child not in self.__visited: + children[self.nodes[child].displayName] = self.__buildNetworkObject( + child) + hasChildren = True + if hasChildren: + node["children"] = children + return node + + def __addIpv6FromMap(self, ipv4, ipv6) -> None: + # Scans each address in ipv4. If its present in the + # IPv4 to Ipv6 map (currently pulled from Mikrotik devices + # if findIPv6usingMikrotik is enabled), then matching + # IPv6 networks are appended to the ipv6 list. + # This is explicitly non-destructive of the existing IPv6 + # list, in case you already have some. + for ipCidr in ipv4: + if '/' in ipCidr: ip = ipCidr.split('/')[0] + else: ip = ipCidr + if ip in self.ipv4ToIPv6.keys(): + ipv6.append(self.ipv4ToIPv6[ip]) + + def createShapedDevices(self): + import csv + from ispConfig import bandwidthOverheadFactor + # Builds ShapedDevices.csv from the network tree. + circuits = [] + for (i, node) in enumerate(self.nodes): + if node.type == NodeType.client: + parent = self.nodes[node.parentIndex].displayName + if parent == "Shaper Root": parent = "" + circuit = { + "id": node.id, + "name": node.address, + "parent": parent, + "download": node.downloadMbps, + "upload": node.uploadMbps, + "devices": [] + } + for child in self.findChildIndices(i): + if self.nodes[child].type == NodeType.device and (len(self.nodes[child].ipv4)+len(self.nodes[child].ipv6)>0): + ipv4 = self.nodes[child].ipv4 + ipv6 = self.nodes[child].ipv6 + self.__addIpv6FromMap(ipv4, ipv6) + device = { + "id": self.nodes[child].id, + "name": self.nodes[child].displayName, + "mac": self.nodes[child].mac, + "ipv4": ipv4, + "ipv6": ipv6, + } + circuit["devices"].append(device) + if len(circuit["devices"]) > 0: + circuits.append(circuit) + + with open('ShapedDevices.csv', 'w', newline='') as csvfile: + wr = csv.writer(csvfile, quoting=csv.QUOTE_ALL) + wr.writerow(['Circuit ID', 'Circuit Name', 'Device ID', 'Device Name', 'Parent Node', 'MAC', + 'IPv4', 'IPv6', 'Download Min', 'Upload Min', 'Download Max', 'Upload Max', 'Comment']) + for circuit in circuits: + for device in circuit["devices"]: + #Remove brackets and quotes of list so LibreQoS.py can parse it + device["ipv4"] = str(device["ipv4"]).replace('[','').replace(']','').replace("'",'') + device["ipv6"] = str(device["ipv6"]).replace('[','').replace(']','').replace("'",'') + row = [ + circuit["id"], + circuit["name"], + device["id"], + device["name"], + circuit["parent"], + device["mac"], + device["ipv4"], + device["ipv6"], + int(circuit["download"] * 0.98), + int(circuit["upload"] * 0.98), + int(circuit["download"] * bandwidthOverheadFactor), + int(circuit["upload"] * bandwidthOverheadFactor), + "" + ] + wr.writerow(row) + + def plotNetworkGraph(self, showClients=False): + # Requires `pip install graphviz` to function. + # You also need to install graphviz on your PC. + # In Ubuntu, apt install graphviz will do it. + # Plots the network graph to a PDF file, allowing + # visual verification that the graph makes sense. + # Could potentially be useful in a future + # web interface. + import importlib.util + if (spec := importlib.util.find_spec('graphviz')) is None: + return + + import graphviz + dot = graphviz.Digraph( + 'network', comment="Network Graph", engine="fdp") + + for (i, node) in enumerate(self.nodes): + if ((node.type != NodeType.client and node.type != NodeType.device) or showClients): + color = "white" + match node.type: + case NodeType.root: color = "green" + case NodeType.site: color = "red" + case NodeType.ap: color = "blue" + case NodeType.clientWithChildren: color = "magenta" + case NodeType.device: color = "white" + case default: color = "grey" + dot.node("N" + str(i), node.displayName, color=color) + children = self.findChildIndices(i) + for child in children: + if child != i: + if (self.nodes[child].type != NodeType.client and self.nodes[child].type != NodeType.device) or showClients: + dot.edge("N" + str(i), "N" + str(child)) + + dot.render("network.pdf") + diff --git a/old/v1.3/integrationSplynx.py b/old/v1.3/integrationSplynx.py new file mode 100644 index 00000000..0e56af8b --- /dev/null +++ b/old/v1.3/integrationSplynx.py @@ -0,0 +1,125 @@ +import requests +from ispConfig import excludeSites, findIPv6usingMikrotik, bandwidthOverheadFactor, exceptionCPEs, splynx_api_key, splynx_api_secret, splynx_api_url +from integrationCommon import isIpv4Permitted +import base64 +from requests.auth import HTTPBasicAuth +if findIPv6usingMikrotik == True: + from mikrotikFindIPv6 import pullMikrotikIPv6 +from integrationCommon import NetworkGraph, NetworkNode, NodeType + +def buildHeaders(): + credentials = splynx_api_key + ':' + splynx_api_secret + credentials = base64.b64encode(credentials.encode()).decode() + return {'Authorization' : "Basic %s" % credentials} + +def spylnxRequest(target, headers): + # Sends a REST GET request to Spylnx and returns the + # result in JSON + url = splynx_api_url + "/api/2.0/" + target + r = requests.get(url, headers=headers) + return r.json() + +def getTariffs(headers): + data = spylnxRequest("admin/tariffs/internet", headers) + tariff = [] + downloadForTariffID = {} + uploadForTariffID = {} + for tariff in data: + tariffID = tariff['id'] + speed_download = round((int(tariff['speed_download']) / 1000)) + speed_upload = round((int(tariff['speed_upload']) / 1000)) + downloadForTariffID[tariffID] = speed_download + uploadForTariffID[tariffID] = speed_upload + return (tariff, downloadForTariffID, uploadForTariffID) + +def getCustomers(headers): + data = spylnxRequest("admin/customers/customer", headers) + #addressForCustomerID = {} + #customerIDs = [] + #for customer in data: + # customerIDs.append(customer['id']) + # addressForCustomerID[customer['id']] = customer['street_1'] + return data + +def getRouters(headers): + data = spylnxRequest("admin/networking/routers", headers) + ipForRouter = {} + for router in data: + routerID = router['id'] + ipForRouter[routerID] = router['ip'] + return ipForRouter + +def combineAddress(json): + # Combines address fields into a single string + # The API docs seem to indicate that there isn't a "state" field? + if json["street_1"]=="" and json["city"]=="" and json["zip_code"]=="": + return json["id"] + "/" + json["name"] + else: + return json["street_1"] + " " + json["city"] + " " + json["zip_code"] + +def createShaper(): + net = NetworkGraph() + + print("Fetching data from Spylnx") + headers = buildHeaders() + tariff, downloadForTariffID, uploadForTariffID = getTariffs(headers) + customers = getCustomers(headers) + ipForRouter = getRouters(headers) + + # It's not very clear how a service is meant to handle multiple + # devices on a shared tariff. Creating each service as a combined + # entity including the customer, to be on the safe side. + for customerJson in customers: + services = spylnxRequest("admin/customers/customer/" + customerJson["id"] + "/internet-services", headers) + for serviceJson in services: + combinedId = "c_" + str(customerJson["id"]) + "_s_" + str(serviceJson["id"]) + tariff_id = serviceJson['tariff_id'] + customer = NetworkNode( + type=NodeType.client, + id=combinedId, + displayName=customerJson["name"], + address=combineAddress(customerJson), + download=downloadForTariffID[tariff_id], + upload=uploadForTariffID[tariff_id], + ) + net.addRawNode(customer) + + ipv4 = '' + ipv6 = '' + routerID = serviceJson['router_id'] + # If not "Taking IPv4" (Router will assign IP), then use router's set IP + if serviceJson['taking_ipv4'] == 0: + ipv4 = ipForRouter[routerID] + elif serviceJson['taking_ipv4'] == 1: + ipv4 = serviceJson['ipv4'] + # If not "Taking IPv6" (Router will assign IP), then use router's set IP + if serviceJson['taking_ipv6'] == 0: + ipv6 = '' + elif serviceJson['taking_ipv6'] == 1: + ipv6 = serviceJson['ipv6'] + + device = NetworkNode( + id=combinedId+"_d" + str(serviceJson["id"]), + displayName=serviceJson["description"], + type=NodeType.device, + parentId=combinedId, + mac=serviceJson["mac"], + ipv4=[ipv4], + ipv6=[ipv6] + ) + net.addRawNode(device) + + net.prepareTree() + net.plotNetworkGraph(False) + if net.doesNetworkJsonExist(): + print("network.json already exists. Leaving in-place.") + else: + net.createNetworkJson() + net.createShapedDevices() + +def importFromSplynx(): + #createNetworkJSON() + createShaper() + +if __name__ == '__main__': + importFromSplynx() diff --git a/old/v1.3/integrationUISP.py b/old/v1.3/integrationUISP.py new file mode 100644 index 00000000..32cdeced --- /dev/null +++ b/old/v1.3/integrationUISP.py @@ -0,0 +1,220 @@ +import requests +import os +import csv +from ispConfig import uispSite, uispStrategy +from integrationCommon import isIpv4Permitted, fixSubnet + +def uispRequest(target): + # Sends an HTTP request to UISP and returns the + # result in JSON. You only need to specify the + # tail end of the URL, e.g. "sites" + from ispConfig import UISPbaseURL, uispAuthToken + url = UISPbaseURL + "/nms/api/v2.1/" + target + headers = {'accept': 'application/json', 'x-auth-token': uispAuthToken} + r = requests.get(url, headers=headers) + return r.json() + +def buildFlatGraph(): + # Builds a high-performance (but lacking in site or AP bandwidth control) + # network. + from integrationCommon import NetworkGraph, NetworkNode, NodeType + from ispConfig import generatedPNUploadMbps, generatedPNDownloadMbps + + # Load network sites + print("Loading Data from UISP") + sites = uispRequest("sites") + devices = uispRequest("devices?withInterfaces=true&authorized=true") + + # Build a basic network adding every client to the tree + print("Building Flat Topology") + net = NetworkGraph() + + for site in sites: + type = site['identification']['type'] + if type == "endpoint": + id = site['identification']['id'] + address = site['description']['address'] + name = site['identification']['name'] + type = site['identification']['type'] + download = generatedPNDownloadMbps + upload = generatedPNUploadMbps + if (site['qos']['downloadSpeed']) and (site['qos']['uploadSpeed']): + download = int(round(site['qos']['downloadSpeed']/1000000)) + upload = int(round(site['qos']['uploadSpeed']/1000000)) + + node = NetworkNode(id=id, displayName=name, type=NodeType.client, download=download, upload=upload, address=address) + net.addRawNode(node) + for device in devices: + if device['identification']['site'] is not None and device['identification']['site']['id'] == id: + # The device is at this site, so add it + ipv4 = [] + ipv6 = [] + + for interface in device["interfaces"]: + for ip in interface["addresses"]: + ip = ip["cidr"] + if isIpv4Permitted(ip): + ip = fixSubnet(ip) + if ip not in ipv4: + ipv4.append(ip) + + # TODO: Figure out Mikrotik IPv6? + mac = device['identification']['mac'] + + net.addRawNode(NetworkNode(id=device['identification']['id'], displayName=device['identification'] + ['name'], parentId=id, type=NodeType.device, ipv4=ipv4, ipv6=ipv6, mac=mac)) + + # Finish up + net.prepareTree() + net.plotNetworkGraph(False) + if net.doesNetworkJsonExist(): + print("network.json already exists. Leaving in-place.") + else: + net.createNetworkJson() + net.createShapedDevices() + +def buildFullGraph(): + # Attempts to build a full network graph, incorporating as much of the UISP + # hierarchy as possible. + from integrationCommon import NetworkGraph, NetworkNode, NodeType + from ispConfig import generatedPNUploadMbps, generatedPNDownloadMbps + + # Load network sites + print("Loading Data from UISP") + sites = uispRequest("sites") + devices = uispRequest("devices?withInterfaces=true&authorized=true") + dataLinks = uispRequest("data-links?siteLinksOnly=true") + + # Do we already have a integrationUISPbandwidths.csv file? + siteBandwidth = {} + if os.path.isfile("integrationUISPbandwidths.csv"): + with open('integrationUISPbandwidths.csv') as csv_file: + csv_reader = csv.reader(csv_file, delimiter=',') + next(csv_reader) + for row in csv_reader: + name, download, upload = row + download = int(download) + upload = int(upload) + siteBandwidth[name] = {"download": download, "upload": upload} + + # Find AP capacities from UISP + for device in devices: + if device['identification']['role'] == "ap": + name = device['identification']['name'] + if not name in siteBandwidth and device['overview']['downlinkCapacity'] and device['overview']['uplinkCapacity']: + download = int(device['overview'] + ['downlinkCapacity'] / 1000000) + upload = int(device['overview']['uplinkCapacity'] / 1000000) + siteBandwidth[device['identification']['name']] = { + "download": download, "upload": upload} + + print("Building Topology") + net = NetworkGraph() + # Add all sites and client sites + for site in sites: + id = site['identification']['id'] + name = site['identification']['name'] + type = site['identification']['type'] + download = generatedPNDownloadMbps + upload = generatedPNUploadMbps + address = "" + if site['identification']['parent'] is None: + parent = "" + else: + parent = site['identification']['parent']['id'] + match type: + case "site": + nodeType = NodeType.site + if name in siteBandwidth: + # Use the CSV bandwidth values + download = siteBandwidth[name]["download"] + upload = siteBandwidth[name]["upload"] + else: + # Add them just in case + siteBandwidth[name] = { + "download": download, "upload": upload} + case default: + nodeType = NodeType.client + address = site['description']['address'] + if (site['qos']['downloadSpeed']) and (site['qos']['uploadSpeed']): + download = int(round(site['qos']['downloadSpeed']/1000000)) + upload = int(round(site['qos']['uploadSpeed']/1000000)) + + node = NetworkNode(id=id, displayName=name, type=nodeType, + parentId=parent, download=download, upload=upload, address=address) + # If this is the uispSite node, it becomes the root. Otherwise, add it to the + # node soup. + if name == uispSite: + net.replaceRootNote(node) + else: + net.addRawNode(node) + + for device in devices: + if device['identification']['site'] is not None and device['identification']['site']['id'] == id: + # The device is at this site, so add it + ipv4 = [] + ipv6 = [] + + for interface in device["interfaces"]: + for ip in interface["addresses"]: + ip = ip["cidr"] + if isIpv4Permitted(ip): + ip = fixSubnet(ip) + if ip not in ipv4: + ipv4.append(ip) + + # TODO: Figure out Mikrotik IPv6? + mac = device['identification']['mac'] + + net.addRawNode(NetworkNode(id=device['identification']['id'], displayName=device['identification'] + ['name'], parentId=id, type=NodeType.device, ipv4=ipv4, ipv6=ipv6, mac=mac)) + + # Now iterate access points, and look for connections to sites + for node in net.nodes: + if node.type == NodeType.device: + for dl in dataLinks: + if dl['from']['device'] is not None and dl['from']['device']['identification']['id'] == node.id: + if dl['to']['site'] is not None and dl['from']['site']['identification']['id'] != dl['to']['site']['identification']['id']: + target = net.findNodeIndexById( + dl['to']['site']['identification']['id']) + if target > -1: + # We found the site + if net.nodes[target].type == NodeType.client or net.nodes[target].type == NodeType.clientWithChildren: + net.nodes[target].parentId = node.id + node.type = NodeType.ap + if node.displayName in siteBandwidth: + # Use the bandwidth numbers from the CSV file + node.uploadMbps = siteBandwidth[node.displayName]["upload"] + node.downloadMbps = siteBandwidth[node.displayName]["download"] + else: + # Add some defaults in case they want to change them + siteBandwidth[node.displayName] = { + "download": generatedPNDownloadMbps, "upload": generatedPNUploadMbps} + + net.prepareTree() + net.plotNetworkGraph(False) + if net.doesNetworkJsonExist(): + print("network.json already exists. Leaving in-place.") + else: + net.createNetworkJson() + net.createShapedDevices() + + # Save integrationUISPbandwidths.csv + # (the newLine fixes generating extra blank lines) + with open('integrationUISPbandwidths.csv', 'w', newline='') as csvfile: + wr = csv.writer(csvfile, quoting=csv.QUOTE_ALL) + wr.writerow(['ParentNode', 'Download Mbps', 'Upload Mbps']) + for device in siteBandwidth: + entry = ( + device, siteBandwidth[device]["download"], siteBandwidth[device]["upload"]) + wr.writerow(entry) + + +def importFromUISP(): + match uispStrategy: + case "full": buildFullGraph() + case default: buildFlatGraph() + + +if __name__ == '__main__': + importFromUISP() diff --git a/old/v1.3/ispConfig.example.py b/old/v1.3/ispConfig.example.py new file mode 100644 index 00000000..618fde61 --- /dev/null +++ b/old/v1.3/ispConfig.example.py @@ -0,0 +1,101 @@ +# 'fq_codel' or 'cake diffserv4' +# 'cake diffserv4' is recommended +# sqm = 'fq_codel' +sqm = 'cake diffserv4' + +# Used to passively monitor the network for before / after comparisons. Leave as False to +# ensure actual shaping. After changing this value, run "sudo systemctl restart LibreQoS.service" +monitorOnlyMode = False + +# How many Mbps are available to the edge of this network +upstreamBandwidthCapacityDownloadMbps = 1000 +upstreamBandwidthCapacityUploadMbps = 1000 + +# Devices in ShapedDevices.csv without a defined ParentNode will be placed under a generated +# parent node, evenly spread out across CPU cores. Here, define the bandwidth limit for each +# of those generated parent nodes. +generatedPNDownloadMbps = 1000 +generatedPNUploadMbps = 1000 + +# Interface connected to core router +interfaceA = 'eth1' + +# Interface connected to edge router +interfaceB = 'eth2' + +## WORK IN PROGRESS. Note that interfaceA determines the "stick" interface +## I could only get scanning to work if I issued ethtool -K enp1s0f1 rxvlan off +OnAStick = False +# VLAN facing the core router +StickVlanA = 0 +# VLAN facing the edge router +StickVlanB = 0 + +# Allow shell commands. False causes commands print to console only without being executed. +# MUST BE ENABLED FOR PROGRAM TO FUNCTION +enableActualShellCommands = True + +# Add 'sudo' before execution of any shell commands. May be required depending on distribution and environment. +runShellCommandsAsSudo = False + +# Allows overriding queues / CPU cores used. When set to 0, the max possible queues / CPU cores are utilized. Please leave as 0. +queuesAvailableOverride = 0 + +# Some networks are flat - where there are no Parent Nodes defined in ShapedDevices.csv +# For such flat networks, just define network.json as {} and enable this setting +# By default, it balances the subscribers across CPU cores, factoring in their max bandwidth rates +# Past 25,000 subsribers this algorithm becomes inefficient and is not advised +useBinPackingToBalanceCPU = True + +# Bandwidth & Latency Graphing +influxDBEnabled = True +influxDBurl = "http://localhost:8086" +influxDBBucket = "libreqos" +influxDBOrg = "Your ISP Name Here" +influxDBtoken = "" + +# NMS/CRM Integration + +# If a device shows a WAN IP within these subnets, assume they are behind NAT / un-shapable, and ignore them +ignoreSubnets = ['192.168.0.0/16'] +allowedSubnets = ['100.64.0.0/10'] + +# Splynx Integration +automaticImportSplynx = False +splynx_api_key = '' +splynx_api_secret = '' +# Everything before /api/2.0/ on your Splynx instance +splynx_api_url = 'https://YOUR_URL.splynx.app' + +# UISP integration +automaticImportUISP = False +uispAuthToken = '' +# Everything before /nms/ on your UISP instance +UISPbaseURL = 'https://examplesite.com' +# UISP Site - enter the name of the root site in your network tree +# to act as the starting point for the tree mapping +uispSite = '' +# Strategy: +# * "flat" - create all client sites directly off the top of the tree, +# provides maximum performance - at the expense of not offering AP, +# or site options. +# * "full" - build a complete network map +uispStrategy = "full" +# List any sites that should not be included, with each site name surrounded by '' and seperated by commas +excludeSites = [] +# If you use IPv6, this can be used to find associated IPv6 prefixes for your clients' IPv4 addresses, and match them to those devices +findIPv6usingMikrotik = False +# If you want to provide a safe cushion for speed test results to prevent customer complains, you can set this to 1.15 (15% above plan rate). +# If not, you can leave as 1.0 +bandwidthOverheadFactor = 1.0 +# For edge cases, set the respective ParentNode for these CPEs +exceptionCPEs = {} + # 'CPE-SomeLocation1': 'AP-SomeLocation1', + # 'CPE-SomeLocation2': 'AP-SomeLocation2', + #} + +# API Auth +apiUsername = "testUser" +apiPassword = "changeme8343486806" +apiHostIP = "127.0.0.1" +apiHostPost = 5000 diff --git a/old/v1.3/mikrotikDHCPRouterList.csv b/old/v1.3/mikrotikDHCPRouterList.csv new file mode 100644 index 00000000..1d7374b7 --- /dev/null +++ b/old/v1.3/mikrotikDHCPRouterList.csv @@ -0,0 +1,2 @@ +Router Name / ID,IP,API Username,API Password, API Port +main,100.64.0.1,admin,password,8728 diff --git a/old/v1.3/mikrotikFindIPv6.py b/old/v1.3/mikrotikFindIPv6.py new file mode 100644 index 00000000..7343082b --- /dev/null +++ b/old/v1.3/mikrotikFindIPv6.py @@ -0,0 +1,52 @@ +#!/usr/bin/python3 +import routeros_api +import csv + +def pullMikrotikIPv6(): + ipv4ToIPv6 = {} + routerList = [] + with open('mikrotikDHCPRouterList.csv') as csv_file: + csv_reader = csv.reader(csv_file, delimiter=',') + next(csv_reader) + for row in csv_reader: + RouterName, IP, Username, Password, apiPort = row + routerList.append((RouterName, IP, Username, Password, apiPort)) + for router in routerList: + RouterName, IP, inputUsername, inputPassword = router + connection = routeros_api.RouterOsApiPool(IP, username=inputUsername, password=inputPassword, port=apiPort, use_ssl=False, ssl_verify=False, ssl_verify_hostname=False, plaintext_login=True) + api = connection.get_api() + macToIPv4 = {} + macToIPv6 = {} + clientAddressToIPv6 = {} + list_dhcp = api.get_resource('/ip/dhcp-server/lease') + entries = list_dhcp.get() + for entry in entries: + try: + macToIPv4[entry['mac-address']] = entry['address'] + except: + pass + list_dhcp = api.get_resource('/ipv6/dhcp-server/binding') + entries = list_dhcp.get() + for entry in entries: + try: + clientAddressToIPv6[entry['client-address']] = entry['address'] + except: + pass + list_dhcp = api.get_resource('/ipv6/neighbor') + entries = list_dhcp.get() + for entry in entries: + try: + realIPv6 = clientAddressToIPv6[entry['address']] + macToIPv6[entry['mac-address']] = realIPv6 + except: + pass + for mac, ipv6 in macToIPv6.items(): + try: + ipv4 = macToIPv4[mac] + ipv4ToIPv6[ipv4] = ipv6 + except: + print('Failed to find associated IPv4 for ' + ipv6) + return ipv4ToIPv6 + +if __name__ == '__main__': + print(pullMikrotikIPv6()) diff --git a/old/v1.3/network.example.json b/old/v1.3/network.example.json new file mode 100644 index 00000000..75c1f231 --- /dev/null +++ b/old/v1.3/network.example.json @@ -0,0 +1,75 @@ +{ + "Site_1": + { + "downloadBandwidthMbps":1000, + "uploadBandwidthMbps":1000, + "children": + { + "AP_A": + { + "downloadBandwidthMbps":500, + "uploadBandwidthMbps":500 + }, + "Site_3": + { + "downloadBandwidthMbps":500, + "uploadBandwidthMbps":500, + "children": + { + "PoP_5": + { + "downloadBandwidthMbps":200, + "uploadBandwidthMbps":200, + "children": + { + "AP_9": + { + "downloadBandwidthMbps":120, + "uploadBandwidthMbps":120 + }, + "PoP_6": + { + "downloadBandwidthMbps":60, + "uploadBandwidthMbps":60, + "children": + { + "AP_11": + { + "downloadBandwidthMbps":30, + "uploadBandwidthMbps":30 + } + } + } + } + } + } + } + } + }, + "Site_2": + { + "downloadBandwidthMbps":500, + "uploadBandwidthMbps":500, + "children": + { + "PoP_1": + { + "downloadBandwidthMbps":200, + "uploadBandwidthMbps":200, + "children": + { + "AP_7": + { + "downloadBandwidthMbps":100, + "uploadBandwidthMbps":100 + } + } + }, + "AP_1": + { + "downloadBandwidthMbps":150, + "uploadBandwidthMbps":150 + } + } + } +} diff --git a/old/v1.3/scheduler.py b/old/v1.3/scheduler.py new file mode 100644 index 00000000..f9b74df2 --- /dev/null +++ b/old/v1.3/scheduler.py @@ -0,0 +1,62 @@ +import time +import datetime +from LibreQoS import refreshShapers, refreshShapersUpdateOnly +from graphInfluxDB import refreshBandwidthGraphs, refreshLatencyGraphs +from ispConfig import influxDBEnabled, automaticImportUISP, automaticImportSplynx +if automaticImportUISP: + from integrationUISP import importFromUISP +if automaticImportSplynx: + from integrationSplynx import importFromSplynx + +def importFromCRM(): + if automaticImportUISP: + try: + importFromUISP() + except: + print("Failed to import from UISP") + elif automaticImportSplynx: + try: + importFromSplynx() + except: + print("Failed to import from Splynx") + +def importAndShapeFullReload(): + importFromCRM() + refreshShapers() + +def importAndShapePartialReload(): + importFromCRM() + refreshShapersUpdateOnly() + +def graph(): + time.sleep(10) + try: + refreshBandwidthGraphs() + except: + print("Failed to run refreshBandwidthGraphs()") + time.sleep(10) + try: + refreshBandwidthGraphs() + except: + print("Failed to run refreshBandwidthGraphs()") + time.sleep(10) + try: + refreshBandwidthGraphs() + except: + print("Failed to run refreshBandwidthGraphs()") + time.sleep(1) + try: + refreshLatencyGraphs() + except: + print("Failed to run refreshLatencyGraphs()") + +if __name__ == '__main__': + importAndShapeFullReload() + while True: + finish_time = datetime.datetime.now() + datetime.timedelta(minutes=30) + while datetime.datetime.now() < finish_time: + if influxDBEnabled: + graph() + else: + time.sleep(1) + importAndShapePartialReload() diff --git a/old/v1.3/testGraph.py b/old/v1.3/testGraph.py new file mode 100644 index 00000000..e127ac37 --- /dev/null +++ b/old/v1.3/testGraph.py @@ -0,0 +1,333 @@ +import unittest + +class TestGraph(unittest.TestCase): + def test_empty_graph(self): + """ + Test instantiation of the graph type + """ + from integrationCommon import NetworkGraph + graph = NetworkGraph() + self.assertEqual(len(graph.nodes), 1) # There is an automatic root entry + self.assertEqual(graph.nodes[0].id, "FakeRoot") + + def test_empty_node(self): + """ + Test instantiation of the GraphNode type + """ + from integrationCommon import NetworkNode, NodeType + node = NetworkNode("test") + self.assertEqual(node.type.value, NodeType.site.value) + self.assertEqual(node.id, "test") + self.assertEqual(node.parentIndex, 0) + + def test_node_types(self): + """ + Test that the NodeType enum is working + """ + from integrationCommon import NetworkNode, NodeType + node = NetworkNode("Test", type = NodeType.root) + self.assertEqual(node.type.value, NodeType.root.value) + node = NetworkNode("Test", type = NodeType.site) + self.assertEqual(node.type.value, NodeType.site.value) + node = NetworkNode("Test", type = NodeType.ap) + self.assertEqual(node.type.value, NodeType.ap.value) + node = NetworkNode("Test", type = NodeType.client) + self.assertEqual(node.type.value, NodeType.client.value) + + def test_add_raw_node(self): + """ + Adds a single node to a graph to ensure add works + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + graph = NetworkGraph() + graph.addRawNode(NetworkNode("Site")) + self.assertEqual(len(graph.nodes), 2) + self.assertEqual(graph.nodes[1].type.value, NodeType.site.value) + self.assertEqual(graph.nodes[1].parentIndex, 0) + self.assertEqual(graph.nodes[1].id, "Site") + + def test_replace_root(self): + """ + Test replacing the default root node with a specified node + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + graph = NetworkGraph() + node = NetworkNode("Test", type = NodeType.site) + graph.replaceRootNote(node) + self.assertEqual(graph.nodes[0].id, "Test") + + def add_child_by_named_parent(self): + """ + Tests inserting a node with a named parent + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + graph = NetworkGraph() + graph.addRawNode(NetworkNode("Site")) + graph.addNodeAsChild("site", NetworkNode("Client", type = NodeType.client)) + self.assertEqual(len(graph.nodes), 3) + self.assertEqual(graph.nodes[2].parentIndex, 1) + self.assertEqual(graph.nodes[0].parentIndex, 0) + + def test_reparent_by_name(self): + """ + Tests that re-parenting a tree by name is functional + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + graph = NetworkGraph() + graph.addRawNode(NetworkNode("Site 1")) + graph.addRawNode(NetworkNode("Site 2")) + graph.addRawNode(NetworkNode("Client 1", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 2", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 3", parentId="Site 2", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 4", parentId="Missing Site", type=NodeType.client)) + graph._NetworkGraph__reparentById() + self.assertEqual(len(graph.nodes), 7) # Includes 1 for the fake root + self.assertEqual(graph.nodes[1].parentIndex, 0) # Site 1 is off root + self.assertEqual(graph.nodes[2].parentIndex, 0) # Site 2 is off root + self.assertEqual(graph.nodes[3].parentIndex, 1) # Client 1 found Site 1 + self.assertEqual(graph.nodes[4].parentIndex, 1) # Client 2 found Site 1 + self.assertEqual(graph.nodes[5].parentIndex, 2) # Client 3 found Site 2 + self.assertEqual(graph.nodes[6].parentIndex, 0) # Client 4 didn't find "Missing Site" and goes to root + + def test_find_by_id(self): + """ + Tests that finding a node by name succeeds or fails + as expected. + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + graph = NetworkGraph() + self.assertEqual(graph.findNodeIndexById("Site 1"), -1) # Test failure + graph.addRawNode(NetworkNode("Site 1")) + self.assertEqual(graph.findNodeIndexById("Site 1"), 1) # Test success + + def test_find_by_name(self): + """ + Tests that finding a node by name succeeds or fails + as expected. + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + graph = NetworkGraph() + self.assertEqual(graph.findNodeIndexByName("Site 1"), -1) # Test failure + graph.addRawNode(NetworkNode("Site 1", "Site X")) + self.assertEqual(graph.findNodeIndexByName("Site X"), 1) # Test success + + def test_find_children(self): + """ + Tests that finding children in the tree works, + both for full and empty cases. + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + graph = NetworkGraph() + graph.addRawNode(NetworkNode("Site 1")) + graph.addRawNode(NetworkNode("Site 2")) + graph.addRawNode(NetworkNode("Client 1", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 2", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 3", parentId="Site 2", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 4", parentId="Missing Site", type=NodeType.client)) + graph._NetworkGraph__reparentById() + self.assertEqual(graph.findChildIndices(1), [3, 4]) + self.assertEqual(graph.findChildIndices(2), [5]) + self.assertEqual(graph.findChildIndices(3), []) + + def test_clients_with_children(self): + """ + Tests handling cases where a client site + itself has children. This is only useful for + relays where a site hasn't been created in the + middle - but it allows us to graph the more + pathological designs people come up with. + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + graph = NetworkGraph() + graph.addRawNode(NetworkNode("Site 1")) + graph.addRawNode(NetworkNode("Site 2")) + graph.addRawNode(NetworkNode("Client 1", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 2", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 3", parentId="Site 2", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 4", parentId="Client 3", type=NodeType.client)) + graph._NetworkGraph__reparentById() + graph._NetworkGraph__promoteClientsWithChildren() + self.assertEqual(graph.nodes[5].type, NodeType.clientWithChildren) + self.assertEqual(graph.nodes[6].type, NodeType.client) # Test that a client is still a client + + def test_client_with_children_promotion(self): + """ + Test locating a client site with children, and then promoting it to + create a generated site + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + graph = NetworkGraph() + graph.addRawNode(NetworkNode("Site 1")) + graph.addRawNode(NetworkNode("Site 2")) + graph.addRawNode(NetworkNode("Client 1", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 2", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 3", parentId="Site 2", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 4", parentId="Client 3", type=NodeType.client)) + graph._NetworkGraph__reparentById() + graph._NetworkGraph__promoteClientsWithChildren() + graph._NetworkGraph__clientsWithChildrenToSites() + self.assertEqual(graph.nodes[5].type, NodeType.client) + self.assertEqual(graph.nodes[6].type, NodeType.client) # Test that a client is still a client + self.assertEqual(graph.nodes[7].type, NodeType.site) + self.assertEqual(graph.nodes[7].id, "Client 3_gen") + + def test_find_unconnected(self): + """ + Tests traversing a tree and finding nodes that + have no connection to the rest of the tree. + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + graph = NetworkGraph() + graph.addRawNode(NetworkNode("Site 1")) + graph.addRawNode(NetworkNode("Site 2")) + graph.addRawNode(NetworkNode("Client 1", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 2", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 3", parentId="Site 2", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 4", parentId="Client 3", type=NodeType.client)) + graph._NetworkGraph__reparentById() + graph._NetworkGraph__promoteClientsWithChildren() + graph.nodes[6].parentIndex = 6 # Create a circle + unconnected = graph._NetworkGraph__findUnconnectedNodes() + self.assertEqual(len(unconnected), 1) + self.assertEqual(unconnected[0], 6) + self.assertEqual(graph.nodes[unconnected[0]].id, "Client 4") + + def test_reconnect_unconnected(self): + """ + Tests traversing a tree and finding nodes that + have no connection to the rest of the tree. + Reconnects them and ensures that the orphan is now + parented. + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + graph = NetworkGraph() + graph.addRawNode(NetworkNode("Site 1")) + graph.addRawNode(NetworkNode("Site 2")) + graph.addRawNode(NetworkNode("Client 1", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 2", parentId="Site 1", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 3", parentId="Site 2", type=NodeType.client)) + graph.addRawNode(NetworkNode("Client 4", parentId="Client 3", type=NodeType.client)) + graph._NetworkGraph__reparentById() + graph._NetworkGraph__promoteClientsWithChildren() + graph.nodes[6].parentIndex = 6 # Create a circle + graph._NetworkGraph__reconnectUnconnected() + unconnected = graph._NetworkGraph__findUnconnectedNodes() + self.assertEqual(len(unconnected), 0) + self.assertEqual(graph.nodes[6].parentIndex, 0) + + def test_network_json_exists(self): + from integrationCommon import NetworkGraph + import os + if os.path.exists("network.json"): + os.remove("network.json") + graph = NetworkGraph() + self.assertEqual(graph.doesNetworkJsonExist(), False) + with open('network.json', 'w') as f: + f.write('Dummy') + self.assertEqual(graph.doesNetworkJsonExist(), True) + os.remove("network.json") + + def test_network_json_example(self): + """ + Rebuilds the network in network.example.json + and makes sure that it matches. + Should serve as an example for how an integration + can build a functional tree. + """ + from integrationCommon import NetworkGraph, NetworkNode, NodeType + import json + net = NetworkGraph() + net.addRawNode(NetworkNode("Site_1", "Site_1", "", NodeType.site, 1000, 1000)) + net.addRawNode(NetworkNode("Site_2", "Site_2", "", NodeType.site, 500, 500)) + net.addRawNode(NetworkNode("AP_A", "AP_A", "Site_1", NodeType.ap, 500, 500)) + net.addRawNode(NetworkNode("Site_3", "Site_3", "Site_1", NodeType.site, 500, 500)) + net.addRawNode(NetworkNode("PoP_5", "PoP_5", "Site_3", NodeType.site, 200, 200)) + net.addRawNode(NetworkNode("AP_9", "AP_9", "PoP_5", NodeType.ap, 120, 120)) + net.addRawNode(NetworkNode("PoP_6", "PoP_6", "PoP_5", NodeType.site, 60, 60)) + net.addRawNode(NetworkNode("AP_11", "AP_11", "PoP_6", NodeType.ap, 30, 30)) + net.addRawNode(NetworkNode("PoP_1", "PoP_1", "Site_2", NodeType.site, 200, 200)) + net.addRawNode(NetworkNode("AP_7", "AP_7", "PoP_1", NodeType.ap, 100, 100)) + net.addRawNode(NetworkNode("AP_1", "AP_1", "Site_2", NodeType.ap, 150, 150)) + net.prepareTree() + net.createNetworkJson() + with open('network.json') as file: + newFile = json.load(file) + with open('src/network.example.json') as file: + exampleFile = json.load(file) + self.assertEqual(newFile, exampleFile) + + def test_ipv4_to_ipv6_map(self): + """ + Tests the underlying functionality of finding an IPv6 address from an IPv4 mapping + """ + from integrationCommon import NetworkGraph + net = NetworkGraph() + ipv4 = [ "100.64.1.1" ] + ipv6 = [] + # Test that it doesn't cause issues without any mappings + net._NetworkGraph__addIpv6FromMap(ipv4, ipv6) + self.assertEqual(len(ipv4), 1) + self.assertEqual(len(ipv6), 0) + + # Test a mapping + net.ipv4ToIPv6 = { + "100.64.1.1":"dead::beef/64" + } + net._NetworkGraph__addIpv6FromMap(ipv4, ipv6) + self.assertEqual(len(ipv4), 1) + self.assertEqual(len(ipv6), 1) + self.assertEqual(ipv6[0], "dead::beef/64") + + def test_site_exclusion(self): + from integrationCommon import NetworkGraph, NetworkNode, NodeType + net = NetworkGraph() + net.excludeSites = ['Site_2'] + net.addRawNode(NetworkNode("Site_1", "Site_1", "", NodeType.site, 1000, 1000)) + net.addRawNode(NetworkNode("Site_2", "Site_2", "", NodeType.site, 500, 500)) + self.assertEqual(len(net.nodes), 2) + + def test_site_exception(self): + from integrationCommon import NetworkGraph, NetworkNode, NodeType + net = NetworkGraph() + net.exceptionCPEs = { + "Site_2": "Site_1" + } + net.addRawNode(NetworkNode("Site_1", "Site_1", "", NodeType.site, 1000, 1000)) + net.addRawNode(NetworkNode("Site_2", "Site_2", "", NodeType.site, 500, 500)) + self.assertEqual(net.nodes[2].parentId, "Site_1") + net.prepareTree() + self.assertEqual(net.nodes[2].parentIndex, 1) + + def test_graph_render_to_pdf(self): + """ + Requires that graphviz be installed with + pip install graphviz + And also the associated graphviz package for + your platform. + See: https://www.graphviz.org/download/ + Test that it creates a graphic + """ + import importlib.util + if (spec := importlib.util.find_spec('graphviz')) is None: + return + + from integrationCommon import NetworkGraph, NetworkNode, NodeType + net = NetworkGraph() + net.addRawNode(NetworkNode("Site_1", "Site_1", "", NodeType.site, 1000, 1000)) + net.addRawNode(NetworkNode("Site_2", "Site_2", "", NodeType.site, 500, 500)) + net.addRawNode(NetworkNode("AP_A", "AP_A", "Site_1", NodeType.ap, 500, 500)) + net.addRawNode(NetworkNode("Site_3", "Site_3", "Site_1", NodeType.site, 500, 500)) + net.addRawNode(NetworkNode("PoP_5", "PoP_5", "Site_3", NodeType.site, 200, 200)) + net.addRawNode(NetworkNode("AP_9", "AP_9", "PoP_5", NodeType.ap, 120, 120)) + net.addRawNode(NetworkNode("PoP_6", "PoP_6", "PoP_5", NodeType.site, 60, 60)) + net.addRawNode(NetworkNode("AP_11", "AP_11", "PoP_6", NodeType.ap, 30, 30)) + net.addRawNode(NetworkNode("PoP_1", "PoP_1", "Site_2", NodeType.site, 200, 200)) + net.addRawNode(NetworkNode("AP_7", "AP_7", "PoP_1", NodeType.ap, 100, 100)) + net.addRawNode(NetworkNode("AP_1", "AP_1", "Site_2", NodeType.ap, 150, 150)) + net.prepareTree() + net.plotNetworkGraph(False) + from os.path import exists + self.assertEqual(exists("network.pdf.pdf"), True) + +if __name__ == '__main__': + unittest.main() diff --git a/old/v1.3/testIP.py b/old/v1.3/testIP.py new file mode 100644 index 00000000..0f510593 --- /dev/null +++ b/old/v1.3/testIP.py @@ -0,0 +1,54 @@ +import unittest +import sys + +class TestIP(unittest.TestCase): + def test_ignore(self): + """ + Test that we are correctly ignoring an IP address + """ + sys.path.append('testdata/') + from integrationCommon import isInIgnoredSubnets + self.assertEqual(isInIgnoredSubnets("192.168.1.1"),True) + + def test_not_ignore(self): + """ + Test that we are not ignoring an IP address + """ + sys.path.append('testdata/') + from integrationCommon import isInIgnoredSubnets + self.assertEqual(isInIgnoredSubnets("10.0.0.1"),False) + + def test_allowed(self): + """ + Test that we are correctly permitting an IP address + """ + sys.path.append('testdata/') + from integrationCommon import isInAllowedSubnets + self.assertEqual(isInAllowedSubnets("100.64.1.1"),True) + + def test_not_allowed(self): + """ + Test that we are correctly not permitting an IP address + """ + sys.path.append('testdata/') + from integrationCommon import isInAllowedSubnets + self.assertEqual(isInAllowedSubnets("101.64.1.1"),False) + + def test_is_permitted(self): + """ + Test the combined isIpv4Permitted function for true + """ + sys.path.append('testdata/') + from integrationCommon import isIpv4Permitted + self.assertEqual(isIpv4Permitted("100.64.1.1"),True) + + def test_is_not_permitted(self): + """ + Test the combined isIpv4Permitted function for false + """ + sys.path.append('testdata/') + from integrationCommon import isIpv4Permitted + self.assertEqual(isIpv4Permitted("101.64.1.1"),False) + +if __name__ == '__main__': + unittest.main() diff --git a/old/v1.3/testdata/ispConfig.py b/old/v1.3/testdata/ispConfig.py new file mode 100644 index 00000000..cb2b439a --- /dev/null +++ b/old/v1.3/testdata/ispConfig.py @@ -0,0 +1,2 @@ +ignoreSubnets = ['192.168.0.0/16'] +allowedSubnets = ['100.64.0.0/10'] diff --git a/old/v1.3/testdata/sample_layout.png b/old/v1.3/testdata/sample_layout.png new file mode 100644 index 0000000000000000000000000000000000000000..22d580c4e858b749df896cb545083491dca93f56 GIT binary patch literal 63014 zcme7R@N?(olHy`uVBq!ia0y~yVCH0CU^3=lV_;zL<_-PKz`)p&>FgZf>FlgfP?VpR znUl)EpfRy_qOHea2brVs!LFL3ti~dRCj#c`bacH?3)N|Ay%d&l_283B`WcrdY}sMK zwT_kDUTig=-nm^?JGh!2uy-t;Jb6*~lpp(-Tu?gJ{J3teEfSQo72DV%wOz(Hj?Lq=aJ$w2CI)q zAGtg`wE45$#uHteylVVx(k`)f%I{palYyb~Tze}@0Y z1xvU8oyunL*|Tcz+SdMtf4L7H?OLl@ec&mdK$THSaG8p|ui||6d*@%w-gMxBu0TX_ zb@toGUl=`t!%v$ZIH+h4wct%@fBE;aZ{Oa}46C<4GqLD&=cyAL7#JAXlDyqr82*Fc zg1yTpGcYi47I;J!Gcf2WgD_*oQu{In1_t&LPhVH|XI%2Ux`I58Pb3)_7$i$vBTAg} zb8}PkN*J7rQWHy3QxwWGOEMJPJ$(bh8~MZ;7!(*hT^vIyZoRo%9&_a@^YM?@?=t#{ zh8Yt{W?MG-=(_JrpEc9iusGY#$Hn!m?xO>}i;UjA z`~3T{wnEpkWd#p@SN2!S+-Z1UyDxsn`QN`I&60Z@U0htA=oRgJ@FI|dfB(0tS0YD_ zs>aRrdwuOGlfM3kZ+?5eeq)oDKQWn|OKi`#S=!<^aQ0GPUM;m0lT-At_|h>^LMMftB4TDAKNVEZm8TW%JFD@JD;ju z-gf7ko5G&%PV?1>yTir6$`z6RJvb^PBq`y>R_(&s-{1R7C3sEu7l!a`MCN{DOZqkCJb0icD14R}{Ort#tl!>oT3p3pclLCM5~UpPw&3uaeEG zY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