diff options
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r-- | plugins/check_http.c | 148 |
1 files changed, 120 insertions, 28 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index ddaca337..46c0c135 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -1,40 +1,40 @@ | |||
1 | /***************************************************************************** | 1 | /***************************************************************************** |
2 | * | 2 | * |
3 | * Nagios check_http plugin | 3 | * Nagios check_http plugin |
4 | * | 4 | * |
5 | * License: GPL | 5 | * License: GPL |
6 | * Copyright (c) 1999-2008 Nagios Plugins Development Team | 6 | * Copyright (c) 1999-2013 Nagios Plugins Development Team |
7 | * | 7 | * |
8 | * Description: | 8 | * Description: |
9 | * | 9 | * |
10 | * This file contains the check_http plugin | 10 | * This file contains the check_http plugin |
11 | * | 11 | * |
12 | * This plugin tests the HTTP service on the specified host. It can test | 12 | * This plugin tests the HTTP service on the specified host. It can test |
13 | * normal (http) and secure (https) servers, follow redirects, search for | 13 | * normal (http) and secure (https) servers, follow redirects, search for |
14 | * strings and regular expressions, check connection times, and report on | 14 | * strings and regular expressions, check connection times, and report on |
15 | * certificate expiration times. | 15 | * certificate expiration times. |
16 | * | 16 | * |
17 | * | 17 | * |
18 | * This program is free software: you can redistribute it and/or modify | 18 | * This program is free software: you can redistribute it and/or modify |
19 | * it under the terms of the GNU General Public License as published by | 19 | * it under the terms of the GNU General Public License as published by |
20 | * the Free Software Foundation, either version 3 of the License, or | 20 | * the Free Software Foundation, either version 3 of the License, or |
21 | * (at your option) any later version. | 21 | * (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
26 | * GNU General Public License for more details. | 26 | * GNU General Public License for more details. |
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 29 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
30 | * | 30 | * |
31 | * | 31 | * |
32 | *****************************************************************************/ | 32 | *****************************************************************************/ |
33 | 33 | ||
34 | /* splint -I. -I../../plugins -I../../lib/ -I/usr/kerberos/include/ ../../plugins/check_http.c */ | 34 | /* splint -I. -I../../plugins -I../../lib/ -I/usr/kerberos/include/ ../../plugins/check_http.c */ |
35 | 35 | ||
36 | const char *progname = "check_http"; | 36 | const char *progname = "check_http"; |
37 | const char *copyright = "1999-2011"; | 37 | const char *copyright = "1999-2013"; |
38 | const char *email = "nagiosplug-devel@lists.sourceforge.net"; | 38 | const char *email = "nagiosplug-devel@lists.sourceforge.net"; |
39 | 39 | ||
40 | #include "common.h" | 40 | #include "common.h" |
@@ -43,7 +43,6 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net"; | |||
43 | #include "base64.h" | 43 | #include "base64.h" |
44 | #include <ctype.h> | 44 | #include <ctype.h> |
45 | 45 | ||
46 | #define INPUT_DELIMITER ";" | ||
47 | #define STICKY_NONE 0 | 46 | #define STICKY_NONE 0 |
48 | #define STICKY_HOST 1 | 47 | #define STICKY_HOST 1 |
49 | #define STICKY_PORT 2 | 48 | #define STICKY_PORT 2 |
@@ -85,6 +84,7 @@ int errcode; | |||
85 | int invert_regex = 0; | 84 | int invert_regex = 0; |
86 | 85 | ||
87 | struct timeval tv; | 86 | struct timeval tv; |
87 | struct timeval tv_temp; | ||
88 | 88 | ||
89 | #define HTTP_URL "/" | 89 | #define HTTP_URL "/" |
90 | #define CRLF "\r\n" | 90 | #define CRLF "\r\n" |
@@ -100,7 +100,9 @@ char *user_agent; | |||
100 | int server_url_length; | 100 | int server_url_length; |
101 | int server_expect_yn = 0; | 101 | int server_expect_yn = 0; |
102 | char server_expect[MAX_INPUT_BUFFER] = HTTP_EXPECT; | 102 | char server_expect[MAX_INPUT_BUFFER] = HTTP_EXPECT; |
103 | char header_expect[MAX_INPUT_BUFFER] = ""; | ||
103 | char string_expect[MAX_INPUT_BUFFER] = ""; | 104 | char string_expect[MAX_INPUT_BUFFER] = ""; |
105 | char output_header_search[30] = ""; | ||
104 | char output_string_search[30] = ""; | 106 | char output_string_search[30] = ""; |
105 | char *warning_thresholds = NULL; | 107 | char *warning_thresholds = NULL; |
106 | char *critical_thresholds = NULL; | 108 | char *critical_thresholds = NULL; |
@@ -115,6 +117,7 @@ int followsticky = STICKY_NONE; | |||
115 | int use_ssl = FALSE; | 117 | int use_ssl = FALSE; |
116 | int use_sni = FALSE; | 118 | int use_sni = FALSE; |
117 | int verbose = FALSE; | 119 | int verbose = FALSE; |
120 | int show_extended_perfdata = FALSE; | ||
118 | int sd; | 121 | int sd; |
119 | int min_page_len = 0; | 122 | int min_page_len = 0; |
120 | int max_page_len = 0; | 123 | int max_page_len = 0; |
@@ -133,6 +136,11 @@ void redir (char *pos, char *status_line); | |||
133 | int server_type_check(const char *type); | 136 | int server_type_check(const char *type); |
134 | int server_port_check(int ssl_flag); | 137 | int server_port_check(int ssl_flag); |
135 | char *perfd_time (double microsec); | 138 | char *perfd_time (double microsec); |
139 | char *perfd_time_connect (double microsec); | ||
140 | char *perfd_time_ssl (double microsec); | ||
141 | char *perfd_time_firstbyte (double microsec); | ||
142 | char *perfd_time_headers (double microsec); | ||
143 | char *perfd_time_transfer (double microsec); | ||
136 | char *perfd_size (int page_len); | 144 | char *perfd_size (int page_len); |
137 | void print_help (void); | 145 | void print_help (void); |
138 | void print_usage (void); | 146 | void print_usage (void); |
@@ -208,6 +216,7 @@ process_arguments (int argc, char **argv) | |||
208 | {"port", required_argument, 0, 'p'}, | 216 | {"port", required_argument, 0, 'p'}, |
209 | {"authorization", required_argument, 0, 'a'}, | 217 | {"authorization", required_argument, 0, 'a'}, |
210 | {"proxy_authorization", required_argument, 0, 'b'}, | 218 | {"proxy_authorization", required_argument, 0, 'b'}, |
219 | {"header-string", required_argument, 0, 'd'}, | ||
211 | {"string", required_argument, 0, 's'}, | 220 | {"string", required_argument, 0, 's'}, |
212 | {"expect", required_argument, 0, 'e'}, | 221 | {"expect", required_argument, 0, 'e'}, |
213 | {"regex", required_argument, 0, 'r'}, | 222 | {"regex", required_argument, 0, 'r'}, |
@@ -216,7 +225,7 @@ process_arguments (int argc, char **argv) | |||
216 | {"linespan", no_argument, 0, 'l'}, | 225 | {"linespan", no_argument, 0, 'l'}, |
217 | {"onredirect", required_argument, 0, 'f'}, | 226 | {"onredirect", required_argument, 0, 'f'}, |
218 | {"certificate", required_argument, 0, 'C'}, | 227 | {"certificate", required_argument, 0, 'C'}, |
219 | {"client-cert", required_argument, 0, 'E'}, | 228 | {"client-cert", required_argument, 0, 'J'}, |
220 | {"private-key", required_argument, 0, 'K'}, | 229 | {"private-key", required_argument, 0, 'K'}, |
221 | {"useragent", required_argument, 0, 'A'}, | 230 | {"useragent", required_argument, 0, 'A'}, |
222 | {"header", required_argument, 0, 'k'}, | 231 | {"header", required_argument, 0, 'k'}, |
@@ -227,6 +236,7 @@ process_arguments (int argc, char **argv) | |||
227 | {"invert-regex", no_argument, NULL, INVERT_REGEX}, | 236 | {"invert-regex", no_argument, NULL, INVERT_REGEX}, |
228 | {"use-ipv4", no_argument, 0, '4'}, | 237 | {"use-ipv4", no_argument, 0, '4'}, |
229 | {"use-ipv6", no_argument, 0, '6'}, | 238 | {"use-ipv6", no_argument, 0, '6'}, |
239 | {"extended-perfdata", no_argument, 0, 'E'}, | ||
230 | {0, 0, 0, 0} | 240 | {0, 0, 0, 0} |
231 | }; | 241 | }; |
232 | 242 | ||
@@ -247,7 +257,7 @@ process_arguments (int argc, char **argv) | |||
247 | } | 257 | } |
248 | 258 | ||
249 | while (1) { | 259 | while (1) { |
250 | c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:b:e:p:s:R:r:u:f:C:E:K:nlLS::m:M:N", longopts, &option); | 260 | c = getopt_long (argc, argv, "Vvh46t:c:w:A:k:H:P:j:T:I:a:b:d:e:p:s:R:r:u:f:C:J:K:nlLS::m:M:N:E", longopts, &option); |
251 | if (c == -1 || c == EOF) | 261 | if (c == -1 || c == EOF) |
252 | break; | 262 | break; |
253 | 263 | ||
@@ -314,7 +324,7 @@ process_arguments (int argc, char **argv) | |||
314 | check_cert = TRUE; | 324 | check_cert = TRUE; |
315 | goto enable_ssl; | 325 | goto enable_ssl; |
316 | #endif | 326 | #endif |
317 | case 'E': /* use client certificate */ | 327 | case 'J': /* use client certificate */ |
318 | #ifdef HAVE_SSL | 328 | #ifdef HAVE_SSL |
319 | test_file(optarg); | 329 | test_file(optarg); |
320 | client_cert = optarg; | 330 | client_cert = optarg; |
@@ -340,7 +350,7 @@ process_arguments (int argc, char **argv) | |||
340 | if (specify_port == FALSE) | 350 | if (specify_port == FALSE) |
341 | server_port = HTTPS_PORT; | 351 | server_port = HTTPS_PORT; |
342 | #else | 352 | #else |
343 | /* -C -E and -K fall through to here without SSL */ | 353 | /* -C -J and -K fall through to here without SSL */ |
344 | usage4 (_("Invalid option - SSL is not available")); | 354 | usage4 (_("Invalid option - SSL is not available")); |
345 | #endif | 355 | #endif |
346 | break; | 356 | break; |
@@ -410,6 +420,10 @@ process_arguments (int argc, char **argv) | |||
410 | free(http_method); | 420 | free(http_method); |
411 | http_method = strdup (optarg); | 421 | http_method = strdup (optarg); |
412 | break; | 422 | break; |
423 | case 'd': /* string or substring */ | ||
424 | strncpy (header_expect, optarg, MAX_INPUT_BUFFER - 1); | ||
425 | header_expect[MAX_INPUT_BUFFER - 1] = 0; | ||
426 | break; | ||
413 | case 's': /* string or substring */ | 427 | case 's': /* string or substring */ |
414 | strncpy (string_expect, optarg, MAX_INPUT_BUFFER - 1); | 428 | strncpy (string_expect, optarg, MAX_INPUT_BUFFER - 1); |
415 | string_expect[MAX_INPUT_BUFFER - 1] = 0; | 429 | string_expect[MAX_INPUT_BUFFER - 1] = 0; |
@@ -496,6 +510,9 @@ process_arguments (int argc, char **argv) | |||
496 | } | 510 | } |
497 | } | 511 | } |
498 | break; | 512 | break; |
513 | case 'E': /* show extended perfdata */ | ||
514 | show_extended_perfdata = TRUE; | ||
515 | break; | ||
499 | } | 516 | } |
500 | } | 517 | } |
501 | 518 | ||
@@ -840,17 +857,33 @@ check_http (void) | |||
840 | char *pos; | 857 | char *pos; |
841 | long microsec; | 858 | long microsec; |
842 | double elapsed_time; | 859 | double elapsed_time; |
860 | long microsec_connect; | ||
861 | double elapsed_time_connect; | ||
862 | long microsec_ssl; | ||
863 | double elapsed_time_ssl; | ||
864 | long microsec_firstbyte; | ||
865 | double elapsed_time_firstbyte; | ||
866 | long microsec_headers; | ||
867 | double elapsed_time_headers; | ||
868 | long microsec_transfer; | ||
869 | double elapsed_time_transfer; | ||
843 | int page_len = 0; | 870 | int page_len = 0; |
844 | int result = STATE_OK; | 871 | int result = STATE_OK; |
845 | 872 | ||
846 | /* try to connect to the host at the given port number */ | 873 | /* try to connect to the host at the given port number */ |
874 | gettimeofday (&tv_temp, NULL); | ||
847 | if (my_tcp_connect (server_address, server_port, &sd) != STATE_OK) | 875 | if (my_tcp_connect (server_address, server_port, &sd) != STATE_OK) |
848 | die (STATE_CRITICAL, _("HTTP CRITICAL - Unable to open TCP socket\n")); | 876 | die (STATE_CRITICAL, _("HTTP CRITICAL - Unable to open TCP socket\n")); |
877 | microsec_connect = deltime (tv_temp); | ||
849 | #ifdef HAVE_SSL | 878 | #ifdef HAVE_SSL |
879 | elapsed_time_connect = (double)microsec_connect / 1.0e6; | ||
850 | if (use_ssl == TRUE) { | 880 | if (use_ssl == TRUE) { |
881 | gettimeofday (&tv_temp, NULL); | ||
851 | result = np_net_ssl_init_with_hostname_version_and_certificate(sd, (use_sni ? host_name : NULL), ssl_version, client_cert, client_privkey); | 882 | result = np_net_ssl_init_with_hostname_version_and_certificate(sd, (use_sni ? host_name : NULL), ssl_version, client_cert, client_privkey); |
852 | if (result != STATE_OK) | 883 | if (result != STATE_OK) |
853 | return result; | 884 | return result; |
885 | microsec_ssl = deltime (tv_temp); | ||
886 | elapsed_time_ssl = (double)microsec_ssl / 1.0e6; | ||
854 | if (check_cert == TRUE) { | 887 | if (check_cert == TRUE) { |
855 | result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit); | 888 | result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit); |
856 | np_net_ssl_cleanup(); | 889 | np_net_ssl_cleanup(); |
@@ -882,8 +915,7 @@ check_http (void) | |||
882 | /* optionally send any other header tag */ | 915 | /* optionally send any other header tag */ |
883 | if (http_opt_headers_count) { | 916 | if (http_opt_headers_count) { |
884 | for (i = 0; i < http_opt_headers_count ; i++) { | 917 | for (i = 0; i < http_opt_headers_count ; i++) { |
885 | for ((pos = strtok(http_opt_headers[i], INPUT_DELIMITER)); pos; (pos = strtok(NULL, INPUT_DELIMITER))) | 918 | xasprintf (&buf, "%s%s\r\n", buf, http_opt_headers[i]); |
886 | xasprintf (&buf, "%s%s\r\n", buf, pos); | ||
887 | } | 919 | } |
888 | /* This cannot be free'd here because a redirection will then try to access this and segfault */ | 920 | /* This cannot be free'd here because a redirection will then try to access this and segfault */ |
889 | /* Covered in a testcase in tests/check_http.t */ | 921 | /* Covered in a testcase in tests/check_http.t */ |
@@ -919,11 +951,19 @@ check_http (void) | |||
919 | } | 951 | } |
920 | 952 | ||
921 | if (verbose) printf ("%s\n", buf); | 953 | if (verbose) printf ("%s\n", buf); |
954 | gettimeofday (&tv_temp, NULL); | ||
922 | my_send (buf, strlen (buf)); | 955 | my_send (buf, strlen (buf)); |
956 | microsec_headers = deltime (tv_temp); | ||
957 | elapsed_time_headers = (double)microsec_headers / 1.0e6; | ||
923 | 958 | ||
924 | /* fetch the page */ | 959 | /* fetch the page */ |
925 | full_page = strdup(""); | 960 | full_page = strdup(""); |
961 | gettimeofday (&tv_temp, NULL); | ||
926 | while ((i = my_recv (buffer, MAX_INPUT_BUFFER-1)) > 0) { | 962 | while ((i = my_recv (buffer, MAX_INPUT_BUFFER-1)) > 0) { |
963 | if ((i >= 1) && (elapsed_time_firstbyte <= 0.000001)) { | ||
964 | microsec_firstbyte = deltime (tv_temp); | ||
965 | elapsed_time_firstbyte = (double)microsec_firstbyte / 1.0e6; | ||
966 | } | ||
927 | buffer[i] = '\0'; | 967 | buffer[i] = '\0'; |
928 | xasprintf (&full_page_new, "%s%s", full_page, buffer); | 968 | xasprintf (&full_page_new, "%s%s", full_page, buffer); |
929 | free (full_page); | 969 | free (full_page); |
@@ -935,6 +975,8 @@ check_http (void) | |||
935 | break; | 975 | break; |
936 | } | 976 | } |
937 | } | 977 | } |
978 | microsec_transfer = deltime (tv_temp); | ||
979 | elapsed_time_transfer = (double)microsec_transfer / 1.0e6; | ||
938 | 980 | ||
939 | if (i < 0 && errno != ECONNRESET) { | 981 | if (i < 0 && errno != ECONNRESET) { |
940 | #ifdef HAVE_SSL | 982 | #ifdef HAVE_SSL |
@@ -1078,6 +1120,17 @@ check_http (void) | |||
1078 | } | 1120 | } |
1079 | 1121 | ||
1080 | /* Page and Header content checks go here */ | 1122 | /* Page and Header content checks go here */ |
1123 | if (strlen (header_expect)) { | ||
1124 | if (!strstr (header, header_expect)) { | ||
1125 | strncpy(&output_header_search[0],header_expect,sizeof(output_header_search)); | ||
1126 | if(output_header_search[sizeof(output_header_search)-1]!='\0') { | ||
1127 | bcopy("...",&output_header_search[sizeof(output_header_search)-4],4); | ||
1128 | } | ||
1129 | xasprintf (&msg, _("%sheader '%s' not found on '%s://%s:%d%s', "), msg, output_header_search, use_ssl ? "https" : "http", host_name ? host_name : server_address, server_port, server_url); | ||
1130 | result = STATE_CRITICAL; | ||
1131 | } | ||
1132 | } | ||
1133 | |||
1081 | 1134 | ||
1082 | if (strlen (string_expect)) { | 1135 | if (strlen (string_expect)) { |
1083 | if (!strstr (page, string_expect)) { | 1136 | if (!strstr (page, string_expect)) { |
@@ -1136,11 +1189,25 @@ check_http (void) | |||
1136 | msg[strlen(msg)-3] = '\0'; | 1189 | msg[strlen(msg)-3] = '\0'; |
1137 | 1190 | ||
1138 | /* check elapsed time */ | 1191 | /* check elapsed time */ |
1139 | xasprintf (&msg, | 1192 | if (show_extended_perfdata) |
1140 | _("%s - %d bytes in %.3f second response time %s|%s %s"), | 1193 | xasprintf (&msg, |
1141 | msg, page_len, elapsed_time, | 1194 | _("%s - %d bytes in %.3f second response time %s|%s %s %s %s %s %s %s"), |
1142 | (display_html ? "</A>" : ""), | 1195 | msg, page_len, elapsed_time, |
1143 | perfd_time (elapsed_time), perfd_size (page_len)); | 1196 | (display_html ? "</A>" : ""), |
1197 | perfd_time (elapsed_time), | ||
1198 | perfd_size (page_len), | ||
1199 | perfd_time_connect (elapsed_time_connect), | ||
1200 | use_ssl == TRUE ? perfd_time_ssl (elapsed_time_ssl) : "", | ||
1201 | perfd_time_headers (elapsed_time_headers), | ||
1202 | perfd_time_firstbyte (elapsed_time_firstbyte), | ||
1203 | perfd_time_transfer (elapsed_time_transfer)); | ||
1204 | else | ||
1205 | xasprintf (&msg, | ||
1206 | _("%s - %d bytes in %.3f second response time %s|%s %s"), | ||
1207 | msg, page_len, elapsed_time, | ||
1208 | (display_html ? "</A>" : ""), | ||
1209 | perfd_time (elapsed_time), | ||
1210 | perfd_size (page_len)); | ||
1144 | 1211 | ||
1145 | result = max_state_alt(get_status(elapsed_time, thlds), result); | 1212 | result = max_state_alt(get_status(elapsed_time, thlds), result); |
1146 | 1213 | ||
@@ -1329,7 +1396,30 @@ char *perfd_time (double elapsed_time) | |||
1329 | TRUE, 0, FALSE, 0); | 1396 | TRUE, 0, FALSE, 0); |
1330 | } | 1397 | } |
1331 | 1398 | ||
1399 | char *perfd_time_connect (double elapsed_time_connect) | ||
1400 | { | ||
1401 | return fperfdata ("time_connect", elapsed_time_connect, "s", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0); | ||
1402 | } | ||
1403 | |||
1404 | char *perfd_time_ssl (double elapsed_time_ssl) | ||
1405 | { | ||
1406 | return fperfdata ("time_ssl", elapsed_time_ssl, "s", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0); | ||
1407 | } | ||
1408 | |||
1409 | char *perfd_time_headers (double elapsed_time_headers) | ||
1410 | { | ||
1411 | return fperfdata ("time_headers", elapsed_time_headers, "s", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0); | ||
1412 | } | ||
1413 | |||
1414 | char *perfd_time_firstbyte (double elapsed_time_firstbyte) | ||
1415 | { | ||
1416 | return fperfdata ("time_firstbyte", elapsed_time_firstbyte, "s", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0); | ||
1417 | } | ||
1332 | 1418 | ||
1419 | char *perfd_time_transfer (double elapsed_time_transfer) | ||
1420 | { | ||
1421 | return fperfdata ("time_transfer", elapsed_time_transfer, "s", FALSE, 0, FALSE, 0, FALSE, 0, FALSE, 0); | ||
1422 | } | ||
1333 | 1423 | ||
1334 | char *perfd_size (int page_len) | 1424 | char *perfd_size (int page_len) |
1335 | { | 1425 | { |
@@ -1383,7 +1473,7 @@ print_help (void) | |||
1383 | printf (" %s\n", "-C, --certificate=INTEGER[,INTEGER]"); | 1473 | printf (" %s\n", "-C, --certificate=INTEGER[,INTEGER]"); |
1384 | printf (" %s\n", _("Minimum number of days a certificate has to be valid. Port defaults to 443")); | 1474 | printf (" %s\n", _("Minimum number of days a certificate has to be valid. Port defaults to 443")); |
1385 | printf (" %s\n", _("(when this option is used the URL is not checked.)")); | 1475 | printf (" %s\n", _("(when this option is used the URL is not checked.)")); |
1386 | printf (" %s\n", "-E, --client-cert=FILE"); | 1476 | printf (" %s\n", "-J, --client-cert=FILE"); |
1387 | printf (" %s\n", _("Name of file that contains the client certificate (PEM format)")); | 1477 | printf (" %s\n", _("Name of file that contains the client certificate (PEM format)")); |
1388 | printf (" %s\n", _("to be used in establishing the SSL session")); | 1478 | printf (" %s\n", _("to be used in establishing the SSL session")); |
1389 | printf (" %s\n", "-K, --private-key=FILE"); | 1479 | printf (" %s\n", "-K, --private-key=FILE"); |
@@ -1396,6 +1486,8 @@ print_help (void) | |||
1396 | printf (" %s", _("the first (status) line of the server response (default: ")); | 1486 | printf (" %s", _("the first (status) line of the server response (default: ")); |
1397 | printf ("%s)\n", HTTP_EXPECT); | 1487 | printf ("%s)\n", HTTP_EXPECT); |
1398 | printf (" %s\n", _("If specified skips all other status line logic (ex: 3xx, 4xx, 5xx processing)")); | 1488 | printf (" %s\n", _("If specified skips all other status line logic (ex: 3xx, 4xx, 5xx processing)")); |
1489 | printf (" %s\n", "-d, --header-string=STRING"); | ||
1490 | printf (" %s\n", _("String to expect in the response headers")); | ||
1399 | printf (" %s\n", "-s, --string=STRING"); | 1491 | printf (" %s\n", "-s, --string=STRING"); |
1400 | printf (" %s\n", _("String to expect in the content")); | 1492 | printf (" %s\n", _("String to expect in the content")); |
1401 | printf (" %s\n", "-u, --url=PATH"); | 1493 | printf (" %s\n", "-u, --url=PATH"); |
@@ -1495,10 +1587,10 @@ print_usage (void) | |||
1495 | { | 1587 | { |
1496 | printf ("%s\n", _("Usage:")); | 1588 | printf ("%s\n", _("Usage:")); |
1497 | printf (" %s -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]\n",progname); | 1589 | printf (" %s -H <vhost> | -I <IP-address> [-u <uri>] [-p <port>]\n",progname); |
1498 | printf (" [-E <client certificate file>] [-K <private key>]\n"); | 1590 | printf (" [-J <client certificate file>] [-K <private key>]\n"); |
1499 | printf (" [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-a auth]\n"); | 1591 | printf (" [-w <warn time>] [-c <critical time>] [-t <timeout>] [-L] [-a auth]\n"); |
1500 | printf (" [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]\n"); | 1592 | printf (" [-b proxy_auth] [-f <ok|warning|critcal|follow|sticky|stickyport>]\n"); |
1501 | printf (" [-e <expect>] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n"); | 1593 | printf (" [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n"); |
1502 | printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n"); | 1594 | printf (" [-P string] [-m <min_pg_size>:<max_pg_size>] [-4|-6] [-N] [-M <age>]\n"); |
1503 | printf (" [-A string] [-k string] [-S <version>] [--sni] [-C <warn_age>[,<crit_age>]]\n"); | 1595 | printf (" [-A string] [-k string] [-S <version>] [--sni] [-C <warn_age>[,<crit_age>]]\n"); |
1504 | printf (" [-T <content-type>] [-j method]\n"); | 1596 | printf (" [-T <content-type>] [-j method]\n"); |