diff options
Diffstat (limited to 'plugins/check_mysql.c')
-rw-r--r-- | plugins/check_mysql.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 6a7daf1..8a73772 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * License: GPL | 5 | * License: GPL |
6 | * Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at) | 6 | * Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at) |
7 | * Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net) | 7 | * Copyright (c) 2000 Karl DeBisschop (kdebisschop@users.sourceforge.net) |
8 | * Copyright (c) 1999-2011 Monitoring Plugins Development Team | 8 | * Copyright (c) 1999-2024 Monitoring Plugins Development Team |
9 | * | 9 | * |
10 | * Description: | 10 | * Description: |
11 | * | 11 | * |
@@ -31,7 +31,7 @@ | |||
31 | *****************************************************************************/ | 31 | *****************************************************************************/ |
32 | 32 | ||
33 | const char *progname = "check_mysql"; | 33 | const char *progname = "check_mysql"; |
34 | const char *copyright = "1999-2011"; | 34 | const char *copyright = "1999-2024"; |
35 | const char *email = "devel@monitoring-plugins.org"; | 35 | const char *email = "devel@monitoring-plugins.org"; |
36 | 36 | ||
37 | #define SLAVERESULTSIZE 96 | 37 | #define SLAVERESULTSIZE 96 |
@@ -45,23 +45,23 @@ const char *email = "devel@monitoring-plugins.org"; | |||
45 | #include <mysqld_error.h> | 45 | #include <mysqld_error.h> |
46 | #include <errmsg.h> | 46 | #include <errmsg.h> |
47 | 47 | ||
48 | char *db_user = NULL; | 48 | static char *db_user = NULL; |
49 | char *db_host = NULL; | 49 | static char *db_host = NULL; |
50 | char *db_socket = NULL; | 50 | static char *db_socket = NULL; |
51 | char *db_pass = NULL; | 51 | static char *db_pass = NULL; |
52 | char *db = NULL; | 52 | static char *db = NULL; |
53 | char *ca_cert = NULL; | 53 | static char *ca_cert = NULL; |
54 | char *ca_dir = NULL; | 54 | static char *ca_dir = NULL; |
55 | char *cert = NULL; | 55 | static char *cert = NULL; |
56 | char *key = NULL; | 56 | static char *key = NULL; |
57 | char *ciphers = NULL; | 57 | static char *ciphers = NULL; |
58 | bool ssl = false; | 58 | static bool ssl = false; |
59 | char *opt_file = NULL; | 59 | static char *opt_file = NULL; |
60 | char *opt_group = NULL; | 60 | static char *opt_group = NULL; |
61 | unsigned int db_port = MYSQL_PORT; | 61 | static unsigned int db_port = MYSQL_PORT; |
62 | int check_slave = 0, warn_sec = 0, crit_sec = 0; | 62 | static bool check_slave = false; |
63 | int ignore_auth = 0; | 63 | static bool ignore_auth = false; |
64 | int verbose = 0; | 64 | static int verbose = 0; |
65 | 65 | ||
66 | static double warning_time = 0; | 66 | static double warning_time = 0; |
67 | static double critical_time = 0; | 67 | static double critical_time = 0; |
@@ -91,11 +91,11 @@ static const char *metric_counter[LENGTH_METRIC_COUNTER] = { | |||
91 | 91 | ||
92 | #define MYSQLDUMP_THREADS_QUERY "SELECT COUNT(1) mysqldumpThreads FROM information_schema.processlist WHERE info LIKE 'SELECT /*!40001 SQL_NO_CACHE */%'" | 92 | #define MYSQLDUMP_THREADS_QUERY "SELECT COUNT(1) mysqldumpThreads FROM information_schema.processlist WHERE info LIKE 'SELECT /*!40001 SQL_NO_CACHE */%'" |
93 | 93 | ||
94 | thresholds *my_threshold = NULL; | 94 | static thresholds *my_threshold = NULL; |
95 | 95 | ||
96 | int process_arguments (int, char **); | 96 | static int process_arguments (int, char **); |
97 | int validate_arguments (void); | 97 | static int validate_arguments (void); |
98 | void print_help (void); | 98 | static void print_help (void); |
99 | void print_usage (void); | 99 | void print_usage (void); |
100 | 100 | ||
101 | int | 101 | int |
@@ -456,10 +456,10 @@ process_arguments (int argc, char **argv) | |||
456 | db_port = atoi (optarg); | 456 | db_port = atoi (optarg); |
457 | break; | 457 | break; |
458 | case 'S': | 458 | case 'S': |
459 | check_slave = 1; /* check-slave */ | 459 | check_slave = true; /* check-slave */ |
460 | break; | 460 | break; |
461 | case 'n': | 461 | case 'n': |
462 | ignore_auth = 1; /* ignore-auth */ | 462 | ignore_auth = true; /* ignore-auth */ |
463 | break; | 463 | break; |
464 | case 'w': | 464 | case 'w': |
465 | warning = optarg; | 465 | warning = optarg; |