summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d1ba3e)
raw | patch | inline | side by side (parent: 2d1ba3e)
author | Benoit Mortier <opensides@users.sourceforge.net> | |
Thu, 2 Dec 2004 01:11:01 +0000 (01:11 +0000) | ||
committer | Benoit Mortier <opensides@users.sourceforge.net> | |
Thu, 2 Dec 2004 01:11:01 +0000 (01:11 +0000) |
more localization fixes
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@971 f882894a-f735-0410-b71e-b25c423dba1c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@971 f882894a-f735-0410-b71e-b25c423dba1c
24 files changed:
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index fa7fbc1e820edab7e86e1405461bf5418290f363..9ab001f7eea61cdcf8ef5a61e2012f5d374210b2 100644 (file)
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
if ((temp_buffer = strstr (input_buffer, "name = ")))
address = strdup (temp_buffer + 7);
else {
- output = strdup (_("Unknown error (plugin)"));
+ output = strdup (_("Warning plugin error"));
result = STATE_WARNING;
}
}
diff --git a/plugins/check_game.c b/plugins/check_game.c
index 8b2a6c42f6d229080a436a9923c448604d2c935a..3a8b9f57e6927b7f1272d6ebb67084021f386b7a 100644 (file)
--- a/plugins/check_game.c
+++ b/plugins/check_game.c
// result = process_arguments (argc, argv);
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_game: could not parse arguments\n"));
/* if (result != OK) {
*/
if (!strncmp (input_buffer, "unknown option", 14)) {
- printf (_("ERROR: Host type parameter incorrect!\n"));
+ printf (_("CRITICAL - Host type parameter incorrect!\n"));
result = STATE_CRITICAL;
return result;
}
}
if (strstr (ret[2], QSTAT_HOST_ERROR)) {
- printf ("ERROR: Host not found\n");
+ printf ("CRITICAL - Host not found\n");
result = STATE_CRITICAL;
}
else if (strstr (ret[2], QSTAT_HOST_DOWN)) {
- printf ("ERROR: Game server down or unavailable\n");
+ printf ("CRITICAL - Game server down or unavailable\n");
result = STATE_CRITICAL;
}
else if (strstr (ret[2], QSTAT_HOST_TIMEOUT)) {
- printf ("ERROR: Game server timeout\n");
+ printf ("CRITICAL - Game server timeout\n");
result = STATE_CRITICAL;
}
else {
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 748ca46e28da6a874bb1034cdb3efb079a4f0914..f5a6c2b85e3c0eca2320513b76c7124f7bc57bee 100644 (file)
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
asprintf (&user_agent, "User-Agent: check_http/%s (nagios-plugins %s)",
clean_revstring (revision), VERSION);
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_http: could not parse arguments\n"));
if (strstr (timestamp, ":")) {
X509_free (server_cert);
}
else {
- printf (_("ERROR: Cannot retrieve server certificate.\n"));
+ printf (_("CRITICAL - Cannot retrieve server certificate.\n"));
result = STATE_CRITICAL;
}
SSL_shutdown (ssl);
X509_free (server_cert);
}
else {
- printf (_("ERROR: Cannot retrieve server certificate.\n"));
+ printf (_("CRITICAL - Cannot retrieve server certificate.\n"));
return STATE_CRITICAL;
}
addr = malloc (MAX_IPV4_HOSTLENGTH + 1);
if (addr == NULL)
- die (STATE_UNKNOWN, _("ERROR: could not allocate addr\n"));
+ die (STATE_UNKNOWN, _("could not allocate addr\n"));
url = malloc (strcspn (pos, "\r\n"));
if (url == NULL)
- die (STATE_UNKNOWN, _("ERROR: could not allocate url\n"));
+ die (STATE_UNKNOWN, _("could not allocate url\n"));
while (pos) {
url = realloc (url, strcspn (pos, "\r\n"));
if (url == NULL)
- die (STATE_UNKNOWN, _("ERROR: could not allocate url\n"));
+ die (STATE_UNKNOWN, _("could not allocate url\n"));
/* URI_HTTP, URI_HOST, URI_PORT, URI_PATH */
if (sscanf (pos, HD1, type, addr, port, url) == 4) {
index 9d3c3160d4a7a87f4c80673676156d756ef9bb98..bcace8a0e36e983ac412bf0399c70ae9f0d604e5 100644 (file)
total);
break;
case OPERATIONAL:
- printf (_("STATUS - Operational (%d/%d tests passed)\n"), passed, total);
+ printf (_("OK - Operational (%d/%d tests passed)\n"), passed, total);
break;
default:
printf (_("ERROR - Status '%d' uknown. %d/%d tests passed\n"), status,
diff --git a/plugins/check_load.c b/plugins/check_load.c
index babe84bc82fc0cc85bfc957bed7d55c87efb5832..616c3e0d9a19ae1df49bee1764b17599515ff5df 100644 (file)
--- a/plugins/check_load.c
+++ b/plugins/check_load.c
-
-
-\f
int
main (int argc, char **argv)
{
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_load: could not parse arguments\n"));
#if HAVE_GETLOADAVG==1
-
-
-\f
/* process command-line arguments */
int
process_arguments (int argc, char **argv)
usage (_("Critical threshold must be float or float triplet!\n"));
break;
case 'V': /* version */
- print_revision (progname, "$Revision$");
+ print_revision (progname, revision);
exit (STATE_OK);
case 'h': /* help */
print_help ();
-
-
int
validate_arguments (void)
{
-
-
-\f
void
print_help (void)
{
index 0b0f49efdbeda44ad09af2e89b40b49e6c7d4c8d..b9c277b36684d6432513e66cf73b5fbbcdf88737 100644 (file)
--- a/plugins/check_mrtgtraf.c
+++ b/plugins/check_mrtgtraf.c
return result;
}
-\f
+
+
+
/* process command-line arguments */
int
process_arguments (int argc, char **argv)
-
-
int
validate_arguments (void)
{
-
-
void
print_help (void)
{
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index ffd96ed4743dc509745bdf83dbdf6f6821efd005..703a1ba7e974de8402e24d1935844be629c13955 100644 (file)
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
void print_help (void);
void print_usage (void);
+
+
int
main (int argc, char **argv)
{
diff --git a/plugins/check_nagios.c b/plugins/check_nagios.c
index 4439251fba5b298c292a45ca8a1c27f55e917746..bb2ae6dd8ef7c58c7e057ab454bb88b9dcf0210a 100644 (file)
--- a/plugins/check_nagios.c
+++ b/plugins/check_nagios.c
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_nagios: could not parse arguments\n"));
/* Set signal handling and alarm */
/* open the status log */
fp = fopen (status_log, "r");
if (fp == NULL) {
- printf (_("ERROR - Cannot open status log for reading!\n"));
+ printf (_("CRITICAL - Cannot open status log for reading!\n"));
return STATE_CRITICAL;
}
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (progname, "$Revision$");
+ print_revision (progname, revision);
exit (STATE_OK);
case 'F': /* status log */
status_log = optarg;
diff --git a/plugins/check_nt.c b/plugins/check_nt.c
index 84b78bc5060a961fce56cabe4cd3abc42d3c8a82..15f3dc33a26def20689db2e7c5a645ec968b9773 100644 (file)
--- a/plugins/check_nt.c
+++ b/plugins/check_nt.c
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if(process_arguments(argc,argv)==ERROR)
- usage(_("check_nt: could not parse arguments\n"));
+ if(process_arguments(argc,argv) != OK)
+ usage (_("check_nt: could not parse arguments\n"));
/* initialize alarm signal handling */
signal(SIGALRM,socket_timeout_alarm_handler);
diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c
index ec5d5d6c3544227925b1c60d824ca0b6dd5e034f..6a21f90175684db0d7d8faabfd85e7da4a7bf0e6 100644 (file)
--- a/plugins/check_nwstat.c
+++ b/plugins/check_nwstat.c
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments(argc,argv)==ERROR)
- usage(_("check_nwstat: could not parse arguments\n"));
+ if (process_arguments(argc,argv) != OK)
+ usage (_("check_nwstat: could not parse arguments\n"));
/* initialize alarm signal handling */
signal(SIGALRM,socket_timeout_alarm_handler);
return result;
if (!strcmp(recv_buffer,"-1\n")) {
- asprintf (&output_message,_("Error: Volume '%s' does not exist!"),volume_name);
+ asprintf (&output_message,_("CRITICAL - Volume '%s' does not exist!"),volume_name);
result=STATE_CRITICAL;
} else {
free_disk_space=strtoul(recv_buffer,NULL,10);
if (!strcmp(recv_buffer,"-1\n")) {
- asprintf (&output_message,_("Error: Volume '%s' does not exist!"),volume_name);
+ asprintf (&output_message,_("CRITICAL - Volume '%s' does not exist!"),volume_name);
result=STATE_CRITICAL;
} else {
return result;
if (!strcmp(recv_buffer,"-1\n")) {
- asprintf (&output_message,_("Error: Volume '%s' does not exist!"),volume_name);
+ asprintf (&output_message,_("CRITICAL - Volume '%s' does not exist!"),volume_name);
result=STATE_CRITICAL;
} else {
purgeable_disk_space=strtoul(recv_buffer,NULL,10);
if (!strcmp(recv_buffer,"-1\n")) {
- asprintf (&output_message,_("Error: Volume '%s' does not exist!"),volume_name);
+ asprintf (&output_message,_("CRITICAL - Volume '%s' does not exist!"),volume_name);
result=STATE_CRITICAL;
} else {
return result;
if (!strcmp(recv_buffer,"-1\n")) {
- asprintf (&output_message,_("Error: Volume '%s' does not exist!"),volume_name);
+ asprintf (&output_message,_("CRITICAL - Volume '%s' does not exist!"),volume_name);
result=STATE_CRITICAL;
} else {
non_purgeable_disk_space=strtoul(recv_buffer,NULL,10);
if (!strcmp(recv_buffer,"-1\n")) {
- asprintf (&output_message,_("Error: Volume '%s' does not exist!"),volume_name);
+ asprintf (&output_message,_("CRITICAL - Volume '%s' does not exist!"),volume_name);
result=STATE_CRITICAL;
} else {
diff --git a/plugins/check_overcr.c b/plugins/check_overcr.c
index 6682d8e68f9478eebe6c2d9e9d4d6e4737e1a4b5..fea87dae76df198f9b8c9e0cfe5087a6698c95f8 100644 (file)
--- a/plugins/check_overcr.c
+++ b/plugins/check_overcr.c
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_overcr: could not parse arguments\n"));
/* initialize alarm signal handling */
/* error if we couldn't find the info for the disk */
if (found_disk == FALSE)
die (STATE_CRITICAL,
- "Error: Disk '%s' non-existent or not mounted",
+ "CRITICAL - Disk '%s' non-existent or not mounted",
disk_name);
if (check_critical_value == TRUE && (percent_used_disk_space >= critical_value))
print_help ();
exit (STATE_OK);
case 'V': /* version */
- print_revision (progname, "$Revision$");
+ print_revision (progname, revision);
exit (STATE_OK);
case 'H': /* hostname */
server_address = optarg;
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index 53ba2950f6feb0940b0399e7b3db6f1900de06c2..bbf47f07be755ec298d22ee5271f424090953e49 100644 (file)
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_pgsql: could not parse arguments\n"));
/* Set signal handling and alarm */
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 260e1b651a02921df0225d1147c7d9d26d3f6f25..0e090542217f46365b52e127fdaa4243a0757190 100644 (file)
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
addresses = malloc (sizeof(char*) * max_addr);
addresses[0] = NULL;
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_ping: could not parse arguments\n"));
/* Set signal handling and alarm */
if (pl == UNKNOWN_PACKET_LOSS || rta < 0.0) {
printf ("%s\n", cmd);
die (STATE_UNKNOWN,
- _("Error: Could not interpret output from ping command\n"));
+ _("CRITICAL - Could not interpret output from ping command\n"));
}
if (pl >= cpl || rta >= crta || rta < 0)
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 011661c189325717064f70b15d17f83437a86e54..b7f32c7c7f7aab5a17ac8fca88d249164e10babe 100644 (file)
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
asprintf (&metric_name, "PROCS");
metric = METRIC_PROCS;
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_procs: could not parse arguments\n"));
/* Set signal handling and alarm timeout */
diff --git a/plugins/check_radius.c b/plugins/check_radius.c
index 3e6bdcae5880bca166cea2d699983fbeb5800822..b15ad6e7870726ff2e8af130d60f5eb6d3c04019 100644 (file)
--- a/plugins/check_radius.c
+++ b/plugins/check_radius.c
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_radius: could not parse arguments\n"));
str = strdup ("dictionary");
diff --git a/plugins/check_real.c b/plugins/check_real.c
index 3686ff4b15f2fe706b60b4188ea2862b415fcc9a..59ad7d0396bd994337bda387eaf348b641e7d53e 100644 (file)
--- a/plugins/check_real.c
+++ b/plugins/check_real.c
}
break;
case 'V': /* version */
- print_revision (progname, "$Revision$");
+ print_revision (progname, revision);
exit (STATE_OK);
case 'h': /* help */
print_help ();
char *myport;
asprintf (&myport, "%d", PORT);
- print_revision (progname, "$Revision$");
+ print_revision (progname, revision);
printf ("Copyright (c) 1999 Pedro Leite <leite@cic.ua.pt>\n");
printf (COPYRIGHT, copyright, email);
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 7d0ebc92ed9a21cc59c39d04e8f464473573f1dd..5167eb584d35a94f37af92e135cc53fcb5aacc72 100644 (file)
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
output_delim = strdup (DEFAULT_OUTPUT_DELIMITER);
miblist = strdup (DEFAULT_MIBLIST);
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_snmp: could not parse arguments\n"));
/* create the command line to execute */
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index b78443fe5a1ec3a1f3b2f7057c309ecb478b10b3..46dd044d11ff5f204252c449cf0e8c89da11677f 100644 (file)
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_ssh: could not parse arguments\n"));
/* initialize alarm signal handling */
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index 285932d5a8d53cb74d8c38b56ef581f19dfb3f60..da70c5de0ff87279ca2f4de7379bf00bc4fd1871 100644 (file)
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
}
else {
progname = strdup ("check_tcp");
- usage (_("ERROR: Generic check_tcp called with unknown service\n"));
+ usage (_("CRITICAL - Generic check_tcp called with unknown service\n"));
}
server_address = strdup ("127.0.0.1");
server_quit = QUIT;
status = strdup ("");
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_tcp: could not parse arguments\n"));
/* use default expect if none listed in process_arguments() */
#ifdef HAVE_SSL
if (use_ssl && check_cert == TRUE) {
if (connect_SSL () != OK)
- die (STATE_CRITICAL,"TCP CRITICAL - Could not make SSL connection\n");
+ die (STATE_CRITICAL,"CRITICAL - Could not make SSL connection\n");
if ((server_cert = SSL_get_peer_certificate (ssl)) != NULL) {
result = check_certificate (&server_cert);
X509_free(server_cert);
}
else {
- printf("ERROR: Cannot retrieve server certificate.\n");
+ printf("CRITICAL Cannot retrieve server certificate.\n");
result = STATE_CRITICAL;
}
SSL_shutdown (ssl);
OpenSSL_add_all_algorithms();
if ((ctx = SSL_CTX_new (meth)) == NULL)
{
- printf (_("ERROR: Cannot create SSL context.\n"));
+ printf (_("CRITICAL - Cannot create SSL context.\n"));
return STATE_CRITICAL;
}
if (SSL_connect(ssl) == 1)
return OK;
/* ERR_print_errors_fp (stderr); */
- printf (_("ERROR: Cannot make SSL connection "));
+ printf (_("CRITICAL - Cannot make SSL connection "));
ERR_print_errors_fp (stdout);
/* printf("\n"); */
}
else
{
- printf (_("ERROR: Cannot initiate SSL handshake.\n"));
+ printf (_("CRITICAL - Cannot initiate SSL handshake.\n"));
}
SSL_free (ssl);
}
/* Generate tm structure to process timestamp */
if (tm->type == V_ASN1_UTCTIME) {
if (tm->length < 10) {
- printf ("ERROR: Wrong time format in certificate.\n");
+ printf ("CRITICAL - Wrong time format in certificate.\n");
return STATE_CRITICAL;
}
else {
}
else {
if (tm->length < 12) {
- printf ("ERROR: Wrong time format in certificate.\n");
+ printf ("CRITICAL - Wrong time format in certificate.\n");
return STATE_CRITICAL;
}
else {
diff --git a/plugins/check_time.c b/plugins/check_time.c
index 617b9e023a8ca0feb5f4c9f077de0ab760c64770..7c4fe41a8b08133fe20d0c7ddbaee76f324a7daf 100644 (file)
--- a/plugins/check_time.c
+++ b/plugins/check_time.c
else
result = STATE_UNKNOWN;
die (result,
- _("TIME UNKNOWN - no data on recv() from server %s, port %d\n"),
+ _("TIME UNKNOWN - no data received from server %s, port %d\n"),
server_address, server_port);
}
diff --git a/plugins/check_udp.c b/plugins/check_udp.c
index 64ab83a7df6ae7fa30c35f1acdd54fed81c184cf..3706a72b16ae62e0e3015b74993449b1b63ed1e0 100644 (file)
--- a/plugins/check_udp.c
+++ b/plugins/check_udp.c
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("check_udp: could not parse arguments\n"));
/* initialize alarm signal handling */
diff --git a/plugins/check_ups.c b/plugins/check_ups.c
index 7f88ec309e2de96cc11bbc8a7646cd3bf401c7c5..0e23c53789b9b8cdd9268358daa183127c0afdc5 100644 (file)
--- a/plugins/check_ups.c
+++ b/plugins/check_ups.c
ptr = temp_buffer + strlen (varname) + 5;
if (!strcmp (ptr, "NOT-SUPPORTED")) {
- printf ("Error: Variable '%s' is not supported\n", varname);
+ printf ("CRITICAL - Variable '%s' is not supported\n", varname);
return ERROR;
}
if (!strcmp (ptr, "DATA-STALE")) {
- printf ("Error: UPS data is stale\n");
+ printf ("CRITICAL - UPS data is stale\n");
return ERROR;
}
if (!strcmp (ptr, "UNKNOWN-UPS")) {
if (ups_name)
- printf ("Error: UPS '%s' is unknown\n", ups_name);
+ printf ("CRITICAL - UPS '%s' is unknown\n", ups_name);
else
- printf ("Error: UPS is unknown\n");
+ printf ("CRITICAL - UPS is unknown\n");
return ERROR;
}
diff --git a/plugins/negate.c b/plugins/negate.c
index 9e5cf46fd8a490e9bebec8b24b534ac7696cf340..93ef46b2ffdcda6bbca606a0286cb95518fa5c0d 100644 (file)
--- a/plugins/negate.c
+++ b/plugins/negate.c
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- if (process_arguments (argc, argv) == ERROR)
+ if (process_arguments (argc, argv) != OK)
usage (_("negate: could not parse arguments\n"));
/* Set signal handling and alarm */
diff --git a/plugins/popen.c b/plugins/popen.c
index d527c222906d63c23a912c9fee34b14d17b2e37d..f05fe974efa2d30d4552ba3ac642ee58ad10283c 100644 (file)
--- a/plugins/popen.c
+++ b/plugins/popen.c
str += strspn (str, " \t\r\n"); /* trim any leading whitespace */
if (i >= argc - 2) {
- printf ("You've got a big problem buddy! You need more args!!!\n");
+ printf ("CRITICAL - You need more args!!!\n");
return (NULL);
}