mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
prometheus-node-exporter-lua: Fix broken textfile collector
A recent change (00d420e80) removed the `output` function, which textfile.lua was
using to output metrics. So use the underlying output handle instead
Signed-off-by: Rob Hoelz <rob@hoelz.ro>
This commit is contained in:
committed by
Etienne Champetier
parent
81e9bbd6a5
commit
86e20d37a8
@@ -4,7 +4,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=prometheus-node-exporter-lua
|
||||
PKG_VERSION:=2025.06.29
|
||||
PKG_VERSION:=2025.07.15
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
|
||||
|
||||
@@ -4,7 +4,8 @@ local function scrape()
|
||||
local mtime_metric = metric("node_textfile_mtime_seconds", "gauge")
|
||||
|
||||
for metrics in fs.glob("/var/prometheus/*.prom") do
|
||||
output(get_contents(metrics), '\n')
|
||||
out:write(get_contents(metrics))
|
||||
out:write('\n')
|
||||
local stat = fs.stat(metrics)
|
||||
if stat then
|
||||
mtime_metric({ file = metrics }, stat.mtime)
|
||||
|
||||
Reference in New Issue
Block a user