Skip to content

ROX-20713: Add log with connection details (External Entities in NWG) #8580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 16, 2023
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion sensor/common/networkflow/manager/manager_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"strconv"
"time"

"github.com/gogo/protobuf/types"
Expand Down Expand Up @@ -466,13 +467,22 @@ func (m *networkFlowManager) enrichConnection(conn *connection, status *connStat
}

if extSrc == nil {
// Fake a lookup result.
// Fake a lookup result. This shows "External Entities" in the network graph
lookupResults = []clusterentities.LookupResult{
{
Entity: networkgraph.InternetEntity(),
ContainerPorts: []uint16{port},
},
}
if conn.incoming {
log.Debugf("Incoming connection to container %s/%s from %q. "+
"Marking it as 'External Entities' in the network graph.",
container.Namespace, container.ContainerName, conn.remote.IPAndPort.String()+":"+strconv.Itoa(int(port)))
} else {
log.Debugf("Outgoing connection from container %s/%s to %q. "+
"Marking it as 'External Entities' in the network graph.",
container.Namespace, container.ContainerName, conn.remote.IPAndPort.String())
}
} else {
lookupResults = []clusterentities.LookupResult{
{
Expand Down