Class SFlow
- java.lang.Object
-
- org.opennms.netmgt.telemetry.protocols.sflow.adapter.SFlow
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SFlow.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 java.lang.Long
getBytes()
Number of bytes transferred in the flow.java.lang.Long
getDeltaSwitched()
Unix timestamp in ms at which the previous exported packet associated with this flow was switched.Flow.Direction
getDirection()
Direction of the flow (egress vs ingress)java.lang.String
getDstAddr()
Destination address.java.util.Optional<java.lang.String>
getDstAddrHostname()
Destination address hostname.java.lang.Long
getDstAs()
Destination autonomous system (AS).java.lang.Integer
getDstMaskLen()
The number of contiguous bits in the source address subnet mask.java.lang.Integer
getDstPort()
Destination port.java.lang.Integer
getEngineId()
Slot number of the flow-switching engine.java.lang.Integer
getEngineType()
Type of flow-switching engine.java.lang.Long
getFirstSwitched()
Unix timestamp in ms at which the first packet associated with this flow was switched.int
getFlowRecords()
Number of flow records in the associated packet.long
getFlowSeqNum()
Flow packet sequence number.java.lang.Integer
getInputSnmp()
SNMP ifIndexjava.lang.Integer
getIpProtocolVersion()
IPv4 vs IPv6java.lang.Long
getLastSwitched()
Unix timestamp in ms at which the last packet associated with this flow was switched.Flow.NetflowVersion
getNetflowVersion()
Netfow versionjava.lang.String
getNextHop()
Next hopjava.util.Optional<java.lang.String>
getNextHopHostname()
Next hop hostnamejava.lang.String
getNodeIdentifier()
Method to get node lookup identifier.java.lang.Integer
getOutputSnmp()
SNMP ifIndexjava.lang.Long
getPackets()
Number of packets in the flowjava.lang.Integer
getProtocol()
IP protocol number i.e 6 for TCP, 17 for UDPlong
getReceivedAt()
Time at which the flow was received by listener in milliseconds since epoch UTC.Flow.SamplingAlgorithm
getSamplingAlgorithm()
Sampling algorithm IDjava.lang.Double
getSamplingInterval()
Sampling intervaljava.lang.String
getSrcAddr()
Source address.java.util.Optional<java.lang.String>
getSrcAddrHostname()
Source address hostname.java.lang.Long
getSrcAs()
Source autonomous system (AS).java.lang.Integer
getSrcMaskLen()
The number of contiguous bits in the destination address subnet mask.java.lang.Integer
getSrcPort()
Source port.java.lang.Integer
getTcpFlags()
TCP Flags.long
getTimestamp()
Flow timestamp in milliseconds.java.lang.Integer
getTos()
TOS.java.lang.Integer
getVlan()
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:Flow
Time at which the flow was received by listener in milliseconds since epoch UTC.- Specified by:
getReceivedAt
in interfaceFlow
-
getTimestamp
public long getTimestamp()
Description copied from interface:Flow
Flow timestamp in milliseconds.- Specified by:
getTimestamp
in interfaceFlow
-
getBytes
public java.lang.Long getBytes()
Description copied from interface:Flow
Number of bytes transferred in the flow.
-
getDirection
public Flow.Direction getDirection()
Description copied from interface:Flow
Direction of the flow (egress vs ingress)- Specified by:
getDirection
in interfaceFlow
-
getDstAddr
public java.lang.String getDstAddr()
Description copied from interface:Flow
Destination address.- Specified by:
getDstAddr
in interfaceFlow
-
getDstAddrHostname
public java.util.Optional<java.lang.String> getDstAddrHostname()
Description copied from interface:Flow
Destination address hostname.- Specified by:
getDstAddrHostname
in interfaceFlow
-
getDstAs
public java.lang.Long getDstAs()
Description copied from interface:Flow
Destination autonomous system (AS).
-
getDstMaskLen
public java.lang.Integer getDstMaskLen()
Description copied from interface:Flow
The number of contiguous bits in the source address subnet mask.- Specified by:
getDstMaskLen
in interfaceFlow
-
getDstPort
public java.lang.Integer getDstPort()
Description copied from interface:Flow
Destination port.- Specified by:
getDstPort
in interfaceFlow
-
getEngineId
public java.lang.Integer getEngineId()
Description copied from interface:Flow
Slot number of the flow-switching engine.- Specified by:
getEngineId
in interfaceFlow
-
getEngineType
public java.lang.Integer getEngineType()
Description copied from interface:Flow
Type of flow-switching engine.- Specified by:
getEngineType
in interfaceFlow
-
getFirstSwitched
public java.lang.Long getFirstSwitched()
Description copied from interface:Flow
Unix timestamp in ms at which the first packet associated with this flow was switched.- Specified by:
getFirstSwitched
in interfaceFlow
-
getLastSwitched
public java.lang.Long getLastSwitched()
Description copied from interface:Flow
Unix timestamp in ms at which the last packet associated with this flow was switched.- Specified by:
getLastSwitched
in interfaceFlow
-
getFlowRecords
public int getFlowRecords()
Description copied from interface:Flow
Number of flow records in the associated packet.- Specified by:
getFlowRecords
in interfaceFlow
-
getFlowSeqNum
public long getFlowSeqNum()
Description copied from interface:Flow
Flow packet sequence number.- Specified by:
getFlowSeqNum
in interfaceFlow
-
getInputSnmp
public java.lang.Integer getInputSnmp()
Description copied from interface:Flow
SNMP ifIndex- Specified by:
getInputSnmp
in interfaceFlow
-
getOutputSnmp
public java.lang.Integer getOutputSnmp()
Description copied from interface:Flow
SNMP ifIndex- Specified by:
getOutputSnmp
in interfaceFlow
-
getIpProtocolVersion
public java.lang.Integer getIpProtocolVersion()
Description copied from interface:Flow
IPv4 vs IPv6- Specified by:
getIpProtocolVersion
in interfaceFlow
-
getNextHop
public java.lang.String getNextHop()
Description copied from interface:Flow
Next hop- Specified by:
getNextHop
in interfaceFlow
-
getNextHopHostname
public java.util.Optional<java.lang.String> getNextHopHostname()
Description copied from interface:Flow
Next hop hostname- Specified by:
getNextHopHostname
in interfaceFlow
-
getPackets
public java.lang.Long getPackets()
Description copied from interface:Flow
Number of packets in the flow- Specified by:
getPackets
in interfaceFlow
-
getProtocol
public java.lang.Integer getProtocol()
Description copied from interface:Flow
IP protocol number i.e 6 for TCP, 17 for UDP- Specified by:
getProtocol
in interfaceFlow
-
getSamplingAlgorithm
public Flow.SamplingAlgorithm getSamplingAlgorithm()
Description copied from interface:Flow
Sampling algorithm ID- Specified by:
getSamplingAlgorithm
in interfaceFlow
-
getSamplingInterval
public java.lang.Double getSamplingInterval()
Description copied from interface:Flow
Sampling interval- Specified by:
getSamplingInterval
in interfaceFlow
-
getSrcAddr
public java.lang.String getSrcAddr()
Description copied from interface:Flow
Source address.- Specified by:
getSrcAddr
in interfaceFlow
-
getSrcAddrHostname
public java.util.Optional<java.lang.String> getSrcAddrHostname()
Description copied from interface:Flow
Source address hostname.- Specified by:
getSrcAddrHostname
in interfaceFlow
-
getSrcAs
public java.lang.Long getSrcAs()
Description copied from interface:Flow
Source autonomous system (AS).
-
getSrcMaskLen
public java.lang.Integer getSrcMaskLen()
Description copied from interface:Flow
The number of contiguous bits in the destination address subnet mask.- Specified by:
getSrcMaskLen
in interfaceFlow
-
getSrcPort
public java.lang.Integer getSrcPort()
Description copied from interface:Flow
Source port.- Specified by:
getSrcPort
in interfaceFlow
-
getTcpFlags
public java.lang.Integer getTcpFlags()
Description copied from interface:Flow
TCP Flags.- Specified by:
getTcpFlags
in interfaceFlow
-
getDeltaSwitched
public java.lang.Long getDeltaSwitched()
Description copied from interface:Flow
Unix timestamp in ms at which the previous exported packet associated with this flow was switched.- Specified by:
getDeltaSwitched
in interfaceFlow
-
getTos
public java.lang.Integer getTos()
Description copied from interface:Flow
TOS.
-
getNetflowVersion
public Flow.NetflowVersion getNetflowVersion()
Description copied from interface:Flow
Netfow version- Specified by:
getNetflowVersion
in interfaceFlow
-
getVlan
public java.lang.Integer getVlan()
Description copied from interface:Flow
VLAN ID.
-
getNodeIdentifier
public java.lang.String getNodeIdentifier()
Description copied from interface:Flow
Method 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:
getNodeIdentifier
in interfaceFlow
-
-