summaryrefslogtreecommitdiffstats
path: root/plugins/t
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/t')
0 files changed, 0 insertions, 0 deletions
diff --git a/plugins/check_dhcp.c b/plugins/check_dhcp.c
index 1a16d3e..6703c57 100644
--- a/plugins/check_dhcp.c
+++ b/plugins/check_dhcp.c
@@ -927,7 +927,7 @@ int get_results(void){
927 printf(_(", %s%d of %d requested servers responded"),((requested_responses<requested_servers) && requested_responses>0)?"only ":"",requested_responses,requested_servers); 927 printf(_(", %s%d of %d requested servers responded"),((requested_responses<requested_servers) && requested_responses>0)?"only ":"",requested_responses,requested_servers);
928 928
929 if(request_specific_address==TRUE) 929 if(request_specific_address==TRUE)
930 printf(_(", requested address (%s) was %soffered"),inet_ntoa(requested_address),(received_requested_address==TRUE)?"":"not "); 930 printf(_(", requested address (%s) was %soffered"),inet_ntoa(requested_address),(received_requested_address==TRUE)?"":_("not "));
931 931
932 printf(_(", max lease time = ")); 932 printf(_(", max lease time = "));
933 if(max_lease_time==DHCP_INFINITE_TIME) 933 if(max_lease_time==DHCP_INFINITE_TIME)
@@ -1048,23 +1048,19 @@ int call_getopt(int argc, char **argv){
1048 break; 1048 break;
1049 1049
1050 case 'V': /* version */ 1050 case 'V': /* version */
1051 1051 print_revision(progname,revision);
1052 /*print_revision(progname,"$Revision$");*/
1053 exit(STATE_OK); 1052 exit(STATE_OK);
1054 1053
1055 case 'h': /* help */ 1054 case 'h': /* help */
1056
1057 print_help(); 1055 print_help();
1058 exit(STATE_OK); 1056 exit(STATE_OK);
1059 1057
1060 case 'v': /* verbose */ 1058 case 'v': /* verbose */
1061
1062 verbose=1; 1059 verbose=1;
1063 break; 1060 break;
1064 1061
1065 case '?': /* help */ 1062 case '?': /* help */
1066 1063 usage2 (_("Unknown argument"), optarg);
1067 /*usage("Invalid argument\n");*/
1068 break; 1064 break;
1069 1065
1070 default: 1066 default:
@@ -1076,7 +1072,6 @@ int call_getopt(int argc, char **argv){
1076 } 1072 }
1077 1073
1078 1074
1079
1080int validate_arguments(void){ 1075int validate_arguments(void){
1081 1076
1082 return OK; 1077 return OK;
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index e6483b9..94d4300 100644
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
@@ -224,9 +224,9 @@ error_scan (char *input_buffer)
224{ 224{
225 225
226 /* the DNS lookup timed out */ 226 /* the DNS lookup timed out */
227 if (strstr (input_buffer, "Note: nslookup is deprecated and may be removed from future releases.") || 227 if (strstr (input_buffer, _("Note: nslookup is deprecated and may be removed from future releases.")) ||
228 strstr (input_buffer, "Consider using the `dig' or `host' programs instead. Run nslookup with") || 228 strstr (input_buffer, _("Consider using the `dig' or `host' programs instead. Run nslookup with")) ||
229 strstr (input_buffer, "the `-sil[ent]' option to prevent this message from appearing.")) 229 strstr (input_buffer, _("the `-sil[ent]' option to prevent this message from appearing.")))
230 return STATE_OK; 230 return STATE_OK;
231 231
232 /* DNS server is not running... */ 232 /* DNS server is not running... */
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 2198e32..bd7911d 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -403,7 +403,7 @@ run_ping (const char *cmd, const char *addr)
403 int result = STATE_UNKNOWN; 403 int result = STATE_UNKNOWN;
404 404
405 if ((child_process = spopen (cmd)) == NULL) 405 if ((child_process = spopen (cmd)) == NULL)
406 die (STATE_UNKNOWN, _("Cannot open pipe: %s"), cmd); 406 die (STATE_UNKNOWN, _("Could not open pipe: %s\n"), cmd);
407 407
408 child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r"); 408 child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
409 if (child_stderr == NULL) 409 if (child_stderr == NULL)
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 0cd9153..15ec76f 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -249,7 +249,7 @@ main (int argc, char **argv)
249 /* If we get anything on STDERR, at least set warning */ 249 /* If we get anything on STDERR, at least set warning */
250 while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) { 250 while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) {
251 if (verbose) 251 if (verbose)
252 printf (_("STDERR: %s"), input_buffer); 252 printf ("STDERR: %s", input_buffer);
253 result = max_state (result, STATE_WARNING); 253 result = max_state (result, STATE_WARNING);
254 printf (_("System call sent warnings to stderr\n")); 254 printf (_("System call sent warnings to stderr\n"));
255 } 255 }
@@ -412,7 +412,7 @@ process_arguments (int argc, char **argv)
412 uid = pw->pw_uid; 412 uid = pw->pw_uid;
413 } 413 }
414 user = pw->pw_name; 414 user = pw->pw_name;
415 asprintf (&fmt, _("%s%sUID = %d (%s)"), (fmt ? fmt : ""), (options ? ", " : ""), 415 asprintf (&fmt, "%s%sUID = %d (%s)", (fmt ? fmt : ""), (options ? ", " : ""),
416 uid, user); 416 uid, user);
417 options |= USER; 417 options |= USER;
418 break; 418 break;
@@ -432,19 +432,19 @@ process_arguments (int argc, char **argv)
432 break; 432 break;
433 else 433 else
434 args = optarg; 434 args = optarg;
435 asprintf (&fmt, _("%s%sargs '%s'"), (fmt ? fmt : ""), (options ? ", " : ""), args); 435 asprintf (&fmt, "%s%sargs '%s'", (fmt ? fmt : ""), (options ? ", " : ""), args);
436 options |= ARGS; 436 options |= ARGS;
437 break; 437 break;
438 case 'r': /* RSS */ 438 case 'r': /* RSS */
439 if (sscanf (optarg, "%d%[^0-9]", &rss, tmp) == 1) { 439 if (sscanf (optarg, "%d%[^0-9]", &rss, tmp) == 1) {
440 asprintf (&fmt, _("%s%sRSS >= %d"), (fmt ? fmt : ""), (options ? ", " : ""), rss); 440 asprintf (&fmt, "%s%sRSS >= %d", (fmt ? fmt : ""), (options ? ", " : ""), rss);
441 options |= RSS; 441 options |= RSS;
442 break; 442 break;
443 } 443 }
444 usage4 (_("RSS must be an integer!")); 444 usage4 (_("RSS must be an integer!"));
445 case 'z': /* VSZ */ 445 case 'z': /* VSZ */
446 if (sscanf (optarg, "%d%[^0-9]", &vsz, tmp) == 1) { 446 if (sscanf (optarg, "%d%[^0-9]", &vsz, tmp) == 1) {
447 asprintf (&fmt, _("%s%sVSZ >= %d"), (fmt ? fmt : ""), (options ? ", " : ""), vsz); 447 asprintf (&fmt, "%s%sVSZ >= %d", (fmt ? fmt : ""), (options ? ", " : ""), vsz);
448 options |= VSZ; 448 options |= VSZ;
449 break; 449 break;
450 } 450 }
@@ -452,7 +452,7 @@ process_arguments (int argc, char **argv)
452 case 'P': /* PCPU */ 452 case 'P': /* PCPU */
453 /* TODO: -P 1.5.5 is accepted */ 453 /* TODO: -P 1.5.5 is accepted */
454 if (sscanf (optarg, "%f%[^0-9.]", &pcpu, tmp) == 1) { 454 if (sscanf (optarg, "%f%[^0-9.]", &pcpu, tmp) == 1) {
455 asprintf (&fmt, _("%s%sPCPU >= %.2f"), (fmt ? fmt : ""), (options ? ", " : ""), pcpu); 455 asprintf (&fmt, "%s%sPCPU >= %.2f", (fmt ? fmt : ""), (options ? ", " : ""), pcpu);
456 options |= PCPU; 456 options |= PCPU;
457 break; 457 break;
458 } 458 }
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 6e5d972..f4a11e0 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -188,7 +188,7 @@ main (int argc, char **argv)
188 return STATE_UNKNOWN; 188 return STATE_UNKNOWN;
189 } 189 }
190 if(connect_STARTTLS() != OK) { 190 if(connect_STARTTLS() != OK) {
191 printf (_("ERROR: Cannot create SSL context.\n")); 191 printf (_("CRITICAL - Cannot create SSL context.\n"));
192 return STATE_CRITICAL; 192 return STATE_CRITICAL;
193 } 193 }
194 if ( check_cert ) { 194 if ( check_cert ) {
@@ -197,7 +197,7 @@ main (int argc, char **argv)
197 X509_free(server_cert); 197 X509_free(server_cert);
198 } 198 }
199 else { 199 else {
200 printf (_("ERROR: Cannot retrieve server certificate.\n")); 200 printf (_("CRITICAL - Cannot retrieve server certificate.\n"));
201 result = STATE_CRITICAL; 201 result = STATE_CRITICAL;
202 202
203 } 203 }
@@ -591,7 +591,7 @@ connect_STARTTLS (void)
591 SSL_load_error_strings (); 591 SSL_load_error_strings ();
592 if ((ctx = SSL_CTX_new (meth)) == NULL) 592 if ((ctx = SSL_CTX_new (meth)) == NULL)
593 { 593 {
594 printf(_("ERROR: Cannot create SSL context.\n")); 594 printf(_("CRITICAL - Cannot create SSL context.\n"));
595 return STATE_CRITICAL; 595 return STATE_CRITICAL;
596 } 596 }
597 /* do the SSL handshake */ 597 /* do the SSL handshake */
@@ -606,7 +606,7 @@ connect_STARTTLS (void)
606 } 606 }
607 else 607 else
608 { 608 {
609 printf (_("ERROR: Cannot initiate SSL handshake.\n")); 609 printf (_("CRITICAL - Cannot initiate SSL handshake.\n"));
610 } 610 }
611 /* this causes a seg faul 611 /* this causes a seg faul
612 not sure why, being sloppy 612 not sure why, being sloppy
@@ -632,7 +632,7 @@ check_certificate (X509 ** certificate)
632 /* Generate tm structure to process timestamp */ 632 /* Generate tm structure to process timestamp */
633 if (tm->type == V_ASN1_UTCTIME) { 633 if (tm->type == V_ASN1_UTCTIME) {
634 if (tm->length < 10) { 634 if (tm->length < 10) {
635 printf (_("ERROR: Wrong time format in certificate.\n")); 635 printf (_("CRITICAL - Wrong time format in certificate.\n"));
636 return STATE_CRITICAL; 636 return STATE_CRITICAL;
637 } 637 }
638 else { 638 else {
@@ -644,7 +644,7 @@ check_certificate (X509 ** certificate)
644 } 644 }
645 else { 645 else {
646 if (tm->length < 12) { 646 if (tm->length < 12) {
647 printf (_("ERROR: Wrong time format in certificate.\n")); 647 printf (_("CRITICAL - Wrong time format in certificate.\n"));
648 return STATE_CRITICAL; 648 return STATE_CRITICAL;
649 } 649 }
650 else { 650 else {
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 5f22121..ef411e1 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -281,7 +281,7 @@ main (int argc, char **argv)
281 iresult = STATE_CRITICAL; 281 iresult = STATE_CRITICAL;
282 } 282 }
283#else 283#else
284 printf (_("%s UNKNOWN: call for regex which was not a compiled option"), label); 284 printf (_("Call for regex which was not a compiled option"));
285 exit (STATE_UNKNOWN); 285 exit (STATE_UNKNOWN);
286#endif 286#endif
287 } 287 }
@@ -511,7 +511,7 @@ process_arguments (int argc, char **argv)
511 eval_method[jj++] = CRIT_REGEX; 511 eval_method[jj++] = CRIT_REGEX;
512 ii++; 512 ii++;
513#else 513#else
514 printf (_("%s UNKNOWN: call for regex which was not a compiled option"), label); 514 printf (_("call for regex which was not a compiled option"));
515 exit (STATE_UNKNOWN); 515 exit (STATE_UNKNOWN);
516#endif 516#endif
517 break; 517 break;
@@ -530,8 +530,7 @@ process_arguments (int argc, char **argv)
530 labels_size += 8; 530 labels_size += 8;
531 labels = realloc (labels, labels_size); 531 labels = realloc (labels, labels_size);
532 if (labels == NULL) 532 if (labels == NULL)
533 die (STATE_UNKNOWN, 533 die (STATE_UNKNOWN, _("Could not reallocate labels[%d]"), nlabels);
534 _("Could not realloc() labels[%d]"), nlabels);
535 } 534 }
536 labels[nlabels - 1] = optarg; 535 labels[nlabels - 1] = optarg;
537 ptr = thisarg (optarg); 536 ptr = thisarg (optarg);
@@ -543,7 +542,7 @@ process_arguments (int argc, char **argv)
543 labels_size += 8; 542 labels_size += 8;
544 labels = realloc (labels, labels_size); 543 labels = realloc (labels, labels_size);
545 if (labels == NULL) 544 if (labels == NULL)
546 die (STATE_UNKNOWN, _("Could not realloc() labels\n")); 545 die (STATE_UNKNOWN, _("Could not reallocate labels\n"));
547 } 546 }
548 labels++; 547 labels++;
549 ptr = thisarg (ptr); 548 ptr = thisarg (ptr);
@@ -560,8 +559,7 @@ process_arguments (int argc, char **argv)
560 unitv_size += 8; 559 unitv_size += 8;
561 unitv = realloc (unitv, unitv_size); 560 unitv = realloc (unitv, unitv_size);
562 if (unitv == NULL) 561 if (unitv == NULL)
563 die (STATE_UNKNOWN, 562 die (STATE_UNKNOWN, _("Could not reallocate units [%d]\n"), nunits);
564 _("Could not realloc() units [%d]\n"), nunits);
565 } 563 }
566 unitv[nunits - 1] = optarg; 564 unitv[nunits - 1] = optarg;
567 ptr = thisarg (optarg); 565 ptr = thisarg (optarg);
@@ -646,7 +644,7 @@ validate_arguments ()
646 } 644 }
647 else if ( strcmp(seclevel, "authNoPriv") == 0 ) { 645 else if ( strcmp(seclevel, "authNoPriv") == 0 ) {
648 if ( secname == NULL || authpasswd == NULL) { 646 if ( secname == NULL || authpasswd == NULL) {
649 printf (_("Missing secname (%s) or authpassword (%s) ! \n)"),secname, authpasswd ); 647 printf (_("Missing secname (%s) or authpassword (%s) ! \n"),secname, authpasswd );
650 print_usage (); 648 print_usage ();
651 exit (STATE_UNKNOWN); 649 exit (STATE_UNKNOWN);
652 } 650 }
@@ -663,9 +661,7 @@ validate_arguments ()
663 661
664 } 662 }
665 else { 663 else {
666 printf (_("Invalid SNMP version: %s\n"), proto); 664 usage2 (_("Invalid SNMP version"), proto);
667 print_usage ();
668 exit (STATE_UNKNOWN);
669 } 665 }
670 666
671 return OK; 667 return OK;
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index 093845b..bcc6b17 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -405,7 +405,7 @@ process_arguments (int argc, char **argv)
405 break; 405 break;
406 } 406 }
407 else { 407 else {
408 usage (_("Critical threshold must be integer or percentage!\n")); 408 usage4 (_("Critical threshold must be integer or percentage!"));
409 } 409 }
410 case 'a': /* all swap */ 410 case 'a': /* all swap */
411 allswaps = TRUE; 411 allswaps = TRUE;
@@ -458,12 +458,12 @@ validate_arguments (void)
458 return ERROR; 458 return ERROR;
459 } 459 }
460 else if (warn_percent < crit_percent) { 460 else if (warn_percent < crit_percent) {
461 usage 461 usage4
462 (_("Warning percentage should be more than critical percentage\n")); 462 (_("Warning percentage should be more than critical percentage"));
463 } 463 }
464 else if (warn_size < crit_size) { 464 else if (warn_size < crit_size) {
465 usage 465 usage4
466 (_("Warning free space should be more than critical free space\n")); 466 (_("Warning free space should be more than critical free space"));
467 } 467 }
468 return OK; 468 return OK;
469} 469}
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index fcd6778..a21572d 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -581,7 +581,7 @@ process_arguments (int argc, char **argv)
581 case 'S': 581 case 'S':
582 use_ssl = TRUE; 582 use_ssl = TRUE;
583#else 583#else
584 die (STATE_UNKNOWN, _("SSL support not available. Install OpenSSL and recompile.")); 584 die (STATE_UNKNOWN, _("Invalid option - SSL is not available"));
585#endif 585#endif
586 break; 586 break;
587 } 587 }