aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_fping.c109
-rw-r--r--plugins/check_snmp.c4
2 files changed, 53 insertions, 60 deletions
diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index ac203f52..86170d57 100644
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
@@ -22,17 +22,20 @@
*
* Description:
*
-* This plugin will use the /bin/fping command (form saint) to ping
+* This plugin will use the /bin/fping command (from saint) to ping
* the specified host for a fast check if the host is alive. Note that
* it is necessary to set the suid flag on fping.
******************************************************************************/
-#include "config.h"
+const char *progname = "check_fping";
+const char *revision = "$Revision$";
+const char *copyright = "1999-2003";
+const char *email = "nagiosplug-devel@lists.sourceforge.net";
+
#include "common.h"
#include "popen.h"
#include "utils.h"
-const char *progname = "check_fping";
#define PACKET_COUNT 1
#define PACKET_SIZE 56
#define UNKNOWN_PACKET_LOSS 200 /* 200% */
@@ -41,11 +44,54 @@ const char *progname = "check_fping";
#define PL 0
#define RTA 1
+void
+print_usage (void)
+{
+ printf (_("Usage: %s <host_address>\n"), progname);
+}
+
+void
+print_help (void)
+{
+
+ print_revision (progname, "$Revision$");
+
+ printf (_("\
+Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n\n\
+This plugin will use the /bin/fping command (from saint) to ping the\n\
+specified host for a fast check if the host is alive. Note that it is\n\
+necessary to set the suid flag on fping.\n\n"));
+
+ print_usage ();
+
+ printf (_(UT_HELP_VRSN));
+
+ printf (_("\
+ -H, --hostname=HOST\n\
+ Name or IP Address of host to ping (IP Address bypasses name lookup,\n\
+ reducing system load)\n\
+ -w, --warning=THRESHOLD\n\
+ warning threshold pair\n\
+ -c, --critical=THRESHOLD\n\
+ critical threshold pair\n\
+ -b, --bytes=INTEGER\n\
+ Size of ICMP packet (default: %d)\n\
+ -n, --number=INTEGER\n\
+ Number of ICMP packets to send (default: %d)\n"),
+ PACKET_SIZE, PACKET_COUNT);
+
+ printf (_(UT_VERBOSE));
+
+ printf (_("\n\
+THRESHOLD is <rta>,<pl>%% where <rta> is the round trip average travel\n\
+time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the\n\
+percentage of packet loss to trigger an alarm state.\n"));
+
+}
+
int textscan (char *buf);
int process_arguments (int, char **);
int get_threshold (char *arg, char *rv[2]);
-void print_usage (void);
-void print_help (void);
char *server_name = NULL;
int cpl = UNKNOWN_PACKET_LOSS;
@@ -343,56 +389,3 @@ get_threshold (char *arg, char *rv[2])
return OK;
}
-
-
-
-
-
-void
-print_usage (void)
-{
- printf ("Usage: %s <host_address>\n", progname);
-}
-
-
-
-
-
-void
-print_help (void)
-{
-
- print_revision (progname, "$Revision$");
-
- printf
- ("Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n\n"
- "This plugin will use the /bin/fping command (from saint) to ping the\n"
- "specified host for a fast check if the host is alive. Note that it is\n"
- "necessary to set the suid flag on fping.\n\n");
-
- print_usage ();
-
- printf
- ("\nOptions:\n"
- "-H, --hostname=HOST\n"
- " Name or IP Address of host to ping (IP Address bypasses name lookup,\n"
- " reducing system load)\n"
- "-w, --warning=THRESHOLD\n"
- " warning threshold pair\n"
- "-c, --critical=THRESHOLD\n"
- " critical threshold pair\n"
- "-b, --bytes=INTEGER\n"
- " Size of ICMP packet (default: %d)\n"
- "-n, --number=INTEGER\n"
- " Number of ICMP packets to send (default: %d)\n"
- "-v, --verbose\n"
- " Show details for command-line debugging (do not use with nagios server)\n"
- "-h, --help\n"
- " Print this help screen\n"
- "-V, --version\n"
- " Print version information\n"
- "THRESHOLD is <rta>,<pl>%% where <rta> is the round trip average travel\n"
- "time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the\n"
- "percentage of packet loss to trigger an alarm state.\n",
- PACKET_SIZE, PACKET_COUNT);
-}
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index 097c30ea..821f10ec 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -65,7 +65,7 @@ print_help (void)
printf (_(COPYRIGHT), copyright, email);
printf (_("\
-Check status of remote machines and obtain sustem information via SNMP"));
+Check status of remote machines and obtain sustem information via SNMP\n\n"));
print_usage ();
@@ -133,7 +133,7 @@ Check status of remote machines and obtain sustem information via SNMP"));
printf (_(UT_VERBOSE));
- printf (_("\
+ printf (_("\n\
- This plugin uses the 'snmpget' command included with the NET-SNMP package.\n\
If you don't have the package installed, you will need to download it from\n\
http://net-snmp.sourceforge.net before you can use this plugin.\n"));