You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- ["input.bastion_systemd_sshd"] = {inactivity_timeout = 60, percent = 0.5} -- a timeout of 60 or more disables the check as the alert window is only one hour
28
+
_default_ = {inactivity_timeout = 5, -- minutes percent = 0.5} -- if not specified the default is no monitoring
32
29
}
33
30
}
34
31
```
@@ -53,16 +50,13 @@ local CREATED = 1
53
50
localINGESTED=2
54
51
localERROR=3
55
52
56
-
localie=read_config("alert").ingestion_error
57
-
assert(type(ie) =="table", "alert.ingestion_error must be a table")
58
-
fork,vinpairs(ie) do
53
+
localcnt=0
54
+
fork,vinpairs(alert.thresholds) do
59
55
assert(type(v.inactivity_timeout) =="number", "inactivity_timeout must be a number")
60
56
assert(type(v.percent) =="number", "percent must be a number")
61
-
ifk=="*" then
62
-
localmt= {__index=function(t, k) returnvend }
63
-
setmetatable(ie, mt);
64
-
end
57
+
cnt=cnt+1
65
58
end
59
+
assert(cnt>0, "at least one alert threshold must be set")
66
60
67
61
inputs= {}
68
62
localfunctionget_input(logger, rows, spr)
@@ -133,10 +127,10 @@ local function diagnostic_prune(ns, diags)
0 commit comments