Documentation ¶
Index ¶
Constants ¶
const ( Addr = "addr" // typically IPv4 Port = "port" Conntracked = "conntracked" Procspied = "procspied" ReverseDNSNames = "reverse_dns_names" SnoopedDNSNames = "snooped_dns_names" )
Node metadata keys.
Variables ¶
var IsConntrackSupported = func(procRoot string) error { procFile := filepath.Join(procRoot, procFileToCheck) _, err := os.Stat(procFile) return err }
IsConntrackSupported returns true if conntrack is suppported by the kernel
var SpyDuration = prometheus.NewSummaryVec( prometheus.SummaryOpts{ Namespace: "scope", Subsystem: "probe", Name: "spy_duration_seconds", Help: "Time in seconds spent spying on active connections.", MaxAge: 10 * time.Second, }, []string{}, )
SpyDuration is an exported prometheus metric
Functions ¶
This section is empty.
Types ¶
type DNSSnooper ¶ added in v1.0.0
type DNSSnooper struct {
// contains filtered or unexported fields
}
DNSSnooper is a snopper of DNS queries
func NewDNSSnooper ¶ added in v1.0.0
func NewDNSSnooper() (*DNSSnooper, error)
NewDNSSnooper creates a new snooper of DNS queries
func (*DNSSnooper) CachedNamesForIP ¶ added in v1.0.0
func (s *DNSSnooper) CachedNamesForIP(ip string) []string
CachedNamesForIP obtains the domains associated to an IP, obtained while snooping A-record queries
func (*DNSSnooper) Stop ¶ added in v1.0.0
func (s *DNSSnooper) Stop()
Stop makes the snooper stop inspecting DNS communications
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter generates Reports containing the Endpoint topology.
func NewReporter ¶
func NewReporter(conf ReporterConfig) *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.
type ReporterConfig ¶ added in v1.0.0
type ReporterConfig struct { HostID string HostName string SpyProcs bool UseConntrack bool WalkProc bool ProcRoot string BufferSize int Scanner procspy.ConnectionScanner DNSSnooper *DNSSnooper }
ReporterConfig are the config options for the endpoint reporter.