Skip to content

Commit

Permalink
UpdatedTime Issues Fixed
Browse files Browse the repository at this point in the history
UpdatedTime Issues Fixed
  • Loading branch information
yasin-cs-ko-ak committed Oct 6, 2022
1 parent 9c120a7 commit c1766e3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/observability/kubearmor.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,13 @@ func fetchSysServerConnDetail(log types.KubeArmorLog) (types.SysObsNwData, error
if strings.Contains(log.Data, "tcp_connect") || strings.Contains(log.Data, "SYS_CONNECT") {
conn.InOut = "OUT"
conn.Count++
conn.UpdatedTime = time.UnixDate
t := time.Unix(log.UpdatedTime, 0)
conn.UpdatedTime = t.Format(time.UnixDate)
} else if strings.Contains(log.Data, "tcp_accept") || strings.Contains(log.Data, "SYS_ACCEPT") {
conn.InOut = "IN"
conn.Count++
conn.UpdatedTime = time.UnixDate
t := time.Unix(log.UpdatedTime, 0)
conn.UpdatedTime = t.Format(time.UnixDate)
} else {
return types.SysObsNwData{}, err
}
Expand Down

0 comments on commit c1766e3

Please sign in to comment.