diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-03-19 08:37:31 (GMT) |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2018-10-22 14:30:31 (GMT) |
commit | 65753408889c30cfe198fdd7d374d962d6a95f08 (patch) | |
tree | a0e8fbb0c020baf2f99dce502f0597153507610d | |
parent | f67f05c450d539015a7bda43ba1dfc7b711d5304 (diff) | |
download | monitoring-plugins-65753408889c30cfe198fdd7d374d962d6a95f08.tar.gz |
added -l option, fixed some usage/help
-rw-r--r-- | plugins/check_curl.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 12e0d0a..1841de5 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -612,6 +612,7 @@ process_arguments (int argc, char **argv) | |||
612 | {"regex", required_argument, 0, 'r'}, | 612 | {"regex", required_argument, 0, 'r'}, |
613 | {"ereg", required_argument, 0, 'r'}, | 613 | {"ereg", required_argument, 0, 'r'}, |
614 | {"eregi", required_argument, 0, 'R'}, | 614 | {"eregi", required_argument, 0, 'R'}, |
615 | {"linespan", no_argument, 0, 'l'}, | ||
615 | {"onredirect", required_argument, 0, 'f'}, | 616 | {"onredirect", required_argument, 0, 'f'}, |
616 | {"certificate", required_argument, 0, 'C'}, | 617 | {"certificate", required_argument, 0, 'C'}, |
617 | {"client-cert", required_argument, 0, 'J'}, | 618 | {"client-cert", required_argument, 0, 'J'}, |
@@ -825,6 +826,9 @@ process_arguments (int argc, char **argv) | |||
825 | server_expect[MAX_INPUT_BUFFER - 1] = 0; | 826 | server_expect[MAX_INPUT_BUFFER - 1] = 0; |
826 | server_expect_yn = 1; | 827 | server_expect_yn = 1; |
827 | break; | 828 | break; |
829 | case 'l': /* linespan */ | ||
830 | cflags &= ~REG_NEWLINE; | ||
831 | break; | ||
828 | case 'R': /* regex */ | 832 | case 'R': /* regex */ |
829 | cflags |= REG_ICASE; | 833 | cflags |= REG_ICASE; |
830 | case 'r': /* regex */ | 834 | case 'r': /* regex */ |
@@ -972,8 +976,9 @@ print_help (void) | |||
972 | #else | 976 | #else |
973 | printf (" %s\n", _("Note: SNI is not supported in libcurl before 7.18.1")); | 977 | printf (" %s\n", _("Note: SNI is not supported in libcurl before 7.18.1")); |
974 | #endif | 978 | #endif |
975 | printf (" %s\n", "-C, --certificate"); | 979 | printf (" %s\n", "-C, --certificate=INTEGER[,INTEGER]"); |
976 | printf (" %s\n", _("Check validity of certificate")); | 980 | printf (" %s\n", _("Minimum number of days a certificate has to be valid. Port defaults to 443")); |
981 | printf (" %s\n", _("(when this option is used the URL is not checked.)")); | ||
977 | printf (" %s\n", "-J, --client-cert=FILE"); | 982 | printf (" %s\n", "-J, --client-cert=FILE"); |
978 | printf (" %s\n", _("Name of file that contains the client certificate (PEM format)")); | 983 | printf (" %s\n", _("Name of file that contains the client certificate (PEM format)")); |
979 | printf (" %s\n", _("to be used in establishing the SSL session")); | 984 | printf (" %s\n", _("to be used in establishing the SSL session")); |
@@ -1000,6 +1005,8 @@ print_help (void) | |||
1000 | printf (" %s\n", "-N, --no-body"); | 1005 | printf (" %s\n", "-N, --no-body"); |
1001 | printf (" %s\n", _("Don't wait for document body: stop reading after headers.")); | 1006 | printf (" %s\n", _("Don't wait for document body: stop reading after headers.")); |
1002 | printf (" %s\n", _("(Note that this still does an HTTP GET or POST, not a HEAD.)")); | 1007 | printf (" %s\n", _("(Note that this still does an HTTP GET or POST, not a HEAD.)")); |
1008 | printf (" %s\n", "-l, --linespan"); | ||
1009 | printf (" %s\n", _("Allow regex to span newlines (must precede -r or -R)")); | ||
1003 | printf (" %s\n", "-r, --regex, --ereg=STRING"); | 1010 | printf (" %s\n", "-r, --regex, --ereg=STRING"); |
1004 | printf (" %s\n", _("Search page for regex STRING")); | 1011 | printf (" %s\n", _("Search page for regex STRING")); |
1005 | printf (" %s\n", "-R, --eregi=STRING"); | 1012 | printf (" %s\n", "-R, --eregi=STRING"); |
@@ -1086,10 +1093,10 @@ print_usage (void) | |||
1086 | printf (" [-J <client certificate file>] [-K <private key>] [--ca-cert <CA certificate file>]\n"); | 1093 | printf (" [-J <client certificate file>] [-K <private key>] [--ca-cert <CA certificate file>]\n"); |
1087 | printf (" [-w <warn time>] [-c <critical time>] [-t <timeout>] [-E] [-a auth]\n"); | 1094 | printf (" [-w <warn time>] [-c <critical time>] [-t <timeout>] [-E] [-a auth]\n"); |
1088 | printf (" [-f <ok|warning|critcal|follow>]\n"); | 1095 | printf (" [-f <ok|warning|critcal|follow>]\n"); |
1089 | printf (" [-e <expect>] [-d string] [-s string] [-r <regex> | -R <case-insensitive regex>]\n"); | 1096 | printf (" [-e <expect>] [-d string] [-s string] [-l] [-r <regex> | -R <case-insensitive regex>]\n"); |
1090 | printf (" [-m <min_pg_size>:<max_pg_size>] [-N]\n"); | 1097 | printf (" [-m <min_pg_size>:<max_pg_size>] [-N]\n"); |
1091 | printf (" [-4|-6] [-N]\n"); | 1098 | printf (" [-4|-6] [-N]\n"); |
1092 | printf (" [-A string] [-k string] [-S <version>] [-C]\n"); | 1099 | printf (" [-A string] [-k string] [-S <version>] [--sni] [-C <warn_age>[,<crit_age>]]\n"); |
1093 | printf (" [-v verbose]\n", progname); | 1100 | printf (" [-v verbose]\n", progname); |
1094 | printf ("\n"); | 1101 | printf ("\n"); |
1095 | printf ("%s\n", _("WARNING: check_curl is experimental. Please use")); | 1102 | printf ("%s\n", _("WARNING: check_curl is experimental. Please use")); |