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.snmp): Translate field correctly when not in table #15618

Merged

Conversation

Hipska
Copy link
Contributor

@Hipska Hipska commented Jul 11, 2024

Summary

Apparently, the translate option for a field in the SNMP input only worked in a inputs.snmp.table.field and not in a inputs.snmp.field.

Checklist

  • No AI generated code was used in this PR

Related issues

Fixes #15617

@telegraf-tiger telegraf-tiger bot added area/snmp fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jul 11, 2024
@Hipska Hipska changed the title fix(inputs.snmp): Field translate didn't work on when not in table fix(inputs.snmp): Field translate when not in table Jul 11, 2024
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.

Awesome @Hipska! Thanks!

@srebhan srebhan 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 Jul 12, 2024
@srebhan srebhan changed the title fix(inputs.snmp): Field translate when not in table fix(inputs.snmp): Translate field correctly when not in table Jul 12, 2024
@Hipska Hipska marked this pull request as draft July 12, 2024 12:51
@Hipska
Copy link
Contributor Author

Hipska commented Jul 12, 2024

Actually, the Field.Translate option should get deprecated in favour of a new Field.Conversion option to translate OID's.

// Translate tells if the value of the field should be snmptranslated
Translate bool

@Hipska Hipska marked this pull request as ready for review July 12, 2024 13:19
@telegraf-tiger
Copy link
Contributor

@Hipska Hipska requested a review from srebhan July 12, 2024 15:23
@DStrand1 DStrand1 assigned srebhan and unassigned DStrand1 Jul 12, 2024
@srebhan
Copy link
Member

srebhan commented Jul 15, 2024

Actually, the Field.Translate option should get deprecated in favour of a new Field.Conversion option to translate OID's.

// Translate tells if the value of the field should be snmptranslated
Translate bool

@Hipska what would be different for the new option? Do we need to hold-back this fix for the deprecation?

@Hipska
Copy link
Contributor Author

Hipska commented Jul 15, 2024

No, the deprecation can be done in another PR. I was just expressing my opinion about this similar looking option (as it also does do a conversion)

@powersj powersj merged commit 9297d77 into influxdata:master Jul 15, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.31.2 milestone Jul 15, 2024
@Hipska Hipska deleted the fix/inputs/snmp/field_translate branch July 15, 2024 13:57
powersj pushed a commit that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/snmp 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.

Translate option isn’t working
4 participants