From a2b6174b490a8f3d857ece74dae46c7e49d8cd65 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Fri, 5 Apr 2024 17:53:24 -0600 Subject: [PATCH] fix typo --- check_mysql_connections.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check_mysql_connections.py b/check_mysql_connections.py index e330f3d..355e1b4 100644 --- a/check_mysql_connections.py +++ b/check_mysql_connections.py @@ -55,8 +55,8 @@ def main(args): 'value': active_connections, 'min': 0, 'max': max_connections, - 'warn': int(active_connections * warn_percent), - 'crit': int(active_connections * crit_percent) + 'warn': int(max_connections * warn_percent), + 'crit': int(max_connections * crit_percent) } } text_str = f'{active_connections}/{max_connections} ({active_connections_percent_str}%) of available connections used' @@ -66,8 +66,8 @@ def main(args): if __name__ == '__main__': parser = argparse.ArgumentParser(description='Check MySQL connections to a server.') parser.add_argument('--host', required=True, help='The IP of the MySQL server to connect to.') - parser.add_argument('--username', required=True, help='Username.') - parser.add_argument('--password', required=True, help='Password.') + parser.add_argument('--username', required=True, help='Username to connect with.') + parser.add_argument('--password', required=True, help='Password to connect with.') parser.add_argument('--warn-percent', default=50, type=int, help='Connections warning percentage. Default: 50%') parser.add_argument('--crit-percent', default=75, type=int, help='Connections critical percentage. Default: 75%') args = parser.parse_args()