Documentation
¶
Overview ¶
Package collector implements the vanflow event listener that backs the network console collector. It contains a Collector responsible for orchestrating collection of vanflow records from remote sources into a vanflow Store as well as several controllers responsible for reacting to records to add inferred records and context into the Store.
Index ¶
- Constants
- func RecordIndexers() map[string]store.Indexer
- func RoutingKeyID(address, protocol string) string
- func SiteHostID(site, host string) string
- type Address
- type AddressRecord
- type Collector
- type ConnectionRecord
- type Connector
- type FlowSourceRecord
- type Graph
- type Link
- type Listener
- type NamedReference
- type Node
- type ProcGroupPairRecord
- type ProcPairRecord
- type Process
- type ProcessGroupRecord
- type RequestRecord
- type Router
- type RouterAccess
- type RoutingKey
- type Site
- type SiteHost
- type SitePairRecord
Constants ¶
const ( IndexByTypeParent = "ByTypeAndParent" IndexByAddress = "ByAddress" IndexByParentHost = "ByParentHost" IndexByLifecycleStatus = "ByLifecycleStatus" IndexByTypeName = "ByTypeAndName" IndexFlowByAddress = "ByTypeAndAddress" )
Variables ¶
This section is empty.
Functions ¶
func RecordIndexers ¶
func RoutingKeyID ¶
func SiteHostID ¶
Types ¶
type Address ¶
type Address struct {
// contains filtered or unexported fields
}
func (Address) GetRecord ¶
func (n Address) GetRecord() (record AddressRecord, found bool)
func (Address) RoutingKey ¶
func (n Address) RoutingKey() RoutingKey
type AddressRecord ¶
func (AddressRecord) GetTypeMeta ¶
func (r AddressRecord) GetTypeMeta() vanflow.TypeMeta
func (AddressRecord) Identity ¶
func (r AddressRecord) Identity() string
type Collector ¶
func New ¶
func New(logger *slog.Logger, factory session.ContainerFactory, reg *prometheus.Registry, flowRecordTTL time.Duration, flowLogger func(vanflow.RecordMessage)) *Collector
type ConnectionRecord ¶
type ConnectionRecord struct { ID string StartTime time.Time EndTime time.Time Connector NamedReference RoutingKey string Protocol string ConnectorHost string ConnectorPort string Listener NamedReference Source NamedReference Dest NamedReference SourceSite NamedReference DestSite NamedReference SourceGroup NamedReference DestGroup NamedReference SourceRouter NamedReference DestRouter NamedReference // FlowStore is the backing store containing the Biflow records. This was // split from the main record store to keep high volume flow producers from // affecting the rest of the event sources. FlowStore store.Interface // contains filtered or unexported fields }
func (*ConnectionRecord) GetFlow ¶
func (cr *ConnectionRecord) GetFlow() (vanflow.TransportBiflowRecord, bool)
func (ConnectionRecord) GetTypeMeta ¶
func (r ConnectionRecord) GetTypeMeta() vanflow.TypeMeta
func (ConnectionRecord) Identity ¶
func (r ConnectionRecord) Identity() string
type FlowSourceRecord ¶
func (FlowSourceRecord) GetTypeMeta ¶
func (r FlowSourceRecord) GetTypeMeta() vanflow.TypeMeta
func (FlowSourceRecord) Identity ¶
func (r FlowSourceRecord) Identity() string
type Graph ¶
type Graph interface { Address(id string) Address Connector(id string) Connector SiteHost(id string) SiteHost Link(id string) Link Listener(id string) Listener Process(id string) Process RouterAccess(id string) RouterAccess Site(id string) Site }
Graph exposes more complex relations between record types than can be represented by store indexes and is more concice than would be possible fetching each individual record from a store along a chain of relations.
Each node type has a set of exposed relations, none of which are guaranteed to exist or be present in the backing store. To keep error checking to a minimum, all relations will return a valid node regardless if the relation exists or is present in the store. As an example, with an empty graph `graph.Link("doesnotexist").Parent().Parent() will return a Site node, but calling Get() on that node will return false.
type Link ¶
type Link struct {
// contains filtered or unexported fields
}
func (Link) Peer ¶
func (n Link) Peer() RouterAccess
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
type NamedReference ¶
type ProcGroupPairRecord ¶
type ProcGroupPairRecord struct { ID string Protocol string Source string SourceName string Dest string DestName string Start time.Time }
func (ProcGroupPairRecord) GetTypeMeta ¶
func (r ProcGroupPairRecord) GetTypeMeta() vanflow.TypeMeta
func (ProcGroupPairRecord) Identity ¶
func (r ProcGroupPairRecord) Identity() string
type ProcPairRecord ¶
func (ProcPairRecord) GetTypeMeta ¶
func (r ProcPairRecord) GetTypeMeta() vanflow.TypeMeta
func (ProcPairRecord) Identity ¶
func (r ProcPairRecord) Identity() string
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func (Process) Connectors ¶
type ProcessGroupRecord ¶
func (ProcessGroupRecord) GetTypeMeta ¶
func (r ProcessGroupRecord) GetTypeMeta() vanflow.TypeMeta
func (ProcessGroupRecord) Identity ¶
func (r ProcessGroupRecord) Identity() string
type RequestRecord ¶
type RequestRecord struct { ID string TransportID string StartTime time.Time EndTime time.Time RoutingKey string Protocol string Connector NamedReference Listener NamedReference Source NamedReference Dest NamedReference SourceSite NamedReference SourceRouter NamedReference DestSite NamedReference DestRouter NamedReference SourceGroup NamedReference DestGroup NamedReference Trace string // contains filtered or unexported fields }
func (*RequestRecord) GetFlow ¶
func (cr *RequestRecord) GetFlow() (vanflow.AppBiflowRecord, bool)
func (*RequestRecord) GetTransport ¶
func (cr *RequestRecord) GetTransport() (vanflow.TransportBiflowRecord, bool)
func (RequestRecord) GetTypeMeta ¶
func (r RequestRecord) GetTypeMeta() vanflow.TypeMeta
func (RequestRecord) Identity ¶
func (r RequestRecord) Identity() string
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (Router) Connectors ¶
type RouterAccess ¶
type RouterAccess struct {
// contains filtered or unexported fields
}
func (RouterAccess) Parent ¶
func (n RouterAccess) Parent() Router
func (RouterAccess) Peers ¶
func (n RouterAccess) Peers() []Link
type RoutingKey ¶
type RoutingKey struct {
// contains filtered or unexported fields
}
func (RoutingKey) Connectors ¶
func (n RoutingKey) Connectors() []Connector
func (RoutingKey) Listeners ¶
func (n RoutingKey) Listeners() []Listener
func (RoutingKey) Parent ¶
func (n RoutingKey) Parent() Address
type Site ¶
type Site struct {
// contains filtered or unexported fields
}
func (Site) RouterAccess ¶
func (n Site) RouterAccess() []RouterAccess
type SiteHost ¶
type SiteHost struct {
// contains filtered or unexported fields
}
SiteHost references a siteID+Host combo. Serves as a relation between network traffic and processes.
func (SiteHost) Connectors ¶
type SitePairRecord ¶
func (SitePairRecord) GetTypeMeta ¶
func (r SitePairRecord) GetTypeMeta() vanflow.TypeMeta
func (SitePairRecord) Identity ¶
func (r SitePairRecord) Identity() string