@@ -64,7 +64,7 @@ def _get_last_used_ts(job_id):
64
64
65
65
def _get_current_max_ts ():
66
66
with get_db_cursor () as c :
67
- c .execute (f"SELECT MAX(ts) FROM { DB_PREFIX } flows ;" )
67
+ c .execute (f"SELECT MAX(ts) FROM { DB_PREFIX } flows2 ;" )
68
68
rec = c .fetchone ()
69
69
if rec is None :
70
70
return None
@@ -276,7 +276,7 @@ def get_traffic_for_entity(interval_label, last_used_ts, max_ts, time_between, d
276
276
f.{ 'input_snmp' if direction == DIRECTION_INGRESS else 'output_snmp' } ,
277
277
sum(f.in_bytes)
278
278
FROM
279
- { DB_PREFIX } flows "f"
279
+ { DB_PREFIX } flows2 "f"
280
280
WHERE
281
281
f.client_ip = %s AND
282
282
f.ts > %s AND
@@ -322,7 +322,7 @@ def get_top_N_IPs_for_entity_interfaces(interval_label, last_used_ts, max_ts, ti
322
322
SELECT
323
323
distinct(f.{ 'input_snmp' if direction == DIRECTION_INGRESS else 'output_snmp' } ) "interface_index"
324
324
FROM
325
- { DB_PREFIX } flows "f"
325
+ { DB_PREFIX } flows2 "f"
326
326
WHERE
327
327
f.client_ip = %s AND
328
328
f.ts > %s AND
@@ -336,7 +336,7 @@ def get_top_N_IPs_for_entity_interfaces(interval_label, last_used_ts, max_ts, ti
336
336
f.{ 'ipvX_src_addr' if direction == DIRECTION_INGRESS else 'ipvX_dst_addr' } ,
337
337
sum(f.in_bytes) "traffic"
338
338
FROM
339
- { DB_PREFIX } flows "f"
339
+ { DB_PREFIX } flows2 "f"
340
340
WHERE
341
341
f.client_ip = %s AND
342
342
f.ts > %s AND
@@ -370,7 +370,7 @@ def get_top_N_IPs_for_entity(interval_label, last_used_ts, max_ts, time_between,
370
370
f.{ 'ipvX_src_addr' if direction == DIRECTION_INGRESS else 'ipvX_dst_addr' } ,
371
371
sum(f.in_bytes) "traffic"
372
372
FROM
373
- { DB_PREFIX } flows "f"
373
+ { DB_PREFIX } flows2 "f"
374
374
WHERE
375
375
f.client_ip = %s AND
376
376
f.ts > %s AND
@@ -404,7 +404,7 @@ def get_top_N_protocols_for_entity_interfaces(interval_label, last_used_ts, max_
404
404
SELECT
405
405
distinct(f.{ 'input_snmp' if direction == DIRECTION_INGRESS else 'output_snmp' } ) "interface_index"
406
406
FROM
407
- { DB_PREFIX } flows "f"
407
+ { DB_PREFIX } flows2 "f"
408
408
WHERE
409
409
f.client_ip = %s AND
410
410
f.ts > %s AND
@@ -418,7 +418,7 @@ def get_top_N_protocols_for_entity_interfaces(interval_label, last_used_ts, max_
418
418
f.protocol,
419
419
sum(f.in_bytes) "traffic"
420
420
FROM
421
- { DB_PREFIX } flows "f"
421
+ { DB_PREFIX } flows2 "f"
422
422
WHERE
423
423
f.client_ip = %s AND
424
424
f.ts > %s AND
@@ -453,7 +453,7 @@ def get_top_N_protocols_for_entity(interval_label, last_used_ts, max_ts, time_be
453
453
f.protocol,
454
454
sum(f.in_bytes) "traffic"
455
455
FROM
456
- { DB_PREFIX } flows "f"
456
+ { DB_PREFIX } flows2 "f"
457
457
WHERE
458
458
f.client_ip = %s AND
459
459
f.ts > %s AND
@@ -487,7 +487,7 @@ def get_top_N_connections_for_entity(interval_label, last_used_ts, max_ts, time_
487
487
f.ipvX_src_addr, f.ipvX_dst_addr,
488
488
sum(f.in_bytes) "traffic"
489
489
FROM
490
- { DB_PREFIX } flows "f"
490
+ { DB_PREFIX } flows2 "f"
491
491
WHERE
492
492
f.client_ip = %s AND
493
493
f.ts > %s AND
@@ -520,7 +520,7 @@ def get_top_N_connections_for_entity(interval_label, last_used_ts, max_ts, time_
520
520
# f.PROTOCOL,
521
521
# sum(f.IN_BYTES) "traffic"
522
522
# FROM
523
- # {DB_PREFIX}flows "f"
523
+ # {DB_PREFIX}flows2 "f"
524
524
# WHERE
525
525
# f.ts >= %s AND
526
526
# f.ts < %s AND
0 commit comments