prometheus-node-exporter-lua: mwan3: speed up
authorEtienne Champetier <[email protected]>
Tue, 24 Jun 2025 20:10:41 +0000 (16:10 -0400)
committerEtienne Champetier <[email protected]>
Tue, 24 Jun 2025 22:53:43 +0000 (01:53 +0300)
Request only 'interfaces' status, as we don't use 'connected' and
'policies' status. On my router with 5 wans / 2 tracking IPs per wan,
scrape time goes from 1.90s to 1.30s (still pretty slow but better)

Signed-off-by: Etienne Champetier <[email protected]>
utils/prometheus-node-exporter-lua/Makefile
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/mwan3.lua

index ce0964b3a6e02f9e9c68589223abfdfb8bdb50ba..d2008907743d9a1902347dbad7e67f6e103caf83 100644 (file)
@@ -4,8 +4,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2025.06.23
-PKG_RELEASE:=6
+PKG_VERSION:=2025.06.24
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Etienne CHAMPETIER <[email protected]>
 PKG_LICENSE:=Apache-2.0
index fcedaedda6ad658951264b4cab53c9510d7c0b94..2497b1171f69b123d76322b240525d154dca01a8 100644 (file)
@@ -2,7 +2,7 @@ local ubus = require "ubus"
 
 local function scrape()
     local u = ubus.connect()
-    local status = u:call("mwan3", "status", {})
+    local status = u:call("mwan3", "status", {section="interfaces"})
     if status == nil then
         error("Could not get mwan3 status")
     end