Skip to content

Commit

Permalink
Merge pull request #562 from yasin-cs-ko-ak/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankurk99 authored Oct 6, 2022
2 parents 9c120a7 + c1766e3 commit 542f5f6
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 542f5f6

Please sign in to comment.