[monitoring-plugins] Rename variable check_slave to check_replica

Lorenz Kästle git at monitoring-plugins.org
Fri Mar 7 17:10:11 CET 2025


 Module: monitoring-plugins
 Branch: master
 Commit: b8f203ace7ed09ac97fb98da63e71da07efb7354
 Author: Lorenz Kästle <12514511+RincewindsHat at users.noreply.github.com>
   Date: Thu Feb 20 18:05:36 2025 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=b8f203ac

Rename variable check_slave to check_replica

---

 plugins/check_mysql.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 09c0b7dd..6ba12feb 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -59,7 +59,7 @@ static bool ssl = false;
 static char *opt_file = NULL;
 static char *opt_group = NULL;
 static unsigned int db_port = MYSQL_PORT;
-static bool check_slave = false;
+static bool check_replica = false;
 static bool ignore_auth = false;
 static int verbose = 0;
 
@@ -195,7 +195,7 @@ int main(int argc, char **argv) {
 		}
 	}
 
-	if (check_slave) {
+	if (check_replica) {
 		/* check the slave status */
 		if (mysql_query(&mysql, "show slave status") != 0) {
 			error = strdup(mysql_error(&mysql));
@@ -329,7 +329,7 @@ int main(int argc, char **argv) {
 	mysql_close(&mysql);
 
 	/* print out the result of stats */
-	if (check_slave) {
+	if (check_replica) {
 		printf("%s %s|%s\n", result, slaveresult, perf);
 	} else {
 		printf("%s|%s\n", result, perf);
@@ -424,7 +424,7 @@ int process_arguments(int argc, char **argv) {
 			db_port = atoi(optarg);
 			break;
 		case 'S':
-			check_slave = true; /* check-slave */
+			check_replica = true; /* check-slave */
 			break;
 		case 'n':
 			ignore_auth = true; /* ignore-auth */



More information about the Commits mailing list