Code

Standardising translation texts
[nagiosplug.git] / plugins / check_by_ssh.c
index 0bce902f5d2ab96d7f924154f2451dba94eb90e2..49794cc7c0552eeba1f565bee60dbffa7720cef9 100644 (file)
@@ -86,7 +86,7 @@ main (int argc, char **argv)
        child_process = spopen (comm);
 
        if (child_process == NULL) {
-               printf (_("Unable to open pipe: %s"), comm);
+               printf (_("Could not open pipe: %s\n"), comm);
                return STATE_UNKNOWN;
        }
 
@@ -145,7 +145,7 @@ main (int argc, char **argv)
                                eol[0] = 0;
                        if (service[commands] && status_text
                                        && sscanf (status_text, "STATUS CODE: %d", &cresult) == 1) {
-                               fprintf (fp, _("[%d] PROCESS_SERVICE_CHECK_RESULT;%s;%s;%d;%s\n"),
+                               fprintf (fp, "[%d] PROCESS_SERVICE_CHECK_RESULT;%s;%s;%d;%s\n",
                                                                 (int) local_time, host_shortname, service[commands++], cresult,
                                                                 output);
                        }
@@ -232,13 +232,13 @@ process_arguments (int argc, char **argv)
                        break;
                case 't':                                                                       /* timeout period */
                        if (!is_integer (optarg))
-                               usage2 (_("timeout interval must be an integer"), optarg);
+                               usage2 (_("Timeout interval must be a positive integer"), optarg);
                        else
                                timeout_interval = atoi (optarg);
                        break;
                case 'H':                                                                       /* host */
                        if (!is_host (optarg))
-                               usage2 (_("invalid host name"), optarg);
+                               usage2 (_("Invalid host name"), optarg);
                        hostname = optarg;
                        break;
                case 'p': /* port number */
@@ -404,6 +404,14 @@ To use passive mode, provide multiple '-C' options, and provide\n\
 all of -O, -s, and -n options (servicelist order must match '-C'\n\
 options)\n"));
 
+       printf (_("\n\
+$ check_by_ssh -H localhost -n lh -s c1:c2:c3 \\\n\
+    -C uptime -C uptime -C uptime -O /tmp/foo\n\
+$ cat /tmp/foo\n\
+[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c1;0; up 2 days...\n\
+[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c2;0; up 2 days...\n\
+[1080933700] PROCESS_SERVICE_CHECK_RESULT;flint;c3;0; up 2 days...\n"));
+
        printf (_(UT_SUPPORT));
 }