mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 06:58:39 +01:00
prometheus-node-exporter-lua: export static files
Print all files from /var/prometheus/*.prom. This behaviour allow users to add metrics with non-lua scripts. Signed-off-by: Paul Spooren <spooren@informatik.uni-leipzig.de>
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local fs = require "nixio.fs"
|
||||
|
||||
local function scrape()
|
||||
for metrics in fs.glob("/var/prometheus/*.prom") do
|
||||
output(get_contents(metrics), '\n')
|
||||
end
|
||||
end
|
||||
|
||||
return { scrape = scrape }
|
||||
Reference in New Issue
Block a user