mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
22 lines
481 B
Lua
22 lines
481 B
Lua
--
|
|
-- (C) 2018 - ntop.org
|
|
--
|
|
|
|
local dirs = ntop.getDirs()
|
|
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|
|
|
require "lua_utils"
|
|
local ts_utils = require("ts_utils")
|
|
local json = require "dkjson"
|
|
|
|
local driver = ts_utils.getQueryDriver()
|
|
|
|
local info = {}
|
|
|
|
if driver.getInfluxdbVersion then
|
|
info.version = driver:getInfluxdbVersion()
|
|
info.db_bytes = driver:getDiskUsage()
|
|
end
|
|
|
|
sendHTTPContentTypeHeader('application/json')
|
|
print(json.encode(info))
|