Skip to content

Conversation

mpeltekis
Copy link
Contributor

This PR introduces a new monitoring check for MySQL InnoDB Cluster.

@mpeltekis mpeltekis requested a review from zados September 11, 2025 08:38
@zados
Copy link
Member

zados commented Sep 15, 2025

  • Avoid passing passwords via --password, as CLI args are visible via ps. Using a config file (like .my.cnf) would be recommended. Environment variables are an alternative but are already considered deprecated.

  • L214: Returning [] on failure may mask errors and yield false OK states. Raise the exception (or wrap and re-raise with context) so the check fails loudly.

  • L347: Same issue. Also clarify whether cluster_name can legitimately be unknown. Is there any use case for that?

  • Use a context manager for the MySQL connection so resources are closed even on exceptions, and to set connect/read timeouts. Setting the timeouts will prevent the check from hanging.

Optional: Add type hints and brief docstrings for functions to clarify variables, types and exceptions.

@mpeltekis mpeltekis merged commit c283342 into master Sep 16, 2025
@mpeltekis mpeltekis deleted the mysql_innodbcluster branch September 16, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants