mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Add rest/v1/get/alert/severity/counters.lua REST API
This commit is contained in:
parent
ec3f3de17d
commit
97046a8a97
2 changed files with 67 additions and 0 deletions
|
|
@ -383,6 +383,17 @@ end
|
|||
|
||||
-- #################################
|
||||
|
||||
function alert_utils.getNumAlertsPerSeverity(what, epoch_begin, epoch_end)
|
||||
local opts = {
|
||||
epoch_begin = epoch_begin,
|
||||
epoch_end = epoch_end,
|
||||
}
|
||||
|
||||
return performAlertsQuery("select alert_severity severity, count(*) count", what, opts, nil, "alert_severity" --[[ group by ]])
|
||||
end
|
||||
|
||||
-- #################################
|
||||
|
||||
local function refreshAlerts(ifid)
|
||||
ntop.delCache(string.format("ntopng.cache.alerts.ifid_%d.has_alerts", ifid))
|
||||
ntop.delCache("ntopng.cache.update_alerts_stats_time")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue