-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(inputs.snmp): Hint to use source tag #14111
feat(inputs.snmp): Hint to use source tag #14111
Conversation
@Hipska while I love the PR, the issue is that you double the cardinality (at least for InfluxDB) users with this change. Can you please add an option to switch between the existing tag and the new |
The added tag isn't holding high cardinality, it is one of the values of the |
While it is not a potential source of lots of different values, it does affects a user's cardinality unnecessarily. Hence the request for a config value to opt-in to the change, rather than force this on users and tell them how to opt-out after they realize the change. |
Meaning this PR is useless, as you can opt-in with the The intention of this PR was to have a |
@Hipska what do you want to do with this PR then? Make it a doc change to suggest using "source" or close this? |
I still would like to deprecate the |
ok happy to see that, let us know when the PR is updated and ready for review again please |
It is already done.. |
Yes, but you have not changed anything with respect to our previous concerns around a new tag. |
Correct.
|
Thomas, I am not going to go around with you on this. Both Sven and I are in agreement that we are not making this change. As-is this PR will not be accepted. If you wish to still deprecate the option, that is fine, but any new option must be opt-in. |
Is it okay to have a warning in the log when the value of |
If you mark the |
Sorry, I wasn't clear enough. In that case the property wouldn't be deprecated anymore, as we cannot say it is deprecated and at the same time ask to set it to a specific value. So, I would do an |
@Hipska I agree that we need to only conditionally warn if the setting is not if s.AgentHostTag != "source" {
models.PrintOptionDeprecationNotice(telegraf.Warn, "inputs.snmp", "agent_host_tag", telegraf.DeprecationInfo{
Since: "1.29.0",
Notice: `should be set to "source" and will thus be removed`,
})
} which uses the deprecation-style and thus might trigger action while a usual warning will not... |
Indeed, it was something like this I was hinting at. I will use |
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Hipska!
Co-authored-by: Joshua Powers <powersj@fastmail.com>
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Think its OK the way it is, but its still incredibly confusing for the user. We got hit by it:
And had to look at this thread to understand why we are getting a deprecation for a DEFAULT value that we dont explicitly set. But I see it was the default default without setting it explicitly, so hard to find a good decision how to handle... but the docs could exaplain it better perhaps? This is quite confusing in the docs (without looking up more details elsewhere):
If agent_host_tag should be "source" and anything else is deprecated, then perhaps the deprecation should be for the entire agent_host_tag option that should get removed entirely in the future though? Instead of deprecating ANY value other than "source". Otherwise the deprecation warning will be kept forever if the option to set it to something different is kept? |
@Hr0bar a PR for an explanation in the README (or config) is welcome! |
Required for all PRs
Related to #8011 and #4413
Add hint to use the source tag to standardise the snmp input by marking others as deprecated.