Back to index

nagios-plugins  1.4.16
check_ping.c
Go to the documentation of this file.
00001 /*****************************************************************************
00002 * 
00003 * Nagios check_ping plugin
00004 * 
00005 * License: GPL
00006 * Copyright (c) 2000-2007 Nagios Plugins Development Team
00007 * 
00008 * Description:
00009 * 
00010 * This file contains the check_ping plugin
00011 * 
00012 * Use the ping program to check connection statistics for a remote host.
00013 * 
00014 * 
00015 * This program is free software: you can redistribute it and/or modify
00016 * it under the terms of the GNU General Public License as published by
00017 * the Free Software Foundation, either version 3 of the License, or
00018 * (at your option) any later version.
00019 * 
00020 * This program is distributed in the hope that it will be useful,
00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 * GNU General Public License for more details.
00024 * 
00025 * You should have received a copy of the GNU General Public License
00026 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00027 * 
00028 * 
00029 *****************************************************************************/
00030 
00031 const char *progname = "check_ping";
00032 const char *copyright = "2000-2007";
00033 const char *email = "nagiosplug-devel@lists.sourceforge.net";
00034 
00035 #include "common.h"
00036 #include "netutils.h"
00037 #include "popen.h"
00038 #include "utils.h"
00039 
00040 #define WARN_DUPLICATES "DUPLICATES FOUND! "
00041 #define UNKNOWN_TRIP_TIME -1.0     /* -1 seconds */
00042 
00043 enum {
00044        UNKNOWN_PACKET_LOSS = 200,    /* 200% */
00045        DEFAULT_MAX_PACKETS = 5       /* default no. of ICMP ECHO packets */
00046 };
00047 
00048 int process_arguments (int, char **);
00049 int get_threshold (char *, float *, int *);
00050 int validate_arguments (void);
00051 int run_ping (const char *cmd, const char *addr);
00052 int error_scan (char buf[MAX_INPUT_BUFFER], const char *addr);
00053 void print_usage (void);
00054 void print_help (void);
00055 
00056 int display_html = FALSE;
00057 int wpl = UNKNOWN_PACKET_LOSS;
00058 int cpl = UNKNOWN_PACKET_LOSS;
00059 float wrta = UNKNOWN_TRIP_TIME;
00060 float crta = UNKNOWN_TRIP_TIME;
00061 char **addresses = NULL;
00062 int n_addresses = 0;
00063 int max_addr = 1;
00064 int max_packets = -1;
00065 int verbose = 0;
00066 
00067 float rta = UNKNOWN_TRIP_TIME;
00068 int pl = UNKNOWN_PACKET_LOSS;
00069 
00070 char *warn_text;
00071 
00072 
00073 
00074 int
00075 main (int argc, char **argv)
00076 {
00077        char *cmd = NULL;
00078        char *rawcmd = NULL;
00079        int result = STATE_UNKNOWN;
00080        int this_result = STATE_UNKNOWN;
00081        int i;
00082 
00083        setlocale (LC_ALL, "");
00084        setlocale (LC_NUMERIC, "C");
00085        bindtextdomain (PACKAGE, LOCALEDIR);
00086        textdomain (PACKAGE);
00087 
00088        addresses = malloc (sizeof(char*) * max_addr);
00089        addresses[0] = NULL;
00090 
00091        /* Parse extra opts if any */
00092        argv=np_extra_opts (&argc, argv, progname);
00093 
00094        if (process_arguments (argc, argv) == ERROR)
00095               usage4 (_("Could not parse arguments"));
00096 
00097        /* Set signal handling and alarm */
00098        if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) {
00099               usage4 (_("Cannot catch SIGALRM"));
00100        }
00101 
00102        /* If ./configure finds ping has timeout values, set plugin alarm slightly
00103         * higher so that we can use response from command line ping */
00104 #if defined(PING_PACKETS_FIRST) && defined(PING_HAS_TIMEOUT)
00105        alarm (timeout_interval + 1);
00106 #else
00107        alarm (timeout_interval);
00108 #endif
00109 
00110        for (i = 0 ; i < n_addresses ; i++) {
00111 
00112 #ifdef PING6_COMMAND
00113               if (address_family != AF_INET && is_inet6_addr(addresses[i]))
00114                      rawcmd = strdup(PING6_COMMAND);
00115               else
00116                      rawcmd = strdup(PING_COMMAND);
00117 #else
00118               rawcmd = strdup(PING_COMMAND);
00119 #endif
00120 
00121               /* does the host address of number of packets argument come first? */
00122 #ifdef PING_PACKETS_FIRST
00123 # ifdef PING_HAS_TIMEOUT
00124               asprintf (&cmd, rawcmd, timeout_interval, max_packets, addresses[i]);
00125 # else
00126               asprintf (&cmd, rawcmd, max_packets, addresses[i]);
00127 # endif
00128 #else
00129               asprintf (&cmd, rawcmd, addresses[i], max_packets);
00130 #endif
00131 
00132               if (verbose >= 2)
00133                      printf ("CMD: %s\n", cmd);
00134 
00135               /* run the command */
00136               this_result = run_ping (cmd, addresses[i]);
00137 
00138               if (pl == UNKNOWN_PACKET_LOSS || rta < 0.0) {
00139                      printf ("%s\n", cmd);
00140                      die (STATE_UNKNOWN,
00141                                 _("CRITICAL - Could not interpret output from ping command\n"));
00142               }
00143 
00144               if (pl >= cpl || rta >= crta || rta < 0)
00145                      this_result = STATE_CRITICAL;
00146               else if (pl >= wpl || rta >= wrta)
00147                      this_result = STATE_WARNING;
00148               else if (pl >= 0 && rta >= 0)
00149                      this_result = max_state (STATE_OK, this_result);
00150 
00151               if (n_addresses > 1 && this_result != STATE_UNKNOWN)
00152                      die (STATE_OK, "%s is alive\n", addresses[i]);
00153 
00154               if (display_html == TRUE)
00155                      printf ("<A HREF='%s/traceroute.cgi?%s'>", CGIURL, addresses[i]);
00156               if (pl == 100)
00157                      printf (_("PING %s - %sPacket loss = %d%%"), state_text (this_result), warn_text,
00158                                                  pl);
00159               else
00160                      printf (_("PING %s - %sPacket loss = %d%%, RTA = %2.2f ms"),
00161                                                  state_text (this_result), warn_text, pl, rta);
00162               if (display_html == TRUE)
00163                      printf ("</A>");
00164 
00165               /* Print performance data */
00166               printf("|%s", fperfdata ("rta", (double) rta, "ms",
00167                                         wrta>0?TRUE:FALSE, wrta,
00168                                         crta>0?TRUE:FALSE, crta,
00169                                         TRUE, 0, FALSE, 0));
00170               printf(" %s\n", perfdata ("pl", (long) pl, "%",
00171                                         wpl>0?TRUE:FALSE, wpl,
00172                                         cpl>0?TRUE:FALSE, cpl,
00173                                         TRUE, 0, FALSE, 0));
00174 
00175               if (verbose >= 2)
00176                      printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl);
00177 
00178               result = max_state (result, this_result);
00179               free (rawcmd);
00180               free (cmd);
00181        }
00182 
00183        return result;
00184 }
00185 
00186 
00187 
00188 /* process command-line arguments */
00189 int
00190 process_arguments (int argc, char **argv)
00191 {
00192        int c = 1;
00193        char *ptr;
00194 
00195        int option = 0;
00196        static struct option longopts[] = {
00197               STD_LONG_OPTS,
00198               {"packets", required_argument, 0, 'p'},
00199               {"nohtml", no_argument, 0, 'n'},
00200               {"link", no_argument, 0, 'L'},
00201               {"use-ipv4", no_argument, 0, '4'},
00202               {"use-ipv6", no_argument, 0, '6'},
00203               {0, 0, 0, 0}
00204        };
00205 
00206        if (argc < 2)
00207               return ERROR;
00208 
00209        for (c = 1; c < argc; c++) {
00210               if (strcmp ("-to", argv[c]) == 0)
00211                      strcpy (argv[c], "-t");
00212               if (strcmp ("-nohtml", argv[c]) == 0)
00213                      strcpy (argv[c], "-n");
00214        }
00215 
00216        while (1) {
00217               c = getopt_long (argc, argv, "VvhnL46t:c:w:H:p:", longopts, &option);
00218 
00219               if (c == -1 || c == EOF)
00220                      break;
00221 
00222               switch (c) {
00223               case '?':     /* usage */
00224                      usage5 ();
00225               case 'h':     /* help */
00226                      print_help ();
00227                      exit (STATE_OK);
00228                      break;
00229               case 'V':     /* version */
00230                      print_revision (progname, NP_VERSION);
00231                      exit (STATE_OK);
00232                      break;
00233               case 't':     /* timeout period */
00234                      timeout_interval = atoi (optarg);
00235                      break;
00236               case 'v':     /* verbose mode */
00237                      verbose++;
00238                      break;
00239               case '4':     /* IPv4 only */
00240                      address_family = AF_INET;
00241                      break;
00242               case '6':     /* IPv6 only */
00243 #ifdef USE_IPV6
00244                      address_family = AF_INET6;
00245 #else
00246                      usage (_("IPv6 support not available\n"));
00247 #endif
00248                      break;
00249               case 'H':     /* hostname */
00250                      ptr=optarg;
00251                      while (1) {
00252                             n_addresses++;
00253                             if (n_addresses > max_addr) {
00254                                    max_addr *= 2;
00255                                    addresses = realloc (addresses, sizeof(char*) * max_addr);
00256                                    if (addresses == NULL)
00257                                           die (STATE_UNKNOWN, _("Could not realloc() addresses\n"));
00258                             }
00259                             addresses[n_addresses-1] = ptr;
00260                             if ((ptr = index (ptr, ','))) {
00261                                    strcpy (ptr, "");
00262                                    ptr += sizeof(char);
00263                             } else {
00264                                    break;
00265                             }
00266                      }
00267                      break;
00268               case 'p':     /* number of packets to send */
00269                      if (is_intnonneg (optarg))
00270                             max_packets = atoi (optarg);
00271                      else
00272                             usage2 (_("<max_packets> (%s) must be a non-negative number\n"), optarg);
00273                      break;
00274               case 'n':     /* no HTML */
00275                      display_html = FALSE;
00276                      break;
00277               case 'L':     /* show HTML */
00278                      display_html = TRUE;
00279                      break;
00280               case 'c':
00281                      get_threshold (optarg, &crta, &cpl);
00282                      break;
00283               case 'w':
00284                      get_threshold (optarg, &wrta, &wpl);
00285                      break;
00286               }
00287        }
00288 
00289        c = optind;
00290        if (c == argc)
00291               return validate_arguments ();
00292 
00293        if (addresses[0] == NULL) {
00294               if (is_host (argv[c]) == FALSE) {
00295                      usage2 (_("Invalid hostname/address"), argv[c]);
00296               } else {
00297                      addresses[0] = argv[c++];
00298                      n_addresses++;
00299                      if (c == argc)
00300                             return validate_arguments ();
00301               }
00302        }
00303 
00304        if (wpl == UNKNOWN_PACKET_LOSS) {
00305               if (is_intpercent (argv[c]) == FALSE) {
00306                      printf (_("<wpl> (%s) must be an integer percentage\n"), argv[c]);
00307                      return ERROR;
00308               } else {
00309                      wpl = atoi (argv[c++]);
00310                      if (c == argc)
00311                             return validate_arguments ();
00312               }
00313        }
00314 
00315        if (cpl == UNKNOWN_PACKET_LOSS) {
00316               if (is_intpercent (argv[c]) == FALSE) {
00317                      printf (_("<cpl> (%s) must be an integer percentage\n"), argv[c]);
00318                      return ERROR;
00319               } else {
00320                      cpl = atoi (argv[c++]);
00321                      if (c == argc)
00322                             return validate_arguments ();
00323               }
00324        }
00325 
00326        if (wrta < 0.0) {
00327               if (is_negative (argv[c])) {
00328                      printf (_("<wrta> (%s) must be a non-negative number\n"), argv[c]);
00329                      return ERROR;
00330               } else {
00331                      wrta = atof (argv[c++]);
00332                      if (c == argc)
00333                             return validate_arguments ();
00334               }
00335        }
00336 
00337        if (crta < 0.0) {
00338               if (is_negative (argv[c])) {
00339                      printf (_("<crta> (%s) must be a non-negative number\n"), argv[c]);
00340                      return ERROR;
00341               } else {
00342                      crta = atof (argv[c++]);
00343                      if (c == argc)
00344                             return validate_arguments ();
00345               }
00346        }
00347 
00348        if (max_packets == -1) {
00349               if (is_intnonneg (argv[c])) {
00350                      max_packets = atoi (argv[c++]);
00351               } else {
00352                      printf (_("<max_packets> (%s) must be a non-negative number\n"), argv[c]);
00353                      return ERROR;
00354               }
00355        }
00356 
00357        return validate_arguments ();
00358 }
00359 
00360 
00361 
00362 int
00363 get_threshold (char *arg, float *trta, int *tpl)
00364 {
00365        if (is_intnonneg (arg) && sscanf (arg, "%f", trta) == 1)
00366               return OK;
00367        else if (strpbrk (arg, ",:") && strstr (arg, "%") && sscanf (arg, "%f%*[:,]%d%%", trta, tpl) == 2)
00368               return OK;
00369        else if (strstr (arg, "%") && sscanf (arg, "%d%%", tpl) == 1)
00370               return OK;
00371 
00372        usage2 (_("%s: Warning threshold must be integer or percentage!\n\n"), arg);
00373        return STATE_UNKNOWN;
00374 }
00375 
00376 
00377 
00378 int
00379 validate_arguments ()
00380 {
00381        float max_seconds;
00382        int i;
00383 
00384        if (wrta < 0.0) {
00385               printf (_("<wrta> was not set\n"));
00386               return ERROR;
00387        }
00388        else if (crta < 0.0) {
00389               printf (_("<crta> was not set\n"));
00390               return ERROR;
00391        }
00392        else if (wpl == UNKNOWN_PACKET_LOSS) {
00393               printf (_("<wpl> was not set\n"));
00394               return ERROR;
00395        }
00396        else if (cpl == UNKNOWN_PACKET_LOSS) {
00397               printf (_("<cpl> was not set\n"));
00398               return ERROR;
00399        }
00400        else if (wrta > crta) {
00401               printf (_("<wrta> (%f) cannot be larger than <crta> (%f)\n"), wrta, crta);
00402               return ERROR;
00403        }
00404        else if (wpl > cpl) {
00405               printf (_("<wpl> (%d) cannot be larger than <cpl> (%d)\n"), wpl, cpl);
00406               return ERROR;
00407        }
00408 
00409        if (max_packets == -1)
00410               max_packets = DEFAULT_MAX_PACKETS;
00411 
00412        max_seconds = crta / 1000.0 * max_packets + max_packets;
00413        if (max_seconds > timeout_interval)
00414               timeout_interval = (int)max_seconds;
00415 
00416        for (i=0; i<n_addresses; i++) {
00417               if (is_host(addresses[i]) == FALSE)
00418                      usage2 (_("Invalid hostname/address"), addresses[i]);
00419        }
00420 
00421        if (n_addresses == 0) {
00422               usage (_("You must specify a server address or host name"));
00423        }
00424 
00425        return OK;
00426 }
00427 
00428 
00429 
00430 int
00431 run_ping (const char *cmd, const char *addr)
00432 {
00433        char buf[MAX_INPUT_BUFFER];
00434        int result = STATE_UNKNOWN;
00435        int match;
00436 
00437        if ((child_process = spopen (cmd)) == NULL)
00438               die (STATE_UNKNOWN, _("Could not open pipe: %s\n"), cmd);
00439 
00440        child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r");
00441        if (child_stderr == NULL)
00442               printf (_("Cannot open stderr for %s\n"), cmd);
00443 
00444        while (fgets (buf, MAX_INPUT_BUFFER - 1, child_process)) {
00445 
00446               if (verbose >= 3)
00447                      printf("Output: %s", buf);
00448 
00449               result = max_state (result, error_scan (buf, addr));
00450 
00451               /* get the percent loss statistics */
00452               match = 0;
00453               if((sscanf(buf,"%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss%n",&pl,&match) && match) ||
00454                       (sscanf(buf,"%*d packets transmitted, %*d packets received, +%*d duplicates, %d%% packet loss%n",&pl,&match) && match) ||
00455                       (sscanf(buf,"%*d packets transmitted, %*d received, +%*d duplicates, %d%% packet loss%n",&pl,&match) && match) ||
00456                       (sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% packet loss%n",&pl,&match) && match) ||
00457                       (sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% loss, time%n",&pl,&match) && match) ||
00458                       (sscanf(buf,"%*d packets transmitted, %*d received, %d%% loss, time%n",&pl,&match) && match) ||
00459                       (sscanf(buf,"%*d packets transmitted, %*d received, %d%% packet loss, time%n",&pl,&match) && match) ||
00460                       (sscanf(buf,"%*d packets transmitted, %*d received, +%*d errors, %d%% packet loss%n",&pl,&match) && match) ||
00461                       (sscanf(buf,"%*d packets transmitted %*d received, +%*d errors, %d%% packet loss%n",&pl,&match) && match)
00462                       )
00463                      continue;
00464 
00465               /* get the round trip average */
00466               else
00467                      if((sscanf(buf,"round-trip min/avg/max = %*f/%f/%*f%n",&rta,&match) && match) ||
00468                              (sscanf(buf,"round-trip min/avg/max/mdev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
00469                              (sscanf(buf,"round-trip min/avg/max/sdev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
00470                              (sscanf(buf,"round-trip min/avg/max/stddev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
00471                              (sscanf(buf,"round-trip min/avg/max/std-dev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
00472                              (sscanf(buf,"round-trip (ms) min/avg/max = %*f/%f/%*f%n",&rta,&match) && match) ||
00473                              (sscanf(buf,"round-trip (ms) min/avg/max/stddev = %*f/%f/%*f/%*f%n",&rta,&match) && match) ||
00474                              (sscanf(buf,"rtt min/avg/max/mdev = %*f/%f/%*f/%*f ms%n",&rta,&match) && match))
00475                      continue;
00476        }
00477 
00478        /* this is needed because there is no rta if all packets are lost */
00479        if (pl == 100)
00480               rta = crta;
00481 
00482        /* check stderr, setting at least WARNING if there is output here */
00483        /* Add warning into warn_text */
00484        while (fgets (buf, MAX_INPUT_BUFFER - 1, child_stderr)) {
00485               if (! strstr(buf,"WARNING - no SO_TIMESTAMP support, falling back to SIOCGSTAMP")) {
00486                      if (verbose >= 3) {
00487                             printf("Got stderr: %s", buf);
00488                      }
00489                      if ((result=error_scan(buf, addr)) == STATE_OK) {
00490                             result = STATE_WARNING;
00491                             if (warn_text == NULL) {
00492                                    warn_text = strdup(_("System call sent warnings to stderr "));
00493                             } else {
00494                                    asprintf(&warn_text, "%s %s", warn_text, _("System call sent warnings to stderr "));
00495                             }
00496                      }
00497               }
00498        }
00499 
00500        (void) fclose (child_stderr);
00501 
00502 
00503        spclose (child_process);
00504 
00505        if (warn_text == NULL)
00506               warn_text = strdup("");
00507 
00508        return result;
00509 }
00510 
00511 
00512 
00513 int
00514 error_scan (char buf[MAX_INPUT_BUFFER], const char *addr)
00515 {
00516        if (strstr (buf, "Network is unreachable") ||
00517               strstr (buf, "Destination Net Unreachable")
00518               )
00519               die (STATE_CRITICAL, _("CRITICAL - Network Unreachable (%s)\n"), addr);
00520        else if (strstr (buf, "Destination Host Unreachable"))
00521               die (STATE_CRITICAL, _("CRITICAL - Host Unreachable (%s)\n"), addr);
00522        else if (strstr (buf, "Destination Port Unreachable"))
00523               die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Port Unreachable (%s)\n"), addr);
00524        else if (strstr (buf, "Destination Protocol Unreachable"))
00525               die (STATE_CRITICAL, _("CRITICAL - Bogus ICMP: Protocol Unreachable (%s)\n"), addr);
00526        else if (strstr (buf, "Destination Net Prohibited"))
00527               die (STATE_CRITICAL, _("CRITICAL - Network Prohibited (%s)\n"), addr);
00528        else if (strstr (buf, "Destination Host Prohibited"))
00529               die (STATE_CRITICAL, _("CRITICAL - Host Prohibited (%s)\n"), addr);
00530        else if (strstr (buf, "Packet filtered"))
00531               die (STATE_CRITICAL, _("CRITICAL - Packet Filtered (%s)\n"), addr);
00532        else if (strstr (buf, "unknown host" ))
00533               die (STATE_CRITICAL, _("CRITICAL - Host not found (%s)\n"), addr);
00534        else if (strstr (buf, "Time to live exceeded"))
00535               die (STATE_CRITICAL, _("CRITICAL - Time to live exceeded (%s)\n"), addr);
00536        else if (strstr (buf, "Destination unreachable: "))
00537               die (STATE_CRITICAL, _("CRITICAL - Destination Unreachable (%s)\n"), addr);
00538 
00539        if (strstr (buf, "(DUP!)") || strstr (buf, "DUPLICATES FOUND")) {
00540               if (warn_text == NULL)
00541                      warn_text = strdup (_(WARN_DUPLICATES));
00542               else if (! strstr (warn_text, _(WARN_DUPLICATES)) &&
00543                        asprintf (&warn_text, "%s %s", warn_text, _(WARN_DUPLICATES)) == -1)
00544                      die (STATE_UNKNOWN, _("Unable to realloc warn_text\n"));
00545               return (STATE_WARNING);
00546        }
00547 
00548        return (STATE_OK);
00549 }
00550 
00551 
00552 
00553 void
00554 print_help (void)
00555 {
00556        print_revision (progname, NP_VERSION);
00557 
00558        printf ("Copyright (c) 1999 Ethan Galstad <nagios@nagios.org>\n");
00559        printf (COPYRIGHT, copyright, email);
00560 
00561        printf (_("Use ping to check connection statistics for a remote host."));
00562 
00563   printf ("\n\n");
00564 
00565        print_usage ();
00566 
00567        printf (UT_HELP_VRSN);
00568        printf (UT_EXTRA_OPTS);
00569 
00570        printf (UT_IPv46);
00571 
00572        printf (" %s\n", "-H, --hostname=HOST");
00573   printf ("    %s\n", _("host to ping"));
00574   printf (" %s\n", "-w, --warning=THRESHOLD");
00575   printf ("    %s\n", _("warning threshold pair"));
00576   printf (" %s\n", "-c, --critical=THRESHOLD");
00577   printf ("    %s\n", _("critical threshold pair"));
00578   printf (" %s\n", "-p, --packets=INTEGER");
00579   printf ("    %s ", _("number of ICMP ECHO packets to send"));
00580   printf (_("(Default: %d)\n"), DEFAULT_MAX_PACKETS);
00581   printf (" %s\n", "-L, --link");
00582   printf ("    %s\n", _("show HTML in the plugin output (obsoleted by urlize)"));
00583 
00584        printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
00585 
00586   printf ("\n");
00587        printf ("%s\n", _("THRESHOLD is <rta>,<pl>% where <rta> is the round trip average travel"));
00588   printf ("%s\n", _("time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the"));
00589   printf ("%s\n", _("percentage of packet loss to trigger an alarm state."));
00590 
00591   printf ("\n");
00592        printf ("%s\n", _("This plugin uses the ping command to probe the specified host for packet loss"));
00593   printf ("%s\n", _("(percentage) and round trip average (milliseconds). It can produce HTML output"));
00594   printf ("%s\n", _("linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in"));
00595   printf ("%s\n", _("the contrib area of the downloads section at http://www.nagios.org/"));
00596 
00597        printf (UT_SUPPORT);
00598 }
00599 
00600 void
00601 print_usage (void)
00602 {
00603   printf ("%s\n", _("Usage:"));
00604        printf ("%s -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n", progname);
00605   printf (" [-p packets] [-t timeout] [-4|-6]\n");
00606 }