diff options
author | Ethan Galstad <egalstad@users.sourceforge.net> | 2002-08-13 03:18:16 (GMT) |
---|---|---|
committer | Ethan Galstad <egalstad@users.sourceforge.net> | 2002-08-13 03:18:16 (GMT) |
commit | e5822d19fc6cf2398ead6a465f2cede568e12ee7 (patch) | |
tree | fe6063c7116c2c78702beeb28e40461b0170881b /plugins/check_game.c | |
parent | 827e17f4547aede83f98cabe9e9f0bd5fa30d0e5 (diff) | |
download | monitoring-plugins-e5822d19fc6cf2398ead6a465f2cede568e12ee7.tar.gz |
Mod to display current/max number of players in a game (Frank Kannemann)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@70 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_game.c')
-rw-r--r-- | plugins/check_game.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/check_game.c b/plugins/check_game.c index 63d1be6..19f10b1 100644 --- a/plugins/check_game.c +++ b/plugins/check_game.c | |||
@@ -81,6 +81,8 @@ char server_ip[MAX_HOST_ADDRESS_LENGTH]; | |||
81 | char game_type[MAX_INPUT_BUFFER]; | 81 | char game_type[MAX_INPUT_BUFFER]; |
82 | char port[MAX_INPUT_BUFFER]; | 82 | char port[MAX_INPUT_BUFFER]; |
83 | 83 | ||
84 | int qstat_game_players_max = 4; | ||
85 | int qstat_game_players = 5; | ||
84 | int qstat_game_field = 2; | 86 | int qstat_game_field = 2; |
85 | int qstat_map_field = 3; | 87 | int qstat_map_field = 3; |
86 | int qstat_ping_field = 5; | 88 | int qstat_ping_field = 5; |
@@ -199,8 +201,12 @@ main (int argc, char **argv) | |||
199 | result = STATE_CRITICAL; | 201 | result = STATE_CRITICAL; |
200 | } | 202 | } |
201 | else { | 203 | else { |
202 | printf ("OK: %s (%s), Ping: %s ms\n", ret[qstat_game_field], | 204 | printf ("OK: %s/%s %s (%s), Ping: %s ms\n", |
203 | ret[qstat_map_field], ret[qstat_ping_field]); | 205 | ret[qstat_game_players_max], |
206 | ret[qstat_game_players], | ||
207 | ret[qstat_game_field], | ||
208 | ret[qstat_map_field], | ||
209 | ret[qstat_ping_field]); | ||
204 | } | 210 | } |
205 | 211 | ||
206 | /* close the pipe */ | 212 | /* close the pipe */ |