-
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(parsers.value): Add support for automatic fallback for numeric types #13506
Conversation
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 |
I'm a first time user of telegraf and influx and tried to get mqtt to work. I spent about 6 hours investigating why telegraf doesn't write any data, activated debug, much later also found the trace option, read all documentation back and forth, asked others, googled, reinstalled influx multiple times, it was really frustrating. |
@maf-soft sorry for the bad experience! The unfortunate truth is that the parameter value was not checked previously (also fixed with this commit)... Please apologize for the inconvenience and please also feel free to ask on our Slack channel or forum... |
This PR adds
auto_integer
andauto_float
options to the value parser. Those two options allow to fallback to string if the parsing into the numeric types fails. This is helpful when the data-source produces multiple streams with mixed numeric and string data such as subscriptions to multiple MQTT topics.