Enhanced anomly debug messages

Cleaned up brodcast domain code
This commit is contained in:
Luca Deri 2021-03-18 15:46:28 +01:00
parent 83fe3a158b
commit e10a3a3135
5 changed files with 71 additions and 77 deletions

View file

@ -436,8 +436,10 @@ function ts_dump.host_update_stats_rrds(when, hostname, host, ifstats, verbose)
local h = host["active_flows_behaviour"]
if enable_behaviour_debug then
io.write("\n\t\t[Active Flows Behaviour]\n\t\t\t[Client][value: "..tostring(h["as_client.value"]).."][prediction: "..tostring(h["as_client.prediction"]).."][lower: "..tostring(h["as_client.lower_bound"]).."][upper: "..tostring(h["as_client.upper_bound"]).."][ANOMALY:"..tostring(h["as_client.anomaly"]).."]\n");
io.write("\t\t\t[Server][value: "..tostring(h["as_server.value"]).."][prediction: "..tostring(h["as_server.prediction"]).."][lower: "..tostring(h["as_server.lower_bound"]).."][upper: "..tostring(h["as_server.upper_bound"]).."][ANOMALY: "..tostring(h["as_client.anomaly"]).."]\n");
if(h["as_client.anomaly"]) then rsp = "ANOMALY" else rsp = "OK" end
io.write("\n\t\t[Active Flows Behaviour]\n\t\t\t[Client][value: "..tostring(h["as_client.value"]).."][prediction: "..tostring(h["as_client.prediction"]).."][lower: "..tostring(h["as_client.lower_bound"]).."][upper: "..tostring(h["as_client.upper_bound"]).."]["..rsp.."]\n");
if(h["as_server.anomaly"]) then rsp = "ANOMALY" else rsp = "OK" end
io.write("\t\t\t[Server][value: "..tostring(h["as_server.value"]).."][prediction: "..tostring(h["as_server.prediction"]).."][lower: "..tostring(h["as_server.lower_bound"]).."][upper: "..tostring(h["as_server.upper_bound"]).."]["..rsp.."]\n");
end
--tprint(h)