mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Alerts changes
NOTE: database schema changed. Existing alerts will be lost. - Unified engaged and closed tables - Simplified hosts engaged alert counters handling: periodically set by lua - Removed alert engine and replaced with alert periodicity - Now engage is implicitly derived from the alert end timestamp and periodicity - New alerts_api.lua to easily emit alerts - Removed past alerts counter aggregation by hash - Alert notifications for non-flow alerts are now removed from C and triggered by lua
This commit is contained in:
parent
ae4770fe7d
commit
a9d3c78587
30 changed files with 1055 additions and 1332 deletions
|
|
@ -4,9 +4,15 @@
|
|||
|
||||
local test_utils = {}
|
||||
|
||||
local alerts = require("alerts_api")
|
||||
local test_failed_alert = alerts:newAlert({
|
||||
type = "test_failed",
|
||||
entity = "test"
|
||||
severity = "error",
|
||||
})
|
||||
|
||||
local function test_error(msg)
|
||||
interface.storeAlert(alertEntity("test"), "test",
|
||||
alertType("test_failed"), alertSeverity("error"), msg)
|
||||
test_failed_alert:emit("test", msg)
|
||||
end
|
||||
|
||||
local function test_assert(cond, error_msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue