Class SFlow
- java.lang.Object
-
- org.opennms.netmgt.telemetry.protocols.sflow.adapter.SFlow
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSFlow.Header-
Nested classes/interfaces inherited from interface org.opennms.netmgt.flows.api.Flow
Flow.Direction, Flow.NetflowVersion, Flow.SamplingAlgorithm
-
-
Field Summary
-
Fields inherited from interface org.opennms.netmgt.flows.api.Flow
IPV4_PROTOCOL_VERSION, IPV6_PROTOCOL_VERSION
-
-
Constructor Summary
Constructors Constructor Description SFlow(SFlow.Header header, org.bson.BsonDocument document, java.time.Instant receivedAt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LonggetBytes()Number of bytes transferred in the flow.LonggetDeltaSwitched()Unix timestamp in ms at which the previous exported packet associated with this flow was switched.Flow.DirectiongetDirection()Direction of the flow (egress vs ingress)StringgetDstAddr()Destination address.Optional<String>getDstAddrHostname()Destination address hostname.LonggetDstAs()Destination autonomous system (AS).IntegergetDstMaskLen()The number of contiguous bits in the source address subnet mask.IntegergetDstPort()Destination port.IntegergetEngineId()Slot number of the flow-switching engine.IntegergetEngineType()Type of flow-switching engine.LonggetFirstSwitched()Unix timestamp in ms at which the first packet associated with this flow was switched.intgetFlowRecords()Number of flow records in the associated packet.longgetFlowSeqNum()Flow packet sequence number.IntegergetInputSnmp()SNMP ifIndexIntegergetIpProtocolVersion()IPv4 vs IPv6LonggetLastSwitched()Unix timestamp in ms at which the last packet associated with this flow was switched.Flow.NetflowVersiongetNetflowVersion()Netfow versionStringgetNextHop()Next hopOptional<String>getNextHopHostname()Next hop hostnameStringgetNodeIdentifier()Method to get node lookup identifier.IntegergetOutputSnmp()SNMP ifIndexLonggetPackets()Number of packets in the flowIntegergetProtocol()IP protocol number i.e 6 for TCP, 17 for UDPlonggetReceivedAt()Time at which the flow was received by listener in milliseconds since epoch UTC.Flow.SamplingAlgorithmgetSamplingAlgorithm()Sampling algorithm IDDoublegetSamplingInterval()Sampling intervalStringgetSrcAddr()Source address.Optional<String>getSrcAddrHostname()Source address hostname.LonggetSrcAs()Source autonomous system (AS).IntegergetSrcMaskLen()The number of contiguous bits in the destination address subnet mask.IntegergetSrcPort()Source port.IntegergetTcpFlags()TCP Flags.longgetTimestamp()Flow timestamp in milliseconds.IntegergetTos()TOS.IntegergetVlan()VLAN ID.
-
-
-
Constructor Detail
-
SFlow
public SFlow(SFlow.Header header, org.bson.BsonDocument document, java.time.Instant receivedAt)
-
-
Method Detail
-
getReceivedAt
public long getReceivedAt()
Description copied from interface:FlowTime at which the flow was received by listener in milliseconds since epoch UTC.- Specified by:
getReceivedAtin interfaceFlow
-
getTimestamp
public long getTimestamp()
Description copied from interface:FlowFlow timestamp in milliseconds.- Specified by:
getTimestampin interfaceFlow
-
getBytes
public Long getBytes()
Description copied from interface:FlowNumber of bytes transferred in the flow.
-
getDirection
public Flow.Direction getDirection()
Description copied from interface:FlowDirection of the flow (egress vs ingress)- Specified by:
getDirectionin interfaceFlow
-
getDstAddr
public String getDstAddr()
Description copied from interface:FlowDestination address.- Specified by:
getDstAddrin interfaceFlow
-
getDstAddrHostname
public Optional<String> getDstAddrHostname()
Description copied from interface:FlowDestination address hostname.- Specified by:
getDstAddrHostnamein interfaceFlow
-
getDstAs
public Long getDstAs()
Description copied from interface:FlowDestination autonomous system (AS).
-
getDstMaskLen
public Integer getDstMaskLen()
Description copied from interface:FlowThe number of contiguous bits in the source address subnet mask.- Specified by:
getDstMaskLenin interfaceFlow
-
getDstPort
public Integer getDstPort()
Description copied from interface:FlowDestination port.- Specified by:
getDstPortin interfaceFlow
-
getEngineId
public Integer getEngineId()
Description copied from interface:FlowSlot number of the flow-switching engine.- Specified by:
getEngineIdin interfaceFlow
-
getEngineType
public Integer getEngineType()
Description copied from interface:FlowType of flow-switching engine.- Specified by:
getEngineTypein interfaceFlow
-
getFirstSwitched
public Long getFirstSwitched()
Description copied from interface:FlowUnix timestamp in ms at which the first packet associated with this flow was switched.- Specified by:
getFirstSwitchedin interfaceFlow
-
getLastSwitched
public Long getLastSwitched()
Description copied from interface:FlowUnix timestamp in ms at which the last packet associated with this flow was switched.- Specified by:
getLastSwitchedin interfaceFlow
-
getFlowRecords
public int getFlowRecords()
Description copied from interface:FlowNumber of flow records in the associated packet.- Specified by:
getFlowRecordsin interfaceFlow
-
getFlowSeqNum
public long getFlowSeqNum()
Description copied from interface:FlowFlow packet sequence number.- Specified by:
getFlowSeqNumin interfaceFlow
-
getInputSnmp
public Integer getInputSnmp()
Description copied from interface:FlowSNMP ifIndex- Specified by:
getInputSnmpin interfaceFlow
-
getOutputSnmp
public Integer getOutputSnmp()
Description copied from interface:FlowSNMP ifIndex- Specified by:
getOutputSnmpin interfaceFlow
-
getIpProtocolVersion
public Integer getIpProtocolVersion()
Description copied from interface:FlowIPv4 vs IPv6- Specified by:
getIpProtocolVersionin interfaceFlow
-
getNextHop
public String getNextHop()
Description copied from interface:FlowNext hop- Specified by:
getNextHopin interfaceFlow
-
getNextHopHostname
public Optional<String> getNextHopHostname()
Description copied from interface:FlowNext hop hostname- Specified by:
getNextHopHostnamein interfaceFlow
-
getPackets
public Long getPackets()
Description copied from interface:FlowNumber of packets in the flow- Specified by:
getPacketsin interfaceFlow
-
getProtocol
public Integer getProtocol()
Description copied from interface:FlowIP protocol number i.e 6 for TCP, 17 for UDP- Specified by:
getProtocolin interfaceFlow
-
getSamplingAlgorithm
public Flow.SamplingAlgorithm getSamplingAlgorithm()
Description copied from interface:FlowSampling algorithm ID- Specified by:
getSamplingAlgorithmin interfaceFlow
-
getSamplingInterval
public Double getSamplingInterval()
Description copied from interface:FlowSampling interval- Specified by:
getSamplingIntervalin interfaceFlow
-
getSrcAddr
public String getSrcAddr()
Description copied from interface:FlowSource address.- Specified by:
getSrcAddrin interfaceFlow
-
getSrcAddrHostname
public Optional<String> getSrcAddrHostname()
Description copied from interface:FlowSource address hostname.- Specified by:
getSrcAddrHostnamein interfaceFlow
-
getSrcAs
public Long getSrcAs()
Description copied from interface:FlowSource autonomous system (AS).
-
getSrcMaskLen
public Integer getSrcMaskLen()
Description copied from interface:FlowThe number of contiguous bits in the destination address subnet mask.- Specified by:
getSrcMaskLenin interfaceFlow
-
getSrcPort
public Integer getSrcPort()
Description copied from interface:FlowSource port.- Specified by:
getSrcPortin interfaceFlow
-
getTcpFlags
public Integer getTcpFlags()
Description copied from interface:FlowTCP Flags.- Specified by:
getTcpFlagsin interfaceFlow
-
getDeltaSwitched
public Long getDeltaSwitched()
Description copied from interface:FlowUnix timestamp in ms at which the previous exported packet associated with this flow was switched.- Specified by:
getDeltaSwitchedin interfaceFlow
-
getNetflowVersion
public Flow.NetflowVersion getNetflowVersion()
Description copied from interface:FlowNetfow version- Specified by:
getNetflowVersionin interfaceFlow
-
getNodeIdentifier
public String getNodeIdentifier()
Description copied from interface:FlowMethod to get node lookup identifier. This field can be used as an alternate means to identify the exporter node when the source address of the packets are altered due to address translation. * @return the identifier- Specified by:
getNodeIdentifierin interfaceFlow
-
-