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

feat(inputs.mysql): Add support gather replica status #15748

Closed
1 task done
hungnt1 opened this issue Aug 16, 2024 · 0 comments · Fixed by #15749
Closed
1 task done

feat(inputs.mysql): Add support gather replica status #15748

hungnt1 opened this issue Aug 16, 2024 · 0 comments · Fixed by #15749
Labels
bug unexpected problem or unintended behavior

Comments

@hungnt1
Copy link
Contributor

hungnt1 commented Aug 16, 2024

Info

Due to from MYSQL 8.4 removed show slave status command and replace by show replica status command. this cause issue when collect from MYSQL 8.4 release and further.
More: https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-0.html#mysqld-8-4-0-deprecation-removal

Relevant telegraf.conf

[[inputs.mysql]]
  metric_version = 2
  gather_all_slave_channels = true
  servers = ['root:test@tcp(127.0.0.1:34306)/']
  gather_slave_status = true

Logs from Telegraf

2024-08-16T01:11:30Z E! [inputs.mysql] Error in plugin: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SLAVE STATUS' at line 1

System info

Telegraf 1.31.3 (git: HEAD@ecf94b12)

Docker

No response

Steps to reproduce

  1. Setup MYSQL 8.4 replication
  2. Enable collect slave status with option gather_slave_status
  3. Check log and see issue

Expected behavior

  • Have metric related replica in mysql 8.4 like
Replica_IO_Running
Replica_SQL_Running

Actual behavior

2024-08-16T01:11:30Z E! [inputs.mysql] Error in plugin: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SLAVE STATUS' at line 1

Additional info

No response

Tasks

  1. area/mysql feat plugin/input ready for final review
    DStrand1 powersj
@hungnt1 hungnt1 added the bug unexpected problem or unintended behavior label Aug 16, 2024
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 a pull request may close this issue.

1 participant