summaryrefslogtreecommitdiffstats
path: root/plugins/check_fping.c
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-08-02 18:22:15 (GMT)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-08-02 18:22:15 (GMT)
commit743a44e936edbb649e67f99fdf7712e1c60eee39 (patch)
tree1dcc4bd093f199eaac39b7649df652a9c53ac477 /plugins/check_fping.c
parentb07cec408f61acd3c34ad1c03b212bba9b66c454 (diff)
downloadmonitoring-plugins-743a44e936edbb649e67f99fdf7712e1c60eee39.tar.gz
markup for translation
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@632 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_fping.c')
-rw-r--r--plugins/check_fping.c109
1 files changed, 51 insertions, 58 deletions
diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index ac203f5..86170d5 100644
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
@@ -22,17 +22,20 @@
22* 22*
23* Description: 23* Description:
24* 24*
25* This plugin will use the /bin/fping command (form saint) to ping 25* This plugin will use the /bin/fping command (from saint) to ping
26* the specified host for a fast check if the host is alive. Note that 26* the specified host for a fast check if the host is alive. Note that
27* it is necessary to set the suid flag on fping. 27* it is necessary to set the suid flag on fping.
28******************************************************************************/ 28******************************************************************************/
29 29
30#include "config.h" 30const char *progname = "check_fping";
31const char *revision = "$Revision$";
32const char *copyright = "1999-2003";
33const char *email = "nagiosplug-devel@lists.sourceforge.net";
34
31#include "common.h" 35#include "common.h"
32#include "popen.h" 36#include "popen.h"
33#include "utils.h" 37#include "utils.h"
34 38
35const char *progname = "check_fping";
36#define PACKET_COUNT 1 39#define PACKET_COUNT 1
37#define PACKET_SIZE 56 40#define PACKET_SIZE 56
38#define UNKNOWN_PACKET_LOSS 200 /* 200% */ 41#define UNKNOWN_PACKET_LOSS 200 /* 200% */
@@ -41,11 +44,54 @@ const char *progname = "check_fping";
41#define PL 0 44#define PL 0
42#define RTA 1 45#define RTA 1
43 46
47void
48print_usage (void)
49{
50 printf (_("Usage: %s <host_address>\n"), progname);
51}
52
53void
54print_help (void)
55{
56
57 print_revision (progname, "$Revision$");
58
59 printf (_("\
60Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n\n\
61This plugin will use the /bin/fping command (from saint) to ping the\n\
62specified host for a fast check if the host is alive. Note that it is\n\
63necessary to set the suid flag on fping.\n\n"));
64
65 print_usage ();
66
67 printf (_(UT_HELP_VRSN));
68
69 printf (_("\
70 -H, --hostname=HOST\n\
71 Name or IP Address of host to ping (IP Address bypasses name lookup,\n\
72 reducing system load)\n\
73 -w, --warning=THRESHOLD\n\
74 warning threshold pair\n\
75 -c, --critical=THRESHOLD\n\
76 critical threshold pair\n\
77 -b, --bytes=INTEGER\n\
78 Size of ICMP packet (default: %d)\n\
79 -n, --number=INTEGER\n\
80 Number of ICMP packets to send (default: %d)\n"),
81 PACKET_SIZE, PACKET_COUNT);
82
83 printf (_(UT_VERBOSE));
84
85 printf (_("\n\
86THRESHOLD is <rta>,<pl>%% where <rta> is the round trip average travel\n\
87time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the\n\
88percentage of packet loss to trigger an alarm state.\n"));
89
90}
91
44int textscan (char *buf); 92int textscan (char *buf);
45int process_arguments (int, char **); 93int process_arguments (int, char **);
46int get_threshold (char *arg, char *rv[2]); 94int get_threshold (char *arg, char *rv[2]);
47void print_usage (void);
48void print_help (void);
49 95
50char *server_name = NULL; 96char *server_name = NULL;
51int cpl = UNKNOWN_PACKET_LOSS; 97int cpl = UNKNOWN_PACKET_LOSS;
@@ -343,56 +389,3 @@ get_threshold (char *arg, char *rv[2])
343 389
344 return OK; 390 return OK;
345} 391}
346
347
348
349
350
351void
352print_usage (void)
353{
354 printf ("Usage: %s <host_address>\n", progname);
355}
356
357
358
359
360
361void
362print_help (void)
363{
364
365 print_revision (progname, "$Revision$");
366
367 printf
368 ("Copyright (c) 1999 Didi Rieder (adrieder@sbox.tu-graz.ac.at)\n\n"
369 "This plugin will use the /bin/fping command (from saint) to ping the\n"
370 "specified host for a fast check if the host is alive. Note that it is\n"
371 "necessary to set the suid flag on fping.\n\n");
372
373 print_usage ();
374
375 printf
376 ("\nOptions:\n"
377 "-H, --hostname=HOST\n"
378 " Name or IP Address of host to ping (IP Address bypasses name lookup,\n"
379 " reducing system load)\n"
380 "-w, --warning=THRESHOLD\n"
381 " warning threshold pair\n"
382 "-c, --critical=THRESHOLD\n"
383 " critical threshold pair\n"
384 "-b, --bytes=INTEGER\n"
385 " Size of ICMP packet (default: %d)\n"
386 "-n, --number=INTEGER\n"
387 " Number of ICMP packets to send (default: %d)\n"
388 "-v, --verbose\n"
389 " Show details for command-line debugging (do not use with nagios server)\n"
390 "-h, --help\n"
391 " Print this help screen\n"
392 "-V, --version\n"
393 " Print version information\n"
394 "THRESHOLD is <rta>,<pl>%% where <rta> is the round trip average travel\n"
395 "time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the\n"
396 "percentage of packet loss to trigger an alarm state.\n",
397 PACKET_SIZE, PACKET_COUNT);
398}