Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(inputs.netflow): Fix field mappings #13325

Merged
merged 2 commits into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions plugins/inputs/netflow/netflow_decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ var fieldMappingsNetflowCommon = map[uint16][]fieldMapping{
53: {{"max_ttl", decodeUint}}, // MAX_TTL / maximumTTL
54: {{"fragment_id", decodeHex}}, // IPV4_IDENT / fragmentIdentification
55: {{"dst_tos", decodeHex}}, // DST_TOS / postIpClassOfService
56: {{"in_src_mac", decodeHex}}, // IN_SRC_MAC / sourceMacAddress
57: {{"out_dst_mac", decodeHex}}, // OUT_DST_MAC / postDestinationMacAddress
56: {{"in_src_mac", decodeMAC}}, // IN_SRC_MAC / sourceMacAddress
57: {{"out_dst_mac", decodeMAC}}, // OUT_DST_MAC / postDestinationMacAddress
58: {{"vlan_src", decodeUint}}, // SRC_VLAN / vlanId
59: {{"vlan_dst", decodeUint}}, // DST_VLAN / postVlanId
60: {{"ip_version", decodeIPVersion}}, // IP_PROTOCOL_VERSION / ipVersion
Expand All @@ -103,8 +103,8 @@ var fieldMappingsNetflowCommon = map[uint16][]fieldMapping{
77: {{"mpls_label_8", decodeHex}}, // MPLS_LABEL_8 / mplsLabelStackSection8
78: {{"mpls_label_9", decodeHex}}, // MPLS_LABEL_9 / mplsLabelStackSection9
79: {{"mpls_label_10", decodeHex}}, // MPLS_LABEL_10 / mplsLabelStackSection10
80: {{"in_dst_mac", decodeHex}}, // IN_DST_MAC / destinationMacAddress
81: {{"out_src_mac", decodeHex}}, // OUT_SRC_MAC / postSourceMacAddress
80: {{"in_dst_mac", decodeMAC}}, // IN_DST_MAC / destinationMacAddress
81: {{"out_src_mac", decodeMAC}}, // OUT_SRC_MAC / postSourceMacAddress
82: {{"interface", decodeString}}, // IF_NAME / interfaceName
83: {{"interface_desc", decodeString}}, // IF_DESC / interfaceDescription
84: {{"sampler_name", decodeString}}, // SAMPLER_NAME / samplerName
Expand Down Expand Up @@ -196,8 +196,8 @@ var fieldMappingsIPFIX = map[uint16][]fieldMapping{
// 148: common
149: {{"observation_domain_id", decodeUint}}, // observationDomainId
150: {{"flow_start", decodeUint}}, // flowStartSeconds
// 151 - 152: common
153: {{"flow_end_ms", decodeUint}}, // flowEndMilliseconds
151: {{"flow_end", decodeUint}}, // flowEndSeconds
// 152 - 153: common
154: {{"flow_start_us", decodeUint}}, // flowStartMicroseconds
155: {{"flow_end_us", decodeUint}}, // flowEndMicroseconds
156: {{"flow_start_ns", decodeUint}}, // flowStartNanoseconds
Expand Down Expand Up @@ -394,9 +394,9 @@ var fieldMappingsIPFIX = map[uint16][]fieldMapping{
362: {{"port_range_end", decodeUint}}, // portRangeEnd
363: {{"port_range_step_size", decodeUint}}, // portRangeStepSize
364: {{"port_range_ports", decodeUint}}, // portRangeNumPorts
365: {{"station_mac", decodeHex}}, // staMacAddress
365: {{"station_mac", decodeMAC}}, // staMacAddress
366: {{"station", decodeIP}}, // staIPv4Address
367: {{"wtp_mac", decodeHex}}, // wtpMacAddress
367: {{"wtp_mac", decodeMAC}}, // wtpMacAddress
368: {{"in_interface_type", decodeUint}}, // ingressInterfaceType
369: {{"out_interface_type", decodeUint}}, // egressInterfaceType
370: {{"rtp_seq_number", decodeUint}}, // rtpSequenceNumber
Expand Down