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): Ensure type consistency for sFlow's IP version field #16403

Merged
merged 6 commits into from
Jan 17, 2025

Conversation

joseluisgonzalezca
Copy link
Contributor

@joseluisgonzalezca joseluisgonzalezca commented Jan 15, 2025

Summary

This PR resolves the inconsistency with ip_version field in netflow metrics when using the sFlow V5 decoder. Version is received as a number (4 or 6), which will be converted to "IPv4" or "IPv6" respectively. Existing decodeSflowIPVersion function was not enough for this case so I have created a new one to handle the conversion.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16402

@joseluisgonzalezca joseluisgonzalezca changed the title inputs.netflow: fix inconsistent IP version field in sFlow decoder #16402 fix(inputs.netflow): fix inconsistent IP version field in sFlow decoder #16402 Jan 15, 2025
@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jan 15, 2025
@DStrand1 DStrand1 added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jan 16, 2025
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joseluisgonzalezca thanks for the fix! Could you please add an Important Changes section to the CHANGELOG.md file describing that the field-type changes when decoding raw frames!?

@joseluisgonzalezca
Copy link
Contributor Author

Sure! I have just submitted a commit with the required information. I've set the version to 1.33.2 because I have seen it in the milestones section. Feel free to reach me again if it's not correct.

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joseluisgonzalezca I added some suggestion on the Changelog entry. Could you please also check the 80-column limit in that file!?!

CHANGELOG.md Outdated Show resolved Hide resolved
@srebhan srebhan changed the title fix(inputs.netflow): fix inconsistent IP version field in sFlow decoder #16402 fix(inputs.netflow): fEnsure type consistency for sFlow's IP version field Jan 17, 2025
@srebhan srebhan changed the title fix(inputs.netflow): fEnsure type consistency for sFlow's IP version field fix(inputs.netflow): Ensure type consistency for sFlow's IP version field Jan 17, 2025
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srebhan srebhan merged commit 4905e9f into influxdata:master Jan 17, 2025
27 checks passed
@github-actions github-actions bot added this to the v1.33.2 milestone Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inputs.netflow: Inconsistent IP version field in sFlow decoder
4 participants