Details
-
Type:
Enhancement
-
Status: Resolved (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 26.2.2
-
Fix Version/s: 27.0.1
-
Component/s: Telemetry
-
Security Level: Default (Default Security Scheme)
-
Labels:None
-
HB Backlog Status:Backlog NG
Description
When using sFlow with OpenNMS, all incoming flow packets are unconditionally set to INGRESS by the sFlow adapter[1]. According to the sFlow mailing list [2], directionality in sFlow should be determined by comparing the data source ifIndex and the input and output ifIndexes in the packet. If the data source ifIndex and the input ifIndex (data observed on the input interface) are the same, it is an ingress packet. If they differ, (data observed on the output interface), it is an egress packet. IN JSON, this looks like:
{ "format" : "0:1", "data" : { "sequence_number" : { "$numberLong" : "1501407" }, "source_id" : { "$numberLong" : "2" }, "input" : { "$numberLong" : "2" }, "output" : { "$numberLong" : "23" } } //source_id == input_id == ingress flow
and
{ "format" : "0:1", "data" : { "sequence_number" : { "$numberLong" : "2773618" }, "source_id" : { "$numberLong" : "23" }, "input" : { "$numberLong" : "13" }, "output" : { "$numberLong" : "23" } } // source_id != input_id == egress flow
[1] https://github.com/OpenNMS/opennms/blob/develop/features/telemetry/protocols/sflow/adapter/src/main/java/org/opennms/netmgt/telemetry/protocols/sflow/adapter/SFlow.java#L95
[2] https://groups.google.com/g/sflow/c/IxHT3X4wTm0