Documentation ¶
Index ¶
Constants ¶
View Source
const ( Addr = "addr" // typically IPv4 Port = "port" Conntracked = "conntracked" Procspied = "procspied" )
Node metadata keys.
Variables ¶
View Source
var ConntrackModulePresent = func() bool { f, err := os.Open(modules) if err != nil { return false } defer f.Close() scanner := bufio.NewScanner(f) for scanner.Scan() { line := scanner.Text() if strings.HasPrefix(line, conntrackModule) { return true } } if err := scanner.Err(); err != nil { log.Errorf("conntrack error: %v", err) } log.Errorf("conntrack: failed to find module %s", conntrackModule) return false }
ConntrackModulePresent returns true if the kernel has the conntrack module present. It is made public for mocking.
View Source
var SpyDuration = prometheus.NewSummaryVec( prometheus.SummaryOpts{ Namespace: "scope", Subsystem: "probe", Name: "spy_time_nanoseconds", Help: "Total time spent spying on active connections.", MaxAge: 10 * time.Second, }, []string{}, )
SpyDuration is an exported prometheus metric
Functions ¶
This section is empty.
Types ¶
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter generates Reports containing the Endpoint topology.
func NewReporter ¶
func NewReporter(hostID, hostName string, includeProcesses bool, useConntrack bool, scanner procspy.ConnectionScanner) *Reporter
NewReporter creates a new Reporter that invokes procspy.Connections to generate a report.Report that contains every discovered (spied) connection on the host machine, at the granularity of host and port. That information is stored in the Endpoint topology. It optionally enriches that topology with process (PID) information.
Click to show internal directories.
Click to hide internal directories.