summaryrefslogtreecommitdiffstats
path: root/plugins/check_real.c
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2006-06-20 11:17:03 +0000
committerBenoit Mortier <opensides@users.sourceforge.net>2006-06-20 11:17:03 +0000
commitf2d66913f9451674bb7b6dec514cf2fdff9698bc (patch)
tree1f2d685ee02370308f319fabf88ee976b5abac8d /plugins/check_real.c
parentf9394308c9c372bcf419a311c61ba420247ae613 (diff)
downloadmonitoring-plugins-f2d66913f9451674bb7b6dec514cf2fdff9698bc.tar.gz
cleaning help and usage + license
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1435 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_real.c')
-rw-r--r--plugins/check_real.c83
1 files changed, 48 insertions, 35 deletions
diff --git a/plugins/check_real.c b/plugins/check_real.c
index eb892c77..7922bfa9 100644
--- a/plugins/check_real.c
+++ b/plugins/check_real.c
@@ -1,26 +1,40 @@
1/****************************************************************************** 1/******************************************************************************
2 2*
3 This program is free software; you can redistribute it and/or modify 3* Nagios check_real plugin
4 it under the terms of the GNU General Public License as published by 4*
5 the Free Software Foundation; either version 2 of the License, or 5* License: GPL
6 (at your option) any later version. 6* Copyright (c) 1999-2006 nagios-plugins team
7 7*
8 This program is distributed in the hope that it will be useful, 8* Last Modified: $Date$
9 but WITHOUT ANY WARRANTY; without even the implied warranty of 9*
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10* Description:
11 GNU General Public License for more details. 11*
12 12* This file contains the check_real plugin
13 You should have received a copy of the GNU General Public License 13*
14 along with this program; if not, write to the Free Software 14* License Information:
15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 15*
16 16* This program is free software; you can redistribute it and/or modify
17 $Id$ 17* it under the terms of the GNU General Public License as published by
18 18* the Free Software Foundation; either version 2 of the License, or
19* (at your option) any later version.
20*
21* This program is distributed in the hope that it will be useful,
22* but WITHOUT ANY WARRANTY; without even the implied warranty of
23* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24* GNU General Public License for more details.
25*
26* You should have received a copy of the GNU General Public License
27* along with this program; if not, write to the Free Software
28* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29*
30*
31* $Id$
32*
19******************************************************************************/ 33******************************************************************************/
20 34
21const char *progname = "check_real"; 35const char *progname = "check_real";
22const char *revision = "$Revision$"; 36const char *revision = "$Revision$";
23const char *copyright = "2000-2004"; 37const char *copyright = "2000-2006";
24const char *email = "nagiosplug-devel@lists.sourceforge.net"; 38const char *email = "nagiosplug-devel@lists.sourceforge.net";
25 39
26#include "common.h" 40#include "common.h"
@@ -103,7 +117,7 @@ main (int argc, char **argv)
103 /* make sure we find the response we are looking for */ 117 /* make sure we find the response we are looking for */
104 if (!strstr (buffer, server_expect)) { 118 if (!strstr (buffer, server_expect)) {
105 if (server_port == PORT) 119 if (server_port == PORT)
106 printf (_("Invalid REAL response received from host\n")); 120 printf ("%s\n", _("Invalid REAL response received from host"));
107 else 121 else
108 printf (_("Invalid REAL response received from host on port %d\n"), 122 printf (_("Invalid REAL response received from host on port %d\n"),
109 server_port); 123 server_port);
@@ -176,7 +190,7 @@ main (int argc, char **argv)
176 /* make sure we find the response we are looking for */ 190 /* make sure we find the response we are looking for */
177 if (!strstr (buffer, server_expect)) { 191 if (!strstr (buffer, server_expect)) {
178 if (server_port == PORT) 192 if (server_port == PORT)
179 printf (_("Invalid REAL response received from host\n")); 193 printf ("%s\n", _("Invalid REAL response received from host"));
180 else 194 else
181 printf (_("Invalid REAL response received from host on port %d\n"), 195 printf (_("Invalid REAL response received from host on port %d\n"),
182 server_port); 196 server_port);
@@ -398,7 +412,9 @@ print_help (void)
398 printf ("Copyright (c) 1999 Pedro Leite <leite@cic.ua.pt>\n"); 412 printf ("Copyright (c) 1999 Pedro Leite <leite@cic.ua.pt>\n");
399 printf (COPYRIGHT, copyright, email); 413 printf (COPYRIGHT, copyright, email);
400 414
401 printf (_("This plugin tests the REAL service on the specified host.\n\n")); 415 printf ("%s\n", _("This plugin tests the REAL service on the specified host."));
416
417 printf ("\n\n");
402 418
403 print_usage (); 419 print_usage ();
404 420
@@ -406,11 +422,10 @@ print_help (void)
406 422
407 printf (_(UT_HOST_PORT), 'p', myport); 423 printf (_(UT_HOST_PORT), 'p', myport);
408 424
409 printf (_("\ 425 printf (" %s\n", "-u, --url=STRING");
410 -u, --url=STRING\n\ 426 printf (" %s\n", _("Connect to this url"));
411 Connect to this url\n\ 427 printf (" %s\n", "-e, --expect=STRING");
412 -e, --expect=STRING\n\ 428 printf (_("String to expect in first line of server response (default: %s)\n"),
413 String to expect in first line of server response (default: %s)\n"),
414 EXPECT); 429 EXPECT);
415 430
416 printf (_(UT_WARN_CRIT)); 431 printf (_(UT_WARN_CRIT));
@@ -419,12 +434,11 @@ print_help (void)
419 434
420 printf (_(UT_VERBOSE)); 435 printf (_(UT_VERBOSE));
421 436
422 printf(_("\ 437 printf ("%s\n", _("This plugin will attempt to open an RTSP connection with the host."));
423This plugin will attempt to open an RTSP connection with the host.\n\ 438 printf ("%s\n", _("Successul connects return STATE_OK, refusals and timeouts return"));
424Successul connects return STATE_OK, refusals and timeouts return\n\ 439 printf ("%s\n", _("STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful connects,"));
425STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful connects,\n\ 440 printf ("%s\n", _("but incorrect reponse messages from the host result in STATE_WARNING return"));
426but incorrect reponse messages from the host result in STATE_WARNING return\n\ 441 printf ("%s\n", _("values."));
427values."));
428 442
429 printf (_(UT_SUPPORT)); 443 printf (_(UT_SUPPORT));
430} 444}
@@ -434,7 +448,6 @@ values."));
434void 448void
435print_usage (void) 449print_usage (void)
436{ 450{
437 printf ("\ 451 printf (_("Usage:"));
438Usage: %s -H host [-e expect] [-p port] [-w warn] [-c crit]\n\ 452 printf ("%s -H host [-e expect] [-p port] [-w warn] [-c crit] [-t timeout] [-v]\n", progname);
439 [-t timeout] [-v]\n", progname);
440} 453}