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(agent): only set default snmp after reading all configs #12457

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

powersj
Copy link
Contributor

@powersj powersj commented Jan 4, 2023

Currently the default snmp reader is set after reading every file. This can lead to unnecessary deprecation messages that do not make sense to the user. Instead, only set the default, deprecated snmp reader after all files are read in. This way the user is only notified of the deprecation if they actually choose to use that value in their config.

fixes: #12454

Currently the default snmp reader is set after reading every file. This
can lead to unnecessary deprecation messages that do not make sense to
the user. Instead, only set the default, deprecated snmp reader after
all files are read in. This way the user is only notified of the
deprecation if they actually choose to use that value in their config.

fixes: influxdata#12454
@Hipska Hipska 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 9, 2023
Copy link
Contributor

@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.

Looks good to me. Thanks @powersj for fixing this!

@srebhan srebhan merged commit 2604fb6 into influxdata:master Jan 10, 2023
@Hipska
Copy link
Contributor

Hipska commented Jan 10, 2023

What if the first loaded file has it set? Will you get the warning for each file after?

srebhan pushed a commit that referenced this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent area/snmp fix pr to fix corresponding bug 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.

Multiple config files gives bogus netsnmp deprecation warning if agent section isn't in first file read
3 participants