From bf0ada3d89ce01d982914a73905460d4824423e4 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Wed, 7 Jan 2026 10:14:58 -0300 Subject: [PATCH] filter non-WG interfaces in data processing loop --- containers/rrdtool/wgrrd.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/containers/rrdtool/wgrrd.py b/containers/rrdtool/wgrrd.py index a10713b..5a60950 100755 --- a/containers/rrdtool/wgrrd.py +++ b/containers/rrdtool/wgrrd.py @@ -1,11 +1,12 @@ #!/usr/bin/env python3 -import os -import sys -import uuid import base64 -import time -import requests +import os import subprocess +import sys +import time +import uuid + +import requests # Global variables DEBUG = True @@ -211,6 +212,10 @@ def main_loop(): # Process each interface and its peers, aggregate tx and rx for the interface for interface, peers in data.items(): + if not isinstance(interface, str) or not interface.startswith("wg"): + if interface not in ['cache_information', 'status', 'message']: + debug_log(f"Skipping non-wg root key: {interface}") + continue debug_log(f"Processing interface: {interface}") total_tx = 0 total_rx = 0