-
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
Mysql input: Slave_IO_Running returns unexpected values in newer version (1.20+) #10697
Comments
I hope this will not be reverted back to integer. |
I agree with @ekk1; this breaks a basic use case with Prometheus/VictoriaMetrics by having the replication thread states returned as strings instead of integers now. I would like to see either a parameter added to revert back to integers for these fields, or have it return two fields; one with the string value, and another with the integer value like before. Either way this will help support both use cases, and not sacrifice one for the other. |
A million +1s to @scottnemes here -- This applies to any of the recent changes for metrics to send as strings from #9966 |
Using enum processor resolved this issue. Here's some sample config [[processors.enum]]
[[processors.enum.mapping]]
field = "slave_slave_io_running"
dest = "slave_slave_io_running_int"
default = 0
[processors.enum.mapping.value_mappings]
Yes = 1 The resulting metrics will be: There might be ways to override the original field, but this is enough for us now. |
Hi, Is there a simple way to set up a cluster to reproduce this? Does anyone have a docker-compose or something similar? |
Slave_IO_Running only has Yes, No and Connecting state. I think we can parse and mapping this value. I can add to task and do this. |
Relevant telegraf.conf
Logs from Telegraf
telegraf --test output
Current Version (tested on 1.21.4 ):
Previous Version ( tested on 1.18.2 ):
System info
Telegraf 1.21.4, Debian Buster
Docker
No response
Steps to reproduce
Expected behavior
In previous versions, the value of slave_slave_io_running and slave_slave_sql_running is Int, which is easy for prometheus to process.
Actual behavior
In telegraf output, the value of slave_slave_io_running and slave_slave_sql_running is now String, which is hard for prometheus to process.
Also it may break previously defined prometheus rules, like:
mysql_slave_slave_sql_running == 0
Which is also hard to discover.. since the metrics would simply disappear, not triggering any alert.
Additional info
I was wondering if it's possible to add a option to make metrics like slave_slave_io_running to be parsed as int, like previous versions.
The text was updated successfully, but these errors were encountered: