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

Wrong type for MySQL enum variables with OFF value #7421

Closed
fxedel opened this issue Apr 28, 2020 · 2 comments
Closed

Wrong type for MySQL enum variables with OFF value #7421

fxedel opened this issue Apr 28, 2020 · 2 comments

Comments

@fxedel
Copy link
Contributor

fxedel commented Apr 28, 2020

Relevant telegraf.conf:

[[inputs.mysql]]
  servers = ["..."]
  metric_version = 2
  interval_slow = "0s"
  # ...

System info:

Telegraf 1.14.0 (git: HEAD fefd7ff)
Debian GNU/Linux 9 (stretch)

Description

Some MySQL variables, like transaction_write_set_extraction, allow for multiple string values including OFF, e.g.: OFF, MURMUR32 or XXHASH64.

I expected these variables to be gathered as string, however, the Off value is converted to the integer 0 in ParseValue. This conversion is good for simple On/Off variables, but doesn't fit for enumerations like transaction_write_set_extraction as it produces errors like these:

2020-04-28T08:35:30Z E! [outputs.influxdb] When writing to [https://...:8086]: received error partial write: field type conflict: input field "transaction_write_set_extraction" on measurement "mysql_variables" is type string, already exists as type integer dropped=3; discarding points

Proposed fix

I don't know what the best solution would be; maybe a hardcoded list of variables that should parse On/Off as string?

@sjwang90 sjwang90 added area/mysql support Telegraf questions, may be directed to community site or slack labels Nov 17, 2020
@telegraf-tiger
Copy link
Contributor

Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Page. Thank you!

fxedel added a commit to fxedel/telegraf that referenced this issue Jun 21, 2021
fxedel added a commit to fxedel/telegraf that referenced this issue Jun 21, 2021
@sspaink sspaink removed the support Telegraf questions, may be directed to community site or slack label Jul 1, 2021
@sspaink sspaink reopened this Jul 1, 2021
@fxedel
Copy link
Contributor Author

fxedel commented Oct 20, 2021

Fixed with #9403

@fxedel fxedel closed this as completed Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants