mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
24 lines
437 B
Lua
24 lines
437 B
Lua
--
|
|
-- (C) 2017-20 - ntop.org
|
|
--
|
|
-- Prometheus integration script
|
|
--
|
|
|
|
dirs = ntop.getDirs()
|
|
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|
|
|
require "lua_utils"
|
|
|
|
sendHTTPContentTypeHeader('text/plain')
|
|
|
|
local prometheus_queue = "ntopng.prometheus_export_queue"
|
|
|
|
while(true) do
|
|
local line = ntop.rpopCache(prometheus_queue)
|
|
|
|
if(line == nil) then
|
|
break
|
|
else
|
|
print(line.."\n")
|
|
end
|
|
end
|