zeek/scripts/base/frameworks/metrics/non-cluster.bro
Seth Hall d9195076b1 Metrics framework checkpoint.
- New scan.bro merged in and reworked a bit.

 - Updated metrics API.  Now possible to calculate much more.
2012-11-16 02:37:52 -05:00

21 lines
416 B
Text

@load ./main
module Metrics;
event Metrics::log_it(filter: Filter)
{
local id = filter$id;
local name = filter$name;
write_log(network_time(), filter, store[id, name]);
reset(filter);
schedule filter$every { Metrics::log_it(filter) };
}
function data_added(filter: Filter, index: Index, val: ResultVal)
{
if ( check_thresholds(filter, index, val, 1.0) )
threshold_crossed(filter, index, val);
}