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 MySQL plugin not sending 0 value fields #1695

Merged
merged 1 commit into from
Sep 2, 2016

Conversation

caldwell
Copy link
Contributor

@caldwell caldwell commented Sep 1, 2016

We discovered that certain mysql booleans were only being written to our influxdb and cloudwatch outputs when they were true. This makes graphing difficult in grafana and alarms impossible in cloudwatch.

Looking at the code in parseValue(): In the case of "Yes" or "ON" the function returns value=1, ok=true, and in the case of "No" or "OFF" it returns value=0, ok=false. When ok is false, telegraf drops the field and doesn't report it. This appears to be a simple bug (which has been there since the parseValue() code was first committed).

This PR changes ok to true for false values so that they get written to the metrics outputs instead of dropped.

Required for all PRs:

  • CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • Sign CLA (if not already signed)

@sparrc
Copy link
Contributor

sparrc commented Sep 1, 2016

thanks @caldwell, update the changelog and I can merge

@nhaugo nhaugo added this to the 1.0.0 milestone Sep 1, 2016
@nhaugo nhaugo added the bug unexpected problem or unintended behavior label Sep 1, 2016
@caldwell
Copy link
Contributor Author

caldwell commented Sep 1, 2016

I amended the patch to update the changelog.

@sparrc sparrc merged commit 0f6d317 into influxdata:master Sep 2, 2016
jackzampolin pushed a commit that referenced this pull request Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants