From 49352698a031d5816d04b802ad8e0386a8a73e30 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sun, 16 Oct 2022 23:02:52 +0200 Subject: nDPId: Added error event threshold to prevent event spamming which may be abused. Signed-off-by: Toni Uhlig --- examples/py-flow-info/flow-info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/py-flow-info/flow-info.py') diff --git a/examples/py-flow-info/flow-info.py b/examples/py-flow-info/flow-info.py index 0fba6fcaa..1d3226553 100755 --- a/examples/py-flow-info/flow-info.py +++ b/examples/py-flow-info/flow-info.py @@ -294,9 +294,9 @@ def onJsonLineRecvd(json_dict, instance, current_flow, global_user_data): stats.printStatus() return True if 'error_event_id' in json_dict: - print('{}{}{} {}: {}'.format(timestamp, basic_daemon_event_prefix, instance_and_source, + print('{}{}{} {}: {} [{}/{}]'.format(timestamp, basic_daemon_event_prefix, instance_and_source, prettifyEvent([TermColor.FAIL, TermColor.BLINK], 15, 'ERROR-EVENT'), - json_dict['error_event_name'])) + json_dict['error_event_name'], json_dict['threshold_n'], json_dict['threshold_n_max'])) stats.printStatus() return True elif 'flow_event_id' not in json_dict: -- cgit v1.2.3