Skip to content
Snippets Groups Projects
Commit 36dd92e0 authored by Radko Krkoš's avatar Radko Krkoš
Browse files

flowmon-ads: Rename Timestamp to 'Detection time'

* This is part of a backport from nsharp connector to unify the
  codebase.
* The actual code changes were done by Martin Černý <cernym@cesnet.cz>
  during the development of nsharp connector.
parent 8d86e0ff
No related branches found
No related tags found
No related merge requests found
...@@ -108,7 +108,7 @@ def proto_list(pl): ...@@ -108,7 +108,7 @@ def proto_list(pl):
ads_fields = ( ads_fields = (
('ID', str), # Unique id within ADS db ('ID', str), # Unique id within ADS db
('Timestamp', iso_time), # Timestamp of event generation ('Detection time', iso_time), # Timestamp of event generation
('FirstFlow', iso_time), # Timestamp of the first Flow on which was based the event detection ('FirstFlow', iso_time), # Timestamp of the first Flow on which was based the event detection
('Type', str), # Type of event, in fact a reference to the detection method, which recognized the event ('Type', str), # Type of event, in fact a reference to the detection method, which recognized the event
('TypeDesc', str), # Event type description ('TypeDesc', str), # Event type description
...@@ -266,8 +266,8 @@ def idea_ip_key(ip): ...@@ -266,8 +266,8 @@ def idea_ip_key(ip):
def gen_idea_from_ads(new_id, ads, orig_data, anonymised_target, add_test): def gen_idea_from_ads(new_id, ads, orig_data, anonymised_target, add_test):
lts = time.localtime() lts = time.gmtime()
ts = ads.get("Timestamp") or lts ts = ads.get("Detection time") or lts
ets = ads.get("FirstFlow") ets = ads.get("FirstFlow")
if ets and ets > ts: # ADS sometimes reports FirstFlow greater than DetectTime if ets and ets > ts: # ADS sometimes reports FirstFlow greater than DetectTime
ts = ets ts = ets
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment