diff --git a/api/methods/report.go b/api/methods/report.go index c359a84..a52681a 100644 --- a/api/methods/report.go +++ b/api/methods/report.go @@ -296,6 +296,8 @@ func UpdateDpiStats(c *gin.Context) { logs.Logs.Println("[WARN][DPISTATS] skipping invalid object") continue } + logs.Logs.Println("Received timestamp: ", dpi.Timestamp) + logs.Logs.Println("Converted timestamp: ", time.Unix(dpi.Timestamp, 0)) batch.Queue("INSERT INTO dpi_stats (time, unit_id, client_address, client_name, protocol, host, application, bytes) VALUES ($1, $2, $3, $4, $5, $6, $7, $8) ON CONFLICT (time, unit_id, client_address, protocol, host, application) DO UPDATE SET bytes = EXCLUDED.bytes", time.Unix(dpi.Timestamp, 0), unit_id, dpi.ClientAddress, dpi.ClientName, dpi.Protocol, dpi.Host, dpi.Application, dpi.Bytes) } if batch.Len() != 0 {