".. i18n("system_stats.exports") .." "..i18n("system_stats.short_desc_influxdb_exports").." | ")
print("")
diff --git a/scripts/plugins/monitors/system/redis_monitor/web_gui/redis_stats.lua b/scripts/lua/monitor/redis_monitor.lua
similarity index 95%
rename from scripts/plugins/monitors/system/redis_monitor/web_gui/redis_stats.lua
rename to scripts/lua/monitor/redis_monitor.lua
index ea8c50046c..6e0f6a93de 100644
--- a/scripts/plugins/monitors/system/redis_monitor/web_gui/redis_stats.lua
+++ b/scripts/lua/monitor/redis_monitor.lua
@@ -27,7 +27,7 @@ page_utils.set_active_menu_entry(page_utils.menu_entries.redis_monitor)
dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
local page = _GET["page"] or "overview"
-local url = plugins_utils.getUrl("redis_stats.lua") .. "?ifid=" .. getInterfaceId(ifname)
+local url = plugins_utils.getMonitorUrl("redis_monitor.lua") .. "?ifid=" .. getInterfaceId(ifname)
page_utils.print_navbar("Redis", url,
{
@@ -85,9 +85,11 @@ if(page == "overview") then
};
function refreshRedisStats() {
- $.get("]] print(plugins_utils.getUrl("get_redis_info.lua")) print[[", function(info) {
+ $.get("]] print(ntop.getHttpPrefix()) print[[/lua/rest/v2/get/redis/redis_info.lua", function(info) {
$(".redis-info-load").hide();
+ info = info.rsp;
+
if(typeof info.health !== "undefined" && health_descr[info.health]) {
$("#redis-health").html(health_descr[info.health]["status"] + " " + health_descr[info.health]["descr"]);
}
@@ -123,7 +125,7 @@ $("#table-redis-stats").datatable({
title: "",
perPage: 100,
hidePerPage: true,
- url: "]] print(plugins_utils.getUrl("get_redis_stats.lua")) print(ntop.getHttpPrefix()) print[[",
+ url: "]] print(ntop.getHttpPrefix()) print("/lua/rest/v2/get/redis/redis_stats.lua") print[[",
columns: [
{
field: "column_key",
diff --git a/scripts/lua/rest/v2/get/redis/redis_info.lua b/scripts/lua/rest/v2/get/redis/redis_info.lua
new file mode 100644
index 0000000000..9f3a41231c
--- /dev/null
+++ b/scripts/lua/rest/v2/get/redis/redis_info.lua
@@ -0,0 +1,13 @@
+--
+-- (C) 2019-22 - ntop.org
+--
+
+local dirs = ntop.getDirs()
+package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
+
+local redis_api = require "redis_api"
+local rest_utils = require("rest_utils")
+
+local stats = redis_api.getStats()
+
+rest_utils.answer(rest_utils.consts.success.ok, stats)
diff --git a/scripts/plugins/monitors/system/redis_monitor/web_gui/get_redis_stats.lua b/scripts/lua/rest/v2/get/redis/redis_stats.lua
similarity index 95%
rename from scripts/plugins/monitors/system/redis_monitor/web_gui/get_redis_stats.lua
rename to scripts/lua/rest/v2/get/redis/redis_stats.lua
index 0b18a38ff4..d30d0196c0 100644
--- a/scripts/plugins/monitors/system/redis_monitor/web_gui/get_redis_stats.lua
+++ b/scripts/lua/rest/v2/get/redis/redis_stats.lua
@@ -6,11 +6,8 @@ local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
-local format_utils = require("format_utils")
-local json = require("dkjson")
local plugins_utils = require("plugins_utils")
-
-sendHTTPContentTypeHeader('application/json')
+local rest_utils = require("rest_utils")
-- ################################################
@@ -117,10 +114,11 @@ end
-- ################################################
local result = {}
+
result["perPage"] = perPage
result["currentPage"] = currentPage
result["totalRows"] = totalRows
result["data"] = res
result["sort"] = {{sortColumn, sortOrder}}
-print(json.encode(result))
+rest_utils.answer(rest_utils.consts.success.ok, result)
diff --git a/scripts/plugins/monitors/system/disk_monitor/checks/system/disk_monitor.lua b/scripts/plugins/monitors/system/disk_monitor/checks/system/disk_monitor.lua
deleted file mode 100644
index 7c56f3cfbe..0000000000
--- a/scripts/plugins/monitors/system/disk_monitor/checks/system/disk_monitor.lua
+++ /dev/null
@@ -1,41 +0,0 @@
---
--- (C) 2019-21 - ntop.org
---
-
-local ts_utils = require("ts_utils_core")
-local checks = require("checks")
-local ts_utils = require("ts_utils_core")
-local storage_utils = require("storage_utils")
-local alerts_api = require("alerts_api")
-
-local script = {
- -- Script category
- category = checks.check_categories.system,
-
- -- This module is enabled by default
- default_enabled = true,
-
- -- No default configuration is provided
- default_value = {},
-
- -- See below
- hooks = {},
-
- gui = {
- i18n_title = "system_stats.disk_monitor",
- i18n_description = "system_stats.disk_monitor_description",
- },
-}
-
--- ##############################################
-
--- Defines an hook which is executed every hour
-function script.hooks.hour(params)
- local info = storage_utils.storageInfo(true --[[ refresh cache ]], 120 --[[ Allow a couple of minutes --]])
-
- -- TODO alert if free disk space is too low
-end
-
--- ##############################################
-
-return(script)
diff --git a/scripts/plugins/monitors/system/disk_monitor/manifest.lua b/scripts/plugins/monitors/system/disk_monitor/manifest.lua
deleted file mode 100644
index a840ecbeb9..0000000000
--- a/scripts/plugins/monitors/system/disk_monitor/manifest.lua
+++ /dev/null
@@ -1,10 +0,0 @@
---
--- (C) 2019-22 - ntop.org
---
-
-return {
- title = "Disk Monitor",
- description = "Monitors storage free space",
- author = "ntop",
- dependencies = {},
-}
diff --git a/scripts/plugins/monitors/system/influxdb_monitor/checks/system/influxdb_monitor.lua b/scripts/plugins/monitors/system/influxdb_monitor/checks/system/influxdb_monitor.lua
deleted file mode 100644
index ae384966bf..0000000000
--- a/scripts/plugins/monitors/system/influxdb_monitor/checks/system/influxdb_monitor.lua
+++ /dev/null
@@ -1,130 +0,0 @@
---
--- (C) 2019-21 - ntop.org
---
-
-local checks = require("checks")
-local ts_utils = require("ts_utils_core")
-local alerts_api = require("alerts_api")
-local alert_consts = require("alert_consts")
-
-local script = {
- -- Script category
- category = checks.check_categories.system,
-
- -- This module is enabled by default
- default_enabled = true,
-
- -- No default configuration is provided
- default_value = {},
-
- gui = {
- i18n_title = "alerts_dashboard.influxdb_monitor",
- i18n_description = "alerts_dashboard.influxdb_monitor_description",
- },
-
- -- See below
- hooks = {},
-}
-
--- ##############################################
-
-function script.setup()
- -- Only enabled if InfluxDB is active
- return(ts_utils.getDriverName() == "influxdb")
-end
-
--- ##############################################
-
--- Defines an hook which is executed every 5 minutes
-script.hooks["5mins"] = function(params)
- if params.ts_enabled then
- local influxdb = ts_utils.getQueryDriver()
- local when = params.when
-
- script._exportStats(when, influxdb)
- script._measureRtt(when, influxdb)
- script._exportStorageSize(when, influxdb)
- end
-end
-
--- ##############################################
-
--- Defines an hook which is executed every minute
-script.hooks["min"] = function(params)
- local last_error = ntop.getCache("ntopng.cache.influxdb.last_error")
-
- -- Note: last_error is automatically cleared once the error is gone
- if(not isEmptyString(last_error)) then
- local influxdb = ts_utils.getQueryDriver()
-
- local alert_type = alert_consts.alert_types.alert_influxdb_error.new(
- last_error
- )
-
- alert_type:set_score_error()
- alert_type:set_granularity(alert_consts.alerts_granularities.min)
-
- alert_type:store(alerts_api.systemEntity())
- end
-end
-
--- ##############################################
-
-function script.getExportStats()
- local points_exported
- local points_dropped
- local exports
- local ifnames = interface.getIfNames()
-
- local influxdb = ts_utils.getQueryDriver()
-
- points_exported = influxdb:get_exported_points()
- exports = influxdb:get_exports()
-
- local res = {
- health = influxdb:get_health(),
- points_exported = points_exported,
- exports = exports,
- }
-
- return(res)
-end
-
--- ##############################################
-
-function script._measureRtt(when, influxdb)
- local start_ms = ntop.gettimemsec()
- local res = influxdb:getInfluxdbVersion()
- local ifid = getSystemInterfaceId()
-
- if res ~= nil then
- local end_ms = ntop.gettimemsec()
-
- ts_utils.append("influxdb:rtt", {ifid = ifid, millis_rtt = ((end_ms-start_ms)*1000)}, when)
- end
-end
-
--- ##############################################
-
-function script._exportStats(when, influxdb)
- local stats = script.getExportStats()
- local ifid = getSystemInterfaceId()
-
- ts_utils.append("influxdb:exported_points", {ifid = ifid, points = stats.points_exported}, when)
- ts_utils.append("influxdb:exports", {ifid = ifid, num_exports = stats.exports}, when)
-end
-
--- ##############################################
-
-function script._exportStorageSize(when, influxdb)
- local disk_bytes = influxdb:getDiskUsage()
- local ifid = getSystemInterfaceId()
-
- if(disk_bytes ~= nil) then
- ts_utils.append("influxdb:storage_size", {ifid = ifid, disk_bytes = disk_bytes}, when)
- end
-end
-
--- ##############################################
-
-return(script)
diff --git a/scripts/plugins/monitors/system/influxdb_monitor/manifest.lua b/scripts/plugins/monitors/system/influxdb_monitor/manifest.lua
deleted file mode 100644
index 9f52b1ff83..0000000000
--- a/scripts/plugins/monitors/system/influxdb_monitor/manifest.lua
+++ /dev/null
@@ -1,10 +0,0 @@
---
--- (C) 2019-22 - ntop.org
---
-
-return {
- title = "InluxDB Monitor",
- description = "Monitors the status of InfluxDB",
- author = "ntop",
- dependencies = {},
-}
diff --git a/scripts/plugins/monitors/system/influxdb_monitor/ts_schemas/5mins.lua b/scripts/plugins/monitors/system/influxdb_monitor/ts_schemas/5mins.lua
deleted file mode 100644
index 8342a579d0..0000000000
--- a/scripts/plugins/monitors/system/influxdb_monitor/ts_schemas/5mins.lua
+++ /dev/null
@@ -1,94 +0,0 @@
---
--- (C) 2019-22 - ntop.org
---
-
-local ts_utils = require "ts_utils_core"
-local schema
-
--- ##############################################
-
-local function get_memory_size_query(influxdb, schema, tstart, tend, time_step)
- --[[
- See comments in function driver:getMemoryUsage() to understand
- why it is necessary to subtract the HeapReleased from Sys.
- --]]
- local q = 'SELECT MEAN(Sys) - MEAN(HeapReleased) as mem_bytes' ..
- ' FROM "_internal".."runtime"' ..
- " WHERE time >= " .. tstart .. "000000000 AND time <= " .. tend .. "000000000" ..
- " GROUP BY TIME(".. time_step .."s)"
-
- return(q)
-end
-
-local function get_write_success_query(influxdb, schema, tstart, tend, time_step)
- local q = 'SELECT SUM(writePointsOk) as points' ..
- ' FROM (SELECT '..
- ' (DERIVATIVE(MEAN(writePointsOk)) / '.. time_step ..') as writePointsOk' ..
- ' FROM "monitor"."shard" WHERE "database"=\''.. influxdb.db ..'\'' ..
- " AND time >= " .. tstart .. "000000000 AND time <= " .. tend .. "000000000" ..
- " GROUP BY id)" ..
- " GROUP BY TIME(".. time_step .."s)"
-
- return(q)
-end
-
--- ##############################################
-
-schema = ts_utils.newSchema("influxdb:storage_size", {
- metrics_type = ts_utils.metrics.gauge,
- is_system_schema = true,
- step = 300,
-})
-schema:addTag("ifid")
-schema:addMetric("disk_bytes")
-
-schema = ts_utils.newSchema("influxdb:exported_points", {
- metrics_type = ts_utils.metrics.counter,
- is_system_schema = true,
- step = 300,
-})
-schema:addTag("ifid")
-schema:addMetric("points")
-
-schema = ts_utils.newSchema("influxdb:dropped_points", {
- metrics_type = ts_utils.metrics.counter,
- is_system_schema = true,
- step = 300,
-})
-schema:addTag("ifid")
-schema:addMetric("points")
-
-schema = ts_utils.newSchema("influxdb:exports", {
- metrics_type = ts_utils.metrics.counter,
- is_system_schema = true,
- step = 300,
-})
-schema:addTag("ifid")
-schema:addMetric("num_exports")
-
-schema = ts_utils.newSchema("influxdb:rtt", {
- metrics_type = ts_utils.metrics.gauge,
- is_system_schema = true,
- step = 300,
-})
-schema:addTag("ifid")
-schema:addMetric("millis_rtt")
-
--- The following metrics are built-in into influxdb
-schema = ts_utils.newSchema("influxdb:memory_size", {
- influx_internal_query = get_memory_size_query,
- is_system_schema = true,
- metrics_type = ts_utils.metrics.gauge,
- step = 10,
-})
-schema:addTag("ifid")
-schema:addMetric("mem_bytes")
-
-schema = ts_utils.newSchema("influxdb:write_successes", {
- influx_internal_query = get_write_success_query,
- is_system_schema = true,
- metrics_type = ts_utils.metrics.counter,
- step = 10,
-})
-schema:addTag("ifid")
-schema:addMetric("points")
diff --git a/scripts/plugins/monitors/system/influxdb_monitor/web_gui/menu.lua b/scripts/plugins/monitors/system/influxdb_monitor/web_gui/menu.lua
deleted file mode 100644
index 7b8a20393d..0000000000
--- a/scripts/plugins/monitors/system/influxdb_monitor/web_gui/menu.lua
+++ /dev/null
@@ -1,13 +0,0 @@
-return {
- label = "InfluxDB",
- script = "influxdb_stats.lua",
- sort_order = 1600,
- menu_entry = {key = "influxdb", i18n_title = "InfluxDB", section = "health"},
- is_shown = function()
- local ts_utils = require("ts_utils_core")
- local checks = require("checks")
-
- return((ts_utils.getDriverName() == "influxdb") and
- checks.isSystemScriptEnabled("influxdb_monitor"))
- end
-}
diff --git a/scripts/plugins/monitors/system/redis_monitor/checks/system/redis_monitor.lua b/scripts/plugins/monitors/system/redis_monitor/checks/system/redis_monitor.lua
deleted file mode 100644
index e062b30ca6..0000000000
--- a/scripts/plugins/monitors/system/redis_monitor/checks/system/redis_monitor.lua
+++ /dev/null
@@ -1,144 +0,0 @@
---
--- (C) 2019-21 - ntop.org
---
-
-local ts_utils = require("ts_utils_core")
-local checks = require("checks")
-
-local script = {
- -- Script category
- category = checks.check_categories.system,
-
- -- This module is enabled by default
- default_enabled = true,
-
- -- No default configuration is provided
- default_value = {},
-
- -- See below
- hooks = {},
-
- gui = {
- i18n_title = "system_stats.redis.redis_monitor",
- i18n_description = "system_stats.redis.redis_monitor_description",
- },
-}
-
--- ##############################################
-
--- Defines an hook which is executed every minute
-function script.hooks.min(params)
- if params.ts_enabled then
- local ifid = getSystemInterfaceId()
- local stats = script.getStats()
- local hits_key = "ntopng.cache.redis.stats"
- local json = require("dkjson")
- local hits_stats = ntop.getCacheStats()
-
- local old_hits_stats = ntop.getCache(hits_key)
-
- if(not isEmptyString(old_hits_stats)) then
- old_hits_stats = json.decode(old_hits_stats) or {}
- else
- old_hits_stats = {}
- end
-
- if stats["memory"] then
- ts_utils.append("redis:memory", {ifid = ifid, resident_bytes = stats["memory"]}, when)
- end
-
- if stats["dbsize"] then
- ts_utils.append("redis:keys", {ifid = ifid, num_keys = stats["dbsize"]}, when)
- end
-
- for key, val in pairs(hits_stats) do
- if(old_hits_stats[key] ~= nil) then
- local delta = math.max(val - old_hits_stats[key], 0)
-
- -- Dump the delta value as a gauge
- ts_utils.append("redis:hits", {ifid = ifid, command = key, num_calls = delta}, when)
- end
- end
-
- ntop.setCache(hits_key, json.encode(hits_stats))
- end
-end
-
--- ##############################################
-
-function script.getRedisStatus()
- local redis = ntop.getCacheStatus()
- local redis_info = redis["info"]
- local res = {}
-
- for _, k in pairs(redis_info:split("\r\n")) do
- local k = k:split(":")
-
- if k then
- local v_k = k[1]
- local v = tonumber(k[2]) or k[2]
-
- res[v_k] = v
- end
- end
-
-
- if redis["dbsize"] then
- res["dbsize"] = redis["dbsize"]
- end
-
- return res
-end
-
--- ##############################################
-
-local function getHealth(redis_status)
- local health = "green"
-
- if ntop.isWindows() then
- -- See Windows note in script.getStats()
- return health
- end
-
- if redis_status["aof_enabled"] and redis_status["aof_enabled"] ~= 0 then
- -- If here the use of Redis Append Only File (AOF) is enabled
- -- so we should check for its errors
- if redis_status["aof_last_bgrewrite_status"] ~= "ok" or redis_status["aof_last_write_status"] ~= "ok" then
- health = "red"
- end
- end
-
- if redis_status["rdb_last_bgsave_status"] ~= "ok" then
- health = "red"
- end
-
- return health
-end
-
--- ##############################################
-
--- NOTE: on Windows, some stats are missing from script.getRedisStatus():
--- - aof_last_bgrewrite_status
--- - aof_last_write_status
--- - rdb_last_bgsave_status
--- - dbsize
-function script.getStats()
- local redis_status = script.getRedisStatus()
-
- local res = {
- -- used_memory_rss: Number of bytes that Redis allocated
- -- as seen by the operating system (a.k.a resident set size).
- -- This is the number reported by tools such as top(1) and ps(1)
- memory = redis_status["used_memory_rss"],
- -- The number of keys in the database
- dbsize = redis_status["dbsize"],
- -- Health
- health = getHealth(redis_status)
- }
-
- return res
-end
-
--- ##############################################
-
-return(script)
diff --git a/scripts/plugins/monitors/system/redis_monitor/manifest.lua b/scripts/plugins/monitors/system/redis_monitor/manifest.lua
deleted file mode 100644
index c96f30e691..0000000000
--- a/scripts/plugins/monitors/system/redis_monitor/manifest.lua
+++ /dev/null
@@ -1,10 +0,0 @@
---
--- (C) 2019-22 - ntop.org
---
-
-return {
- title = "Redis Monitor",
- description = "Monitors Redis health and performance",
- author = "ntop",
- dependencies = {},
-}
diff --git a/scripts/plugins/monitors/system/redis_monitor/ts_schemas/min.lua b/scripts/plugins/monitors/system/redis_monitor/ts_schemas/min.lua
deleted file mode 100644
index 4e7829789e..0000000000
--- a/scripts/plugins/monitors/system/redis_monitor/ts_schemas/min.lua
+++ /dev/null
@@ -1,28 +0,0 @@
-local schema
-local ts_utils = require("ts_utils_core")
-
-schema = ts_utils.newSchema("redis:memory", {
- metrics_type = ts_utils.metrics.gauge,
- is_system_schema = true,
- step = 60,
-})
-schema:addTag("ifid")
-schema:addMetric("resident_bytes")
-
-schema = ts_utils.newSchema("redis:keys", {
- metrics_type = ts_utils.metrics.gauge,
- is_system_schema = true,
- step = 60,
-})
-schema:addTag("ifid")
-schema:addMetric("num_keys")
-
--- Cache
-schema = ts_utils.newSchema("redis:hits", {
- metrics_type = ts_utils.metrics.gauge,
- is_system_schema = true,
- step = 60,
-})
-schema:addTag("ifid")
-schema:addTag("command")
-schema:addMetric("num_calls")
diff --git a/scripts/plugins/monitors/system/redis_monitor/web_gui/get_redis_info.lua b/scripts/plugins/monitors/system/redis_monitor/web_gui/get_redis_info.lua
deleted file mode 100644
index 3bc33b6a21..0000000000
--- a/scripts/plugins/monitors/system/redis_monitor/web_gui/get_redis_info.lua
+++ /dev/null
@@ -1,18 +0,0 @@
---
--- (C) 2019-22 - ntop.org
---
-
-local dirs = ntop.getDirs()
-package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
-
-require "lua_utils"
-local checks = require("checks")
-local json = require "dkjson"
-
-local redis = checks.loadModule(getSystemInterfaceId(), checks.script_types.system, "system", "redis_monitor")
-
-sendHTTPContentTypeHeader('application/json')
-
-local stats = redis.getStats()
-
-print(json.encode(stats))
diff --git a/scripts/plugins/monitors/system/redis_monitor/web_gui/menu.lua b/scripts/plugins/monitors/system/redis_monitor/web_gui/menu.lua
deleted file mode 100644
index 99754fed85..0000000000
--- a/scripts/plugins/monitors/system/redis_monitor/web_gui/menu.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-return {
- label = "Redis",
- script = "redis_stats.lua",
- sort_order = 1700,
- menu_entry = {key = "redis_monitor", i18n_title = "Redis", section = "health"},
-
- is_shown = function()
- local checks = require("checks")
-
- return(checks.isSystemScriptEnabled("redis_monitor"))
- end
-}
diff --git a/scripts/plugins/monitors/system/timeseries/checks/system/alerts_ts.lua b/scripts/plugins/monitors/system/timeseries/checks/system/alerts_ts.lua
deleted file mode 100644
index c26a443b7b..0000000000
--- a/scripts/plugins/monitors/system/timeseries/checks/system/alerts_ts.lua
+++ /dev/null
@@ -1,46 +0,0 @@
---
--- (C) 2019-21 - ntop.org
---
-
-local ts_utils = require("ts_utils_core")
-local checks = require("checks")
-local cpu_utils = require("cpu_utils")
-
-local script = {
- -- Script category
- category = checks.check_categories.system,
-
- -- This module is enabled by default
- default_enabled = true,
-
- -- No default configuration is provided
- default_value = {},
-
- -- See below
- hooks = {},
-
- gui = {
- i18n_title = "alerts_dashboard.alerts_ts",
- i18n_description = "alerts_dashboard.alerts_ts_description",
- },
-}
-
--- ##############################################
-
-function script.hooks.min(params)
- if params.ts_enabled then
- local system_host_stats = cpu_utils.systemHostStats()
-
- ts_utils.append("process:num_alerts",
- {
- ifid = getSystemInterfaceId(),
- dropped_alerts = system_host_stats.dropped_alerts or 0,
- written_alerts = system_host_stats.written_alerts or 0,
- alerts_queries = system_host_stats.alerts_queries or 0
- }, when, verbose)
- end
-end
-
--- ##############################################
-
-return script
diff --git a/scripts/plugins/monitors/system/timeseries/checks/system/memory_ts.lua b/scripts/plugins/monitors/system/timeseries/checks/system/memory_ts.lua
deleted file mode 100644
index 52fac124db..0000000000
--- a/scripts/plugins/monitors/system/timeseries/checks/system/memory_ts.lua
+++ /dev/null
@@ -1,47 +0,0 @@
---
--- (C) 2019-21 - ntop.org
---
-
-local ts_utils = require("ts_utils_core")
-local checks = require("checks")
-local cpu_utils = require("cpu_utils")
-
-local script = {
- -- Script category
- category = checks.check_categories.system,
-
- -- This module is enabled by default
- default_enabled = true,
-
- -- No default configuration is provided
- default_value = {},
-
- -- See below
- hooks = {},
-
- gui = {
- i18n_title = "alerts_dashboard.memory_ts",
- i18n_description = "alerts_dashboard.memory_ts_description",
- },
-}
-
--- ##############################################
-
-function script.hooks.min(params)
- if params.ts_enabled then
- local system_host_stats = cpu_utils.systemHostStats()
-
- if((system_host_stats.mem_ntopng_resident ~= nil) and
- (system_host_stats.mem_ntopng_virtual ~= nil)) then
- ts_utils.append("process:resident_memory",
- {
- ifid = getSystemInterfaceId(),
- resident_bytes = system_host_stats.mem_ntopng_resident * 1024,
- }, when, verbose)
- end
- end
-end
-
--- ##############################################
-
-return script
diff --git a/scripts/plugins/monitors/system/timeseries/manifest.lua b/scripts/plugins/monitors/system/timeseries/manifest.lua
deleted file mode 100644
index dc3517b4b3..0000000000
--- a/scripts/plugins/monitors/system/timeseries/manifest.lua
+++ /dev/null
@@ -1,10 +0,0 @@
---
--- (C) 2019-22 - ntop.org
---
-
-return {
- title = "Timeseries",
- description = "Contains scripts executed periodically to dump timeseries",
- author = "ntop",
- dependencies = {},
-}
diff --git a/scripts/plugins/monitors/system/timeseries/ts_schemas/min.lua b/scripts/plugins/monitors/system/timeseries/ts_schemas/min.lua
deleted file mode 100644
index 182cb0befc..0000000000
--- a/scripts/plugins/monitors/system/timeseries/ts_schemas/min.lua
+++ /dev/null
@@ -1,19 +0,0 @@
---
--- (C) 2019-22 - ntop.org
---
-
-local ts_utils = require("ts_utils_core")
-
-schema = ts_utils.newSchema("process:resident_memory", {step=60, metrics_type=ts_utils.metrics.gauge, is_critical_ts=true})
-schema:addTag("ifid")
-schema:addMetric("resident_bytes")
-
--------------------------------------------------------
--- ntopng process alerts
--------------------------------------------------------
-
-schema = ts_utils.newSchema("process:num_alerts", {step = 60})
-schema:addTag("ifid")
-schema:addMetric("written_alerts")
-schema:addMetric("alerts_queries")
-schema:addMetric("dropped_alerts")
|