diff options
Diffstat (limited to 'plugins/check_tcp.c')
| -rw-r--r-- | plugins/check_tcp.c | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 872a3ccd..eb31774d 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
| @@ -99,39 +99,26 @@ print_usage (void) | |||
| 99 | printf (_("\ | 99 | printf (_("\ |
| 100 | Usage: %s -H host -p port [-w <warning time>] [-c <critical time>]\n\ | 100 | Usage: %s -H host -p port [-w <warning time>] [-c <critical time>]\n\ |
| 101 | [-s <send string>] [-e <expect string>] [-q <quit string>]\n\ | 101 | [-s <send string>] [-e <expect string>] [-q <quit string>]\n\ |
| 102 | [-m <maximum bytes>] [-d <delay>] [-t <timeout seconds>]\n\ | 102 | [-m <maximum bytes>] [-d <delay>] [-t <timeout seconds>]\n\ |
| 103 | [-r <refuse state>] [-v] [-4|-6]\n"), progname); | 103 | [-r <refuse state>] [-v] [-4|-6]\n"), progname); |
| 104 | printf (" %s (-h|--help)\n", progname); | 104 | printf (" %s (-h|--help)\n", progname); |
| 105 | printf (" %s (-V|--version)\n", progname); | 105 | printf (" %s (-V|--version)\n", progname); |
| 106 | } | 106 | } |
| 107 | |||
| 108 | void | 107 | void |
| 109 | print_help (void) | 108 | print_help (void) |
| 110 | { | 109 | { |
| 111 | print_revision (progname, revision); | 110 | print_revision (progname, revision); |
| 112 | 111 | ||
| 113 | printf (_("\ | 112 | printf (_(COPYRIGHT), copyright, email); |
| 114 | Copyright (c) %s Nagios Plugin Development Team\n\ | ||
| 115 | \t<%s>\n\n"), | ||
| 116 | copyright, email); | ||
| 117 | 113 | ||
| 118 | printf (_("\ | 114 | printf (_("This plugin tests %s connections with the specified host.\n\n"), |
| 119 | This plugin tests %s connections with the specified host.\n\n"), | ||
| 120 | SERVICE); | 115 | SERVICE); |
| 121 | 116 | ||
| 122 | print_usage (); | 117 | print_usage (); |
| 123 | 118 | ||
| 124 | printf (_("\ | 119 | printf (_(HELP_VRSN)); |
| 125 | \nOptions:\n\ | 120 | |
| 126 | -H, --hostname=ADDRESS\n\ | 121 | printf (_(HOST_PORT_46), 'p', "none"); |
| 127 | Host name argument for servers using host headers (use numeric\n\ | ||
| 128 | address if possible to bypass DNS lookup).\n\ | ||
| 129 | -p, --port=INTEGER\n\ | ||
| 130 | Port number\n\ | ||
| 131 | -4, --use-ipv4\n\ | ||
| 132 | Use IPv4 connection\n\ | ||
| 133 | -6, --use-ipv6\n\ | ||
| 134 | Use IPv6 connection\n")); | ||
| 135 | 122 | ||
| 136 | printf (_("\ | 123 | printf (_("\ |
| 137 | -s, --send=STRING\n\ | 124 | -s, --send=STRING\n\ |
| @@ -147,22 +134,11 @@ This plugin tests %s connections with the specified host.\n\n"), | |||
| 147 | -m, --maxbytes=INTEGER\n\ | 134 | -m, --maxbytes=INTEGER\n\ |
| 148 | Close connection once more than this number of bytes are received\n\ | 135 | Close connection once more than this number of bytes are received\n\ |
| 149 | -d, --delay=INTEGER\n\ | 136 | -d, --delay=INTEGER\n\ |
| 150 | Seconds to wait between sending string and polling for response\n\ | 137 | Seconds to wait between sending string and polling for response\n")); |
| 151 | -w, --warning=DOUBLE\n\ | ||
| 152 | Response time to result in warning status (seconds)\n\ | ||
| 153 | -c, --critical=DOUBLE\n\ | ||
| 154 | Response time to result in critical status (seconds)\n")); | ||
| 155 | 138 | ||
| 156 | printf (_("\ | 139 | printf (_(WARN_CRIT_TO), DEFAULT_SOCKET_TIMEOUT); |
| 157 | -t, --timeout=INTEGER\n\ | 140 | |
| 158 | Seconds before connection times out (default: %d)\n\ | 141 | printf (_(VRBS)); |
| 159 | -v, --verbose\n\ | ||
| 160 | Show details for command-line debugging (Nagios may truncate output)\n\ | ||
| 161 | -h, --help\n\ | ||
| 162 | Print detailed help screen\n\ | ||
| 163 | -V, --version\n\ | ||
| 164 | Print version information\n\n"), | ||
| 165 | DEFAULT_SOCKET_TIMEOUT); | ||
| 166 | 142 | ||
| 167 | support (); | 143 | support (); |
| 168 | } | 144 | } |
