Implemented DES and added to LocalHostStats

This commit is contained in:
Matteo Biscosi 2021-03-12 16:21:23 +01:00
parent 23269cb1b6
commit 3b5a5e2507
5 changed files with 83 additions and 50 deletions

View file

@ -358,12 +358,12 @@ function ts_dump.host_update_stats_rrds(when, hostname, host, ifstats, verbose)
-- Contacted Hosts Behaviour
if host["contacted_hosts_behaviour"] then
if(host.contacted_hosts_behaviour.hll_value > 0) then
io.write(hostname.." [value: "..tostring(host.contacted_hosts_behaviour.hll_value).."][prediction: "..tostring(host.contacted_hosts_behaviour.hw_prediction).."]\n");
if(host.contacted_hosts_behaviour.value > 0) then
io.write(hostname.." [value: "..tostring(host.contacted_hosts_behaviour.value).."][prediction: "..tostring(host.contacted_hosts_behaviour.prediction).."][lower_bound: "..tostring(host.contacted_hosts_behaviour.lower_bound).."][upper_bound: "..tostring(host.contacted_hosts_behaviour.upper_bound).."]\n");
end
ts_utils.append("host:contacts_behaviour", {ifid=ifstats.id, host=hostname,
value=(host.contacted_hosts_behaviour.hll_value or 0), prediction=(host.contacted_hosts_behaviour.hw_prediction or 0)}, when)
value=(host.contacted_hosts_behaviour.value or 0), prediction=(host.contacted_hosts_behaviour.prediction or 0)}, when)
end