summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2006-06-20 11:17:03 (GMT)
committerBenoit Mortier <opensides@users.sourceforge.net>2006-06-20 11:17:03 (GMT)
commitf2d66913f9451674bb7b6dec514cf2fdff9698bc (patch)
tree1f2d685ee02370308f319fabf88ee976b5abac8d
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
-rw-r--r--plugins/check_procs.c47
-rw-r--r--plugins/check_radius.c108
-rw-r--r--plugins/check_real.c83
-rw-r--r--plugins/check_smtp.c129
-rw-r--r--plugins/check_snmp.c58
-rw-r--r--plugins/check_ssh.c62
6 files changed, 281 insertions, 206 deletions
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 030ef02..f6438f2 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -1,21 +1,34 @@
1/****************************************************************************** 1/******************************************************************************
2 2*
3 This program is free software; you can redistribute it and/or modify 3* Nagios check_procs 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_procs 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* $Id$
31*
19******************************************************************************/ 32******************************************************************************/
20 33
21const char *progname = "check_procs"; 34const char *progname = "check_procs";
diff --git a/plugins/check_radius.c b/plugins/check_radius.c
index 07ee4c7..8ee6dd4 100644
--- a/plugins/check_radius.c
+++ b/plugins/check_radius.c
@@ -1,26 +1,39 @@
1/****************************************************************************** 1/******************************************************************************
2 2*
3 This program is free software; you can redistribute it and/or modify 3* Nagios check_radius 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_radius 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 ******************************************************************************/ 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* $Id$
31*
32*******************************************************************************/
20 33
21const char *progname = "check_radius"; 34const char *progname = "check_radius";
22const char *revision = "$Revision$"; 35const char *revision = "$Revision$";
23const char *copyright = "2000-2003"; 36const char *copyright = "2000-2006";
24const char *email = "nagiosplug-devel@lists.sourceforge.net"; 37const char *email = "nagiosplug-devel@lists.sourceforge.net";
25 38
26#include "common.h" 39#include "common.h"
@@ -285,7 +298,9 @@ print_help (void)
285 printf ("Copyright (c) 1999 Robert August Vincent II\n"); 298 printf ("Copyright (c) 1999 Robert August Vincent II\n");
286 printf (COPYRIGHT, copyright, email); 299 printf (COPYRIGHT, copyright, email);
287 300
288 printf(_("Tests to see if a radius server is accepting connections.\n\n")); 301 printf("%s\n", _("Tests to see if a radius server is accepting connections."));
302
303 printf ("\n\n");
289 304
290 print_usage (); 305 print_usage ();
291 306
@@ -293,36 +308,31 @@ print_help (void)
293 308
294 printf (_(UT_HOST_PORT), 'P', myport); 309 printf (_(UT_HOST_PORT), 'P', myport);
295 310
296 printf (_("\ 311 printf (" %s\n", "-u, --username=STRING");
297 -u, --username=STRING\n\ 312 printf (" %s\n", _("The user to authenticate"));
298 The user to authenticate\n\ 313 printf (" %s\n", "-p, --password=STRING");
299 -p, --password=STRING\n\ 314 printf (" %s\n", _("Password for autentication (SECURITY RISK)"));
300 Password for autentication (SECURITY RISK)\n\ 315 printf (" %s\n", "-n, --nas-id=STRING");
301 -n, --nas-id=STRING\n\ 316 printf (" %s\n", _("NAS identifier"));
302 NAS identifier\n\ 317 printf (" %s\n", "-F, --filename=STRING");
303 -F, --filename=STRING\n\ 318 printf (" %s\n", _("Configuration file"));
304 Configuration file\n\ 319 printf (" %s\n", "-e, --expect=STRING");
305 -e, --expect=STRING\n\ 320 printf (" %s\n", _("Response string to expect from the server"));
306 Response string to expect from the server\n\ 321 printf (" %s\n", "-r, --retries=INTEGER");
307 -r, --retries=INTEGER\n\ 322 printf (" %s\n", _("Number of times to retry a failed connection"));
308 Number of times to retry a failed connection\n"));
309 323
310 printf (_(UT_TIMEOUT), timeout_interval); 324 printf (_(UT_TIMEOUT), timeout_interval);
311 325
312 printf (_("\n\ 326 printf ("%s\n", _("This plugin tests a radius server to see if it is accepting connections."));
313This plugin tests a radius server to see if it is accepting connections.\n\ 327 printf ("%s\n", _("The server to test must be specified in the invocation, as well as a user"));
314\n\ 328 printf ("%s\n", _("name and password. A configuration file may also be present. The format of"));
315The server to test must be specified in the invocation, as well as a user\n\ 329 printf ("%s\n", _("the configuration file is described in the radiusclient library sources."));
316name and password. A configuration file may also be present. The format of\n\ 330 printf ("%s\n", _("The password option presents a substantial security issue because the"));
317the configuration file is described in the radiusclient library sources.\n\n")); 331 printf ("%s\n", _("password can be determined by careful watching of the command line in"));
318 332 printf ("%s\n", _("a process listing. This risk is exacerbated because nagios will"));
319 printf (_("\ 333 printf ("%s\n", _("run the plugin at regular prdictable intervals. Please be sure that"));
320The password option presents a substantial security issue because the\n\ 334 printf ("%s\n", _("the password used does not allow access to sensitive system resources,"));
321password can be determined by careful watching of the command line in\n\ 335 printf ("%s\n", _("otherwise compormise could occur."));
322a process listing. This risk is exacerbated because nagios will\n\
323run the plugin at regular prdictable intervals. Please be sure that\n\
324the password used does not allow access to sensitive system resources,\n\
325otherwise compormise could occur.\n"));
326 336
327 printf (_(UT_SUPPORT)); 337 printf (_(UT_SUPPORT));
328} 338}
@@ -332,7 +342,7 @@ otherwise compormise could occur.\n"));
332void 342void
333print_usage (void) 343print_usage (void)
334{ 344{
335 printf ("\ 345 printf (_("Usage:"));
336Usage: %s -H host -F config_file -u username -p password [-n nas-id] [-P port]\n\ 346 printf ("%s -H host -F config_file -u username -p password [-n nas-id] [-P port]\n\
337 [-t timeout] [-r retries] [-e expect]\n", progname); 347 [-t timeout] [-r retries] [-e expect]\n", progname);
338} 348}
diff --git a/plugins/check_real.c b/plugins/check_real.c
index eb892c7..7922bfa 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}
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 3dc444f..e7cf2ea 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.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_smtp 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_smtp 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_smtp"; 35const char *progname = "check_smtp";
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"
@@ -657,6 +671,15 @@ validate_arguments (void)
657} 671}
658 672
659 673
674int
675my_close (void)
676{
677#ifdef HAVE_SSL
678 np_net_ssl_cleanup();
679#endif
680 return close(sd);
681}
682
660 683
661void 684void
662print_help (void) 685print_help (void)
@@ -669,7 +692,9 @@ print_help (void)
669 printf ("Copyright (c) 1999-2001 Ethan Galstad <nagios@nagios.org>\n"); 692 printf ("Copyright (c) 1999-2001 Ethan Galstad <nagios@nagios.org>\n");
670 printf (COPYRIGHT, copyright, email); 693 printf (COPYRIGHT, copyright, email);
671 694
672 printf(_("This plugin will attempt to open an SMTP connection with the host.\n\n")); 695 printf("%s\n", _("This plugin will attempt to open an SMTP connection with the host."));
696
697 printf ("\n\n");
673 698
674 print_usage (); 699 print_usage ();
675 700
@@ -679,34 +704,29 @@ print_help (void)
679 704
680 printf (_(UT_IPv46)); 705 printf (_(UT_IPv46));
681 706
682 printf (_("\ 707 printf (" %s\n", "-e, --expect=STRING");
683 -e, --expect=STRING\n\ 708 printf (_("String to expect in first line of server response (default: '%s')"),SMTP_EXPECT);
684 String to expect in first line of server response (default: '%s')\n\ 709 printf (" %s\n\n", "-n, nocommand\n");
685 -n, nocommand\n\ 710 printf (" %s\n", _("Suppress SMTP command"));
686 Suppress SMTP command\n\ 711 printf (" %s\n", "-C, --command=STRING");
687 -C, --command=STRING\n\ 712 printf (" %s\n", _("SMTP command (may be used repeatedly)"));
688 SMTP command (may be used repeatedly)\n\ 713 printf (" %s\n", "-R, --command=STRING");
689 -R, --command=STRING\n\ 714 printf (" %s\n", _("Expected response to command (may be used repeatedly)"));
690 Expected response to command (may be used repeatedly)\n\ 715 printf (" %s\n", "-f, --from=STRING");
691 -f, --from=STRING\n\ 716 printf (" %s\n", _("FROM-address to include in MAIL command, required by Exchange 2000")),
692 FROM-address to include in MAIL command, required by Exchange 2000\n"),
693 SMTP_EXPECT);
694#ifdef HAVE_SSL 717#ifdef HAVE_SSL
695 printf (_("\ 718 printf (" %s\n", "-D, --certificate=INTEGER");
696 -D, --certificate=INTEGER\n\ 719 printf (" %s\n", _("Minimum number of days a certificate has to be valid."));
697 Minimum number of days a certificate has to be valid.\n\ 720 printf (" %s\n", "-S, --starttls");
698 -S, --starttls\n\ 721 printf (" %s\n", _("Use STARTTLS for the connection."));
699 Use STARTTLS for the connection.\n"));
700#endif 722#endif
701 723
702 printf("\ 724 printf (" %s\n", "-A, --authtype=STRING");
703 -A, --authtype=STRING\n\ 725 printf (" %s\n", _("SMTP AUTH type to check (default none, only LOGIN supported)"));
704 SMTP AUTH type to check (default none, only LOGIN supported)\n\ 726 printf (" %s\n", "-U, --authuser=STRING");
705 -U, --authuser=STRING\n\ 727 printf (" %s\n", _("SMTP AUTH username"));
706 SMTP AUTH username\n\ 728 printf (" %s\n", "-P, --authpass=STRING");
707 -P, --authpass=STRING\n\ 729 printf (" %s\n", _("SMTP AUTH password"));
708 SMTP AUTH password\n\
709 ");
710 730
711 printf (_(UT_WARN_CRIT)); 731 printf (_(UT_WARN_CRIT));
712 732
@@ -714,11 +734,10 @@ print_help (void)
714 734
715 printf (_(UT_VERBOSE)); 735 printf (_(UT_VERBOSE));
716 736
717 printf(_("\n\ 737 printf ("%s\n", _("Successul connects return STATE_OK, refusals and timeouts return"));
718Successul connects return STATE_OK, refusals and timeouts return\n\ 738 printf ("%s\n", _("STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful"));
719STATE_CRITICAL, other errors return STATE_UNKNOWN. Successful\n\ 739 printf ("%s\n", _("connects, but incorrect reponse messages from the host result in"));
720connects, but incorrect reponse messages from the host result in\n\ 740 printf ("%s\n", _("STATE_WARNING return values."));
721STATE_WARNING return values.\n"));
722 741
723 printf (_(UT_SUPPORT)); 742 printf (_(UT_SUPPORT));
724} 743}
@@ -728,17 +747,9 @@ STATE_WARNING return values.\n"));
728void 747void
729print_usage (void) 748print_usage (void)
730{ 749{
731 printf ("\ 750 printf (_("Usage:"));
732Usage: %s -H host [-p port] [-e expect] [-C command] [-f from addr]\n\ 751 printf ("%s -H host [-p port] [-e expect] [-C command] [-f from addr]\n\
733 [-A authtype -U authuser -P authpass]\n\ 752 [-A authtype -U authuser -P authpass]\n\
734 [-w warn] [-c crit] [-t timeout] [-S] [-D days] [-n] [-v] [-4|-6]\n", progname); 753 [-w warn] [-c crit] [-t timeout] [-S] [-D days] [-n] [-v] [-4|-6]\n", progname);
735} 754}
736 755
737int
738my_close (void)
739{
740#ifdef HAVE_SSL
741 np_net_ssl_cleanup();
742#endif
743 return close(sd);
744}
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 9ff3439..e2b4555 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -1,26 +1,39 @@
1/****************************************************************************** 1/******************************************************************************
2 2*
3 This program is free software; you can redistribute it and/or modify 3* Nagios check_snmp 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_snmp 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* $Id$
31*
19******************************************************************************/ 32******************************************************************************/
20 33
21const char *progname = "check_snmp"; 34const char *progname = "check_snmp";
22const char *revision = "$Revision$"; 35const char *revision = "$Revision$";
23const char *copyright = "1999-2004"; 36const char *copyright = "1999-2006";
24const char *email = "nagiosplug-devel@lists.sourceforge.net"; 37const char *email = "nagiosplug-devel@lists.sourceforge.net";
25 38
26#include "common.h" 39#include "common.h"
@@ -884,8 +897,9 @@ print_help (void)
884 897
885 printf (COPYRIGHT, copyright, email); 898 printf (COPYRIGHT, copyright, email);
886 899
887 printf (_("\ 900 printf ("%s\n", _("Check status of remote machines and obtain sustem information via SNMP"));
888Check status of remote machines and obtain sustem information via SNMP\n\n")); 901
902 printf ("\n\n");
889 903
890 print_usage (); 904 print_usage ();
891 905
@@ -992,8 +1006,8 @@ Check status of remote machines and obtain sustem information via SNMP\n\n"));
992void 1006void
993print_usage (void) 1007print_usage (void)
994{ 1008{
995 printf ("\ 1009 printf (_("Usage:"));
996Usage: %s -H <ip_address> -o <OID> [-w warn_range] [-c crit_range] \n\ 1010 printf ("%s -H <ip_address> -o <OID> [-w warn_range] [-c crit_range] \n\
997 [-C community] [-s string] [-r regex] [-R regexi]\n\ 1011 [-C community] [-s string] [-r regex] [-R regexi]\n\
998 [-t timeout] [-e retries]\n\ 1012 [-t timeout] [-e retries]\n\
999 [-l label] [-u units] [-p port-number] [-d delimiter]\n\ 1013 [-l label] [-u units] [-p port-number] [-d delimiter]\n\
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index 5617add..1a99e24 100644
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
@@ -1,26 +1,39 @@
1/****************************************************************************** 1/******************************************************************************
2 2*
3 This program is free software; you can redistribute it and/or modify 3* Nagios check_ssh 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_ssh 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* $Id$
31*
19******************************************************************************/ 32******************************************************************************/
20 33
21const char *progname = "check_ssh"; 34const char *progname = "check_ssh";
22const char *revision = "$Revision$"; 35const char *revision = "$Revision$";
23const char *copyright = "2000-2004"; 36const char *copyright = "2000-2006";
24const char *email = "nagiosplug-devel@lists.sourceforge.net"; 37const char *email = "nagiosplug-devel@lists.sourceforge.net";
25 38
26#include "common.h" 39#include "common.h"
@@ -258,7 +271,9 @@ print_help (void)
258 printf ("Copyright (c) 1999 Remi Paulmier <remi@sinfomic.fr>\n"); 271 printf ("Copyright (c) 1999 Remi Paulmier <remi@sinfomic.fr>\n");
259 printf (COPYRIGHT, copyright, email); 272 printf (COPYRIGHT, copyright, email);
260 273
261 printf (_("Try to connect to an SSH server at specified server and port\n\n")); 274 printf ("%s\n", _("Try to connect to an SSH server at specified server and port"));
275
276 printf ("\n\n");
262 277
263 print_usage (); 278 print_usage ();
264 279
@@ -270,9 +285,8 @@ print_help (void)
270 285
271 printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT); 286 printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
272 287
273 printf (_("\ 288 printf (" %s\n" "-r, --remote-version=STRING");
274 -r, --remote-version=STRING\n\ 289 printf (" %s\n", _("Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)"));
275 Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)\n"));
276 290
277 printf (_(UT_VERBOSE)); 291 printf (_(UT_VERBOSE));
278 292
@@ -284,7 +298,7 @@ print_help (void)
284void 298void
285print_usage (void) 299print_usage (void)
286{ 300{
287 printf ("\ 301 printf (_("Usage:"));
288Usage: %s [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>\n", progname); 302 printf ("%s [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>\n", progname);
289} 303}
290 304