[monitoring-plugins] clang-format + add host option in usage

Lorenz Kästle git at monitoring-plugins.org
Sun Mar 9 23:50:12 CET 2025


 Module: monitoring-plugins
 Branch: master
 Commit: 61d3dc00cbba6ab10cb8a181294c120741a34882
 Author: Lorenz Kästle <12514511+RincewindsHat at users.noreply.github.com>
   Date: Fri Mar  7 16:10:01 2025 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=61d3dc00

clang-format + add host option in usage

---

 plugins/check_game.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/plugins/check_game.c b/plugins/check_game.c
index 58014c3e..d078e4b5 100644
--- a/plugins/check_game.c
+++ b/plugins/check_game.c
@@ -130,16 +130,17 @@ int main(int argc, char **argv) {
 		printf(_("CRITICAL - Game server timeout\n"));
 		result = STATE_CRITICAL;
 	} else {
-		printf("OK: %s/%s %s (%s), Ping: %s ms|%s %s\n", ret[config.qstat_game_players], ret[config.qstat_game_players_max], ret[config.qstat_game_field],
-			   ret[config.qstat_map_field], ret[config.qstat_ping_field],
-			   perfdata("players", atol(ret[config.qstat_game_players]), "", false, 0, false, 0, true, 0, true, atol(ret[config.qstat_game_players_max])),
+		printf("OK: %s/%s %s (%s), Ping: %s ms|%s %s\n", ret[config.qstat_game_players], ret[config.qstat_game_players_max],
+			   ret[config.qstat_game_field], ret[config.qstat_map_field], ret[config.qstat_ping_field],
+			   perfdata("players", atol(ret[config.qstat_game_players]), "", false, 0, false, 0, true, 0, true,
+						atol(ret[config.qstat_game_players_max])),
 			   fperfdata("ping", strtod(ret[config.qstat_ping_field], NULL), "", false, 0, false, 0, true, 0, false, 0));
 	}
 
 	exit(result);
 }
 
-#define players_field_index 129
+#define players_field_index     129
 #define max_players_field_index 130
 
 check_game_config_wrapper process_arguments(int argc, char **argv) {
@@ -284,7 +285,8 @@ void print_help(void) {
 
 	printf(UT_HELP_VRSN);
 	printf(UT_EXTRA_OPTS);
-
+	printf(" -H, --hostname=ADDRESS\n"
+		  "    Host name, IP Address, or unix socket (must be an absolute path)\n");
 	printf(" %s\n", "-p");
 	printf("    %s\n", _("Optional port of which to connect"));
 	printf(" %s\n", "gf");



More information about the Commits mailing list