diff options
-rw-r--r-- | plugins/check_by_ssh.c | 13 | ||||
-rw-r--r-- | plugins/check_dig.c | 16 | ||||
-rw-r--r-- | plugins/check_disk.c | 3 | ||||
-rw-r--r-- | plugins/check_dns.c | 6 | ||||
-rw-r--r-- | plugins/check_fping.c | 10 | ||||
-rw-r--r-- | plugins/check_ssh.c | 7 |
6 files changed, 22 insertions, 33 deletions
diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c index 9500cb3..6daa1a1 100644 --- a/plugins/check_by_ssh.c +++ b/plugins/check_by_ssh.c | |||
@@ -167,11 +167,6 @@ main (int argc, char **argv) | |||
167 | return result; | 167 | return result; |
168 | } | 168 | } |
169 | 169 | ||
170 | |||
171 | |||
172 | |||
173 | |||
174 | |||
175 | /* process command-line arguments */ | 170 | /* process command-line arguments */ |
176 | int | 171 | int |
177 | process_arguments (int argc, char **argv) | 172 | process_arguments (int argc, char **argv) |
@@ -238,12 +233,12 @@ process_arguments (int argc, char **argv) | |||
238 | break; | 233 | break; |
239 | case 'H': /* host */ | 234 | case 'H': /* host */ |
240 | if (!is_host (optarg)) | 235 | if (!is_host (optarg)) |
241 | usage2 (_("Invalid host name"), optarg); | 236 | usage2 (_("Invalid hostname/adress"), optarg); |
242 | hostname = optarg; | 237 | hostname = optarg; |
243 | break; | 238 | break; |
244 | case 'p': /* port number */ | 239 | case 'p': /* port number */ |
245 | if (!is_integer (optarg)) | 240 | if (!is_integer (optarg)) |
246 | usage2 (_("port must be an integer"), optarg); | 241 | usage2 (_("port must be a positive integer"), optarg); |
247 | asprintf (&comm,"%s -p %s", comm, optarg); | 242 | asprintf (&comm,"%s -p %s", comm, optarg); |
248 | break; | 243 | break; |
249 | case 'O': /* output file */ | 244 | case 'O': /* output file */ |
@@ -340,10 +335,6 @@ validate_arguments (void) | |||
340 | } | 335 | } |
341 | 336 | ||
342 | 337 | ||
343 | |||
344 | |||
345 | |||
346 | |||
347 | void | 338 | void |
348 | print_help (void) | 339 | print_help (void) |
349 | { | 340 | { |
diff --git a/plugins/check_dig.c b/plugins/check_dig.c index 92a5eda..5b472ec 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c | |||
@@ -151,7 +151,7 @@ main (int argc, char **argv) | |||
151 | if (spclose (child_process)) { | 151 | if (spclose (child_process)) { |
152 | result = max_state (result, STATE_WARNING); | 152 | result = max_state (result, STATE_WARNING); |
153 | if (strlen (output) == 0) | 153 | if (strlen (output) == 0) |
154 | asprintf (&output, _("dig returned error status")); | 154 | asprintf (&output, _("dig returned an error status")); |
155 | } | 155 | } |
156 | 156 | ||
157 | microsec = deltime (tv); | 157 | microsec = deltime (tv); |
@@ -183,7 +183,6 @@ main (int argc, char **argv) | |||
183 | 183 | ||
184 | 184 | ||
185 | 185 | ||
186 | |||
187 | /* process command-line arguments */ | 186 | /* process command-line arguments */ |
188 | int | 187 | int |
189 | process_arguments (int argc, char **argv) | 188 | process_arguments (int argc, char **argv) |
@@ -228,7 +227,7 @@ process_arguments (int argc, char **argv) | |||
228 | dns_server = optarg; | 227 | dns_server = optarg; |
229 | } | 228 | } |
230 | else { | 229 | else { |
231 | usage2 (_("Invalid host name"), optarg); | 230 | usage2 (_("Invalid hostname/adress"), optarg); |
232 | } | 231 | } |
233 | break; | 232 | break; |
234 | case 'p': /* server port */ | 233 | case 'p': /* server port */ |
@@ -236,7 +235,7 @@ process_arguments (int argc, char **argv) | |||
236 | server_port = atoi (optarg); | 235 | server_port = atoi (optarg); |
237 | } | 236 | } |
238 | else { | 237 | else { |
239 | usage2 (_("Server port must be a nonnegative integer"), optarg); | 238 | usage2 (_("port must be a positive integer"), optarg); |
240 | } | 239 | } |
241 | break; | 240 | break; |
242 | case 'l': /* address to lookup */ | 241 | case 'l': /* address to lookup */ |
@@ -247,7 +246,7 @@ process_arguments (int argc, char **argv) | |||
247 | warning_interval = strtod (optarg, NULL); | 246 | warning_interval = strtod (optarg, NULL); |
248 | } | 247 | } |
249 | else { | 248 | else { |
250 | usage2 (_("Warning interval must be a nonnegative integer"), optarg); | 249 | usage2 (_("Warning interval must be a positive integer"), optarg); |
251 | } | 250 | } |
252 | break; | 251 | break; |
253 | case 'c': /* critical */ | 252 | case 'c': /* critical */ |
@@ -255,7 +254,7 @@ process_arguments (int argc, char **argv) | |||
255 | critical_interval = strtod (optarg, NULL); | 254 | critical_interval = strtod (optarg, NULL); |
256 | } | 255 | } |
257 | else { | 256 | else { |
258 | usage2 (_("Critical interval must be a nonnegative integer"), optarg); | 257 | usage2 (_("Critical interval must be a positive integer"), optarg); |
259 | } | 258 | } |
260 | break; | 259 | break; |
261 | case 't': /* timeout */ | 260 | case 't': /* timeout */ |
@@ -263,7 +262,7 @@ process_arguments (int argc, char **argv) | |||
263 | timeout_interval = atoi (optarg); | 262 | timeout_interval = atoi (optarg); |
264 | } | 263 | } |
265 | else { | 264 | else { |
266 | usage2 (_("Time interval must be a nonnegative integer"), optarg); | 265 | usage2 (_("Timeout interval must be a positive integer"), optarg); |
267 | } | 266 | } |
268 | break; | 267 | break; |
269 | case 'v': /* verbose */ | 268 | case 'v': /* verbose */ |
@@ -285,7 +284,7 @@ process_arguments (int argc, char **argv) | |||
285 | dns_server = argv[c]; | 284 | dns_server = argv[c]; |
286 | } | 285 | } |
287 | else { | 286 | else { |
288 | usage2 (_("Invalid host name"), argv[c]); | 287 | usage2 (_("Invalid hostname/adress"), argv[c]); |
289 | } | 288 | } |
290 | } | 289 | } |
291 | else { | 290 | else { |
@@ -311,7 +310,6 @@ validate_arguments (void) | |||
311 | 310 | ||
312 | 311 | ||
313 | 312 | ||
314 | |||
315 | void | 313 | void |
316 | print_help (void) | 314 | print_help (void) |
317 | { | 315 | { |
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 95e8475..c823925 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
@@ -437,7 +437,7 @@ process_arguments (int argc, char **argv) | |||
437 | print_help (); | 437 | print_help (); |
438 | exit (STATE_OK); | 438 | exit (STATE_OK); |
439 | case '?': /* help */ | 439 | case '?': /* help */ |
440 | usage (_("check_disk: unrecognized option\n")); | 440 | usage (_("Unknow argument\n")); |
441 | break; | 441 | break; |
442 | } | 442 | } |
443 | } | 443 | } |
@@ -566,7 +566,6 @@ walk_name_list (struct name_list *list, const char *name) | |||
566 | 566 | ||
567 | 567 | ||
568 | 568 | ||
569 | |||
570 | void | 569 | void |
571 | print_help (void) | 570 | print_help (void) |
572 | { | 571 | { |
diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 7b18270..6c08c27 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c | |||
@@ -207,7 +207,7 @@ main (int argc, char **argv) | |||
207 | printf (_("DNS CRITICAL - %s\n"), | 207 | printf (_("DNS CRITICAL - %s\n"), |
208 | !strcmp (output, "") ? _(" Probably a non-existent host/domain") : output); | 208 | !strcmp (output, "") ? _(" Probably a non-existent host/domain") : output); |
209 | else | 209 | else |
210 | printf (_("DNS problem - %s\n"), | 210 | printf (_("DNS UNKNOW - %s\n"), |
211 | !strcmp (output, "") ? _(" Probably a non-existent host/domain") : output); | 211 | !strcmp (output, "") ? _(" Probably a non-existent host/domain") : output); |
212 | 212 | ||
213 | return result; | 213 | return result; |
@@ -331,7 +331,7 @@ process_arguments (int argc, char **argv) | |||
331 | case 'r': /* reverse server name */ | 331 | case 'r': /* reverse server name */ |
332 | /* TODO: Is this is_host necessary? */ | 332 | /* TODO: Is this is_host necessary? */ |
333 | if (is_host (optarg) == FALSE) { | 333 | if (is_host (optarg) == FALSE) { |
334 | usage2 (_("Invalid host name/address"), optarg); | 334 | usage2 (_("Invalid hostname/address"), optarg); |
335 | } | 335 | } |
336 | if (strlen (optarg) >= ADDRESS_LENGTH) | 336 | if (strlen (optarg) >= ADDRESS_LENGTH) |
337 | die (STATE_UNKNOWN, _("Input buffer overflow\n")); | 337 | die (STATE_UNKNOWN, _("Input buffer overflow\n")); |
@@ -359,7 +359,7 @@ process_arguments (int argc, char **argv) | |||
359 | if (strlen(dns_server)==0 && c<argc) { | 359 | if (strlen(dns_server)==0 && c<argc) { |
360 | /* TODO: See -s option */ | 360 | /* TODO: See -s option */ |
361 | if (is_host(argv[c]) == FALSE) { | 361 | if (is_host(argv[c]) == FALSE) { |
362 | printf (_("Invalid name/address: %s\n\n"), argv[c]); | 362 | printf (_("Invalid hostname/address: %s\n\n"), argv[c]); |
363 | return ERROR; | 363 | return ERROR; |
364 | } | 364 | } |
365 | if (strlen(argv[c]) >= ADDRESS_LENGTH) | 365 | if (strlen(argv[c]) >= ADDRESS_LENGTH) |
diff --git a/plugins/check_fping.c b/plugins/check_fping.c index 22f6b55..2dba2d5 100644 --- a/plugins/check_fping.c +++ b/plugins/check_fping.c | |||
@@ -127,16 +127,16 @@ textscan (char *buf) | |||
127 | int status = STATE_UNKNOWN; | 127 | int status = STATE_UNKNOWN; |
128 | 128 | ||
129 | if (strstr (buf, "not found")) { | 129 | if (strstr (buf, "not found")) { |
130 | die (STATE_CRITICAL, _("FPING unknown - %s not found\n"), server_name); | 130 | die (STATE_CRITICAL, _("FPING UNKNOW - %s not found\n"), server_name); |
131 | 131 | ||
132 | } | 132 | } |
133 | else if (strstr (buf, "is unreachable") || strstr (buf, "Unreachable")) { | 133 | else if (strstr (buf, "is unreachable") || strstr (buf, "Unreachable")) { |
134 | die (STATE_CRITICAL, _("FPING critical - %s is unreachable\n"), | 134 | die (STATE_CRITICAL, _("FPING CRITICAL - %s is unreachable\n"), |
135 | "host"); | 135 | "host"); |
136 | 136 | ||
137 | } | 137 | } |
138 | else if (strstr (buf, "is down")) { | 138 | else if (strstr (buf, "is down")) { |
139 | die (STATE_CRITICAL, _("FPING critical - %s is down\n"), server_name); | 139 | die (STATE_CRITICAL, _("FPING CRITICAL - %s is down\n"), server_name); |
140 | 140 | ||
141 | } | 141 | } |
142 | else if (strstr (buf, "is alive")) { | 142 | else if (strstr (buf, "is alive")) { |
@@ -254,7 +254,7 @@ process_arguments (int argc, char **argv) | |||
254 | break; | 254 | break; |
255 | case 'H': /* hostname */ | 255 | case 'H': /* hostname */ |
256 | if (is_host (optarg) == FALSE) { | 256 | if (is_host (optarg) == FALSE) { |
257 | usage2 (_("Invalid host name/address"), optarg); | 257 | usage2 (_("Invalid hostname/address"), optarg); |
258 | } | 258 | } |
259 | server_name = strscpy (server_name, optarg); | 259 | server_name = strscpy (server_name, optarg); |
260 | break; | 260 | break; |
@@ -301,7 +301,7 @@ process_arguments (int argc, char **argv) | |||
301 | 301 | ||
302 | 302 | ||
303 | if (server_name == NULL) | 303 | if (server_name == NULL) |
304 | usage (_("Host name was not supplied\n\n")); | 304 | usage (_("Hostname was not supplied\n\n")); |
305 | 305 | ||
306 | return OK; | 306 | return OK; |
307 | } | 307 | } |
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index 86267b2..ea74fa8 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c | |||
@@ -104,7 +104,8 @@ process_arguments (int argc, char **argv) | |||
104 | 104 | ||
105 | switch (c) { | 105 | switch (c) { |
106 | case '?': /* help */ | 106 | case '?': /* help */ |
107 | usage (""); | 107 | usage (_("Unknow argument\n")); |
108 | break; | ||
108 | case 'V': /* version */ | 109 | case 'V': /* version */ |
109 | print_revision (progname, revision); | 110 | print_revision (progname, revision); |
110 | exit (STATE_OK); | 111 | exit (STATE_OK); |
@@ -135,7 +136,7 @@ process_arguments (int argc, char **argv) | |||
135 | break; | 136 | break; |
136 | case 'H': /* host */ | 137 | case 'H': /* host */ |
137 | if (is_host (optarg) == FALSE) | 138 | if (is_host (optarg) == FALSE) |
138 | usage2 (_("Invalid host name/address"), optarg); | 139 | usage2 (_("Invalid hostname/address"), optarg); |
139 | server_name = optarg; | 140 | server_name = optarg; |
140 | break; | 141 | break; |
141 | case 'p': /* port */ | 142 | case 'p': /* port */ |
@@ -250,7 +251,7 @@ print_help (void) | |||
250 | printf ("Copyright (c) 1999 Remi Paulmier <remi@sinfomic.fr>\n"); | 251 | printf ("Copyright (c) 1999 Remi Paulmier <remi@sinfomic.fr>\n"); |
251 | printf (COPYRIGHT, copyright, email); | 252 | printf (COPYRIGHT, copyright, email); |
252 | 253 | ||
253 | printf (_("Try to connect to SSH server at specified server and port\n\n")); | 254 | printf (_("Try to connect to an SSH server at specified server and port\n\n")); |
254 | 255 | ||
255 | print_usage (); | 256 | print_usage (); |
256 | 257 | ||