diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2022-10-16 23:02:52 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2022-10-17 06:36:30 +0200 |
commit | 49352698a031d5816d04b802ad8e0386a8a73e30 (patch) | |
tree | 2e6bdaa874d7ffb084cc8b44530b72967e8bd08b /examples | |
parent | 6292102f93086d2d61de874640f0b87c89c02b44 (diff) |
nDPId: Added error event threshold to prevent event spamming which may be abused.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/py-flow-info/flow-info.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: |