Documentation
¶
Index ¶
- Variables
- func SFMetadataDecoder(raw json.RawMessage) (common.Getter, error)
- type Agent
- type AgentAllocator
- type EthMetric
- type IfMetric
- type OvsMetric
- type SFMetric
- func (sm *SFMetric) Add(m common.Metric) common.Metric
- func (sm *SFMetric) GetLast() int64
- func (sm *SFMetric) GetStart() int64
- func (sm *SFMetric) IsZero() bool
- func (sm *SFMetric) SetLast(last int64)
- func (sm *SFMetric) SetStart(start int64)
- func (sm *SFMetric) Split(cut int64) (common.Metric, common.Metric)
- func (sm *SFMetric) Sub(m common.Metric) common.Metric
- type SFlow
- type VlanMetric
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Agent ¶ added in v0.21.0
type Agent struct { common.RWMutex UUID string FlowTable *flow.Table Conn *net.UDPConn Addr string Port int BPFFilter string HeaderSize uint32 Graph *graph.Graph Node *graph.Node }
Agent describes SFlow agent probe
func NewAgent ¶ added in v0.21.0
func NewAgent(u string, conn *net.UDPConn, addr string, port int, ft *flow.Table, bpfFilter string, headerSize uint32, n *graph.Node, g *graph.Graph) *Agent
NewAgent creates a new sFlow agent which will populate the given flowtable
func (*Agent) GetTarget ¶ added in v0.21.0
GetTarget returns the current used connection
type AgentAllocator ¶ added in v0.21.0
AgentAllocator describes an SFlow agent allocator to manage multiple SFlow agent probe
func NewAgentAllocator ¶ added in v0.21.0
func NewAgentAllocator() (*AgentAllocator, error)
NewAgentAllocator creates a new sFlow agent allocator
func (*AgentAllocator) Alloc ¶ added in v0.21.0
func (a *AgentAllocator) Alloc(uuid string, ft *flow.Table, bpfFilter string, headerSize uint32, addr *common.ServiceAddress, n *graph.Node, g *graph.Graph) (*Agent, error)
Alloc allocates a new sFlow agent
func (*AgentAllocator) Release ¶ added in v0.21.0
func (a *AgentAllocator) Release(uuid string)
Release a sFlow agent
func (*AgentAllocator) ReleaseAll ¶ added in v0.21.0
func (a *AgentAllocator) ReleaseAll()
ReleaseAll sFlow agents
type EthMetric ¶ added in v0.23.0
type EthMetric struct { EthAlignmentErrors int64 `json:"EthAlignmentErrors,omitempty"` EthFCSErrors int64 `json:"EthFCSErrors,omitempty"` EthSingleCollisionFrames int64 `json:"EthSingleCollisionFrames,omitempty"` EthMultipleCollisionFrames int64 `json:"EthMultipleCollisionFrames,omitempty"` EthSQETestErrors int64 `json:"EthSQETestErrors,omitempty"` EthDeferredTransmissions int64 `json:"EthDeferredTransmissions,omitempty"` EthLateCollisions int64 `json:"EthLateCollisions,omitempty"` EthExcessiveCollisions int64 `json:"EthExcessiveCollisions,omitempty"` EthInternalMacReceiveErrors int64 `json:"EthInternalMacReceiveErrors,omitempty"` EthInternalMacTransmitErrors int64 `json:"EthInternalMacTransmitErrors,omitempty"` EthCarrierSenseErrors int64 `json:"EthCarrierSenseErrors,omitempty"` EthFrameTooLongs int64 `json:"EthFrameTooLongs,omitempty"` EthSymbolErrors int64 `json:"EthSymbolErrors,omitempty"` }
EthMetric the SFlow ethernet counters easyjson:json gendecoder
type IfMetric ¶ added in v0.23.0
type IfMetric struct { IfInOctets int64 `json:"IfInOctets,omitempty"` IfInUcastPkts int64 `json:"IfInUcastPkts,omitempty"` IfInMulticastPkts int64 `json:"IfInMulticastPkts,omitempty"` IfInBroadcastPkts int64 `json:"IfInBroadcastPkts,omitempty"` IfInDiscards int64 `json:"IfInDiscards,omitempty"` IfInErrors int64 `json:"IfInErrors,omitempty"` IfInUnknownProtos int64 `json:"IfInUnknownProtos,omitempty"` IfOutOctets int64 `json:"IfOutOctets,omitempty"` IfOutUcastPkts int64 `json:"IfOutUcastPkts,omitempty"` IfOutMulticastPkts int64 `json:"IfOutMulticastPkts,omitempty"` IfOutBroadcastPkts int64 `json:"IfOutBroadcastPkts,omitempty"` IfOutDiscards int64 `json:"IfOutDiscards,omitempty"` IfOutErrors int64 `json:"IfOutErrors,omitempty"` }
IfMetric the SFlow Interface counters easyjson:json gendecoder
type OvsMetric ¶ added in v0.23.0
type OvsMetric struct { OvsDpNHit int64 `json:"OvsDpNHit,omitempty"` OvsDpNMissed int64 `json:"OvsDpNMissed,omitempty"` OvsDpNLost int64 `json:"OvsDpNLost,omitempty"` OvsDpNMaskHit int64 `json:"OvsDpNMaskHit,omitempty"` OvsDpNFlows int64 `json:"OvsDpNFlows,omitempty"` OvsDpNMasks int64 `json:"OvsDpNMasks,omitempty"` OvsAppFdOpen int64 `json:"OvsAppFdOpen,omitempty"` OvsAppFdMax int64 `json:"OvsAppFdMax,omitempty"` OvsAppConnOpen int64 `json:"OvsAppConnOpen,omitempty"` OvsAppConnMax int64 `json:"OvsAppConnMax,omitempty"` OvsAppMemUsed int64 `json:"OvsAppMemUsed,omitempty"` OvsAppMemMax int64 `json:"OvsAppMemMax,omitempty"` }
OvsMetric the SFlow ovs counters easyjson:json gendecoder
type SFMetric ¶ added in v0.23.0
type SFMetric struct { IfMetric OvsMetric VlanMetric EthMetric Start int64 `json:"Start,omitempty"` Last int64 `json:"Last,omitempty"` }
SFMetric the SFlow Counter Samples easyjson:json gendecoder
func (*SFMetric) Add ¶ added in v0.23.0
Add sum two metrics and return a new Metrics object
func (*SFMetric) GetLast ¶ added in v0.23.0
GetLast returns last time
func (*SFMetric) GetStart ¶ added in v0.23.0
GetStart returns start time
func (*SFMetric) IsZero ¶ added in v0.23.0
IsZero returns true if all the values are equal to zero
func (*SFMetric) SetLast ¶ added in v0.23.0
SetLast set last tome
func (*SFMetric) SetStart ¶ added in v0.23.0
SetStart set start time
func (*SFMetric) Split ¶ added in v0.23.0
Split splits a metric into two parts
type SFlow ¶ added in v0.23.0
type SFlow struct { IfMetrics map[int64]*IfMetric `json:"IfMetrics,omitempty"` Metric *SFMetric `json:"Metric,omitempty"` LastUpdateMetric *SFMetric `json:"LastUpdateMetric,omitempty"` }
SFlow all sflow information easyjson:json gendecoder
type VlanMetric ¶ added in v0.23.0
type VlanMetric struct { VlanOctets int64 `json:"VlanOctets,omitempty"` VlanUcastPkts int64 `json:"VlanUcastPkts,omitempty"` VlanMulticastPkts int64 `json:"VlanMulticastPkts,omitempty"` VlanBroadcastPkts int64 `json:"VlanBroadcastPkts,omitempty"` VlanDiscards int64 `json:"VlanDiscards,omitempty"` }
VlanMetric the SFlow vlan counters easyjson:json gendecoder
Source Files
¶
- agent.go
- sflow.go