aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Matthew Kent <mattkent@users.sourceforge.net> 2004-11-24 04:25:52 +0000
committerGravatar Matthew Kent <mattkent@users.sourceforge.net> 2004-11-24 04:25:52 +0000
commita6b60372352dab2ed7c2e84e3f92648611b7df12 (patch)
treee0d73b52a40b02bf5af6f4179d49ccde76132186 /plugins
parent0c1c9f51e2c33db04918d2aa322fd1f9a688979b (diff)
downloadmonitoring-plugins-a6b60372352dab2ed7c2e84e3f92648611b7df12.tar.gz
Added support for sending port in host header (913633)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@931 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 0253f312..98005d02 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -330,6 +330,8 @@ process_arguments (int argc, char **argv)
/* Note: H, I, and u must be malloc'd or will fail on redirects */
case 'H': /* Host Name (virtual host) */
host_name = strdup (optarg);
+ if (strstr (optarg, ":"))
+ sscanf (optarg, "%*[^:]:%d", &server_port);
break;
case 'I': /* Server IP-address */
server_address = strdup (optarg);
@@ -1381,6 +1383,7 @@ certificate expiration times.\n"));
printf (_("\
-H, --hostname=ADDRESS\n\
Host name argument for servers using host headers (virtual host)\n\
+ Append a port to include it in the header (eg: example.com:5000)\n\
-I, --IP-address=ADDRESS\n\
IP address or name (use numeric address if possible to bypass DNS lookup).\n\
-p, --port=INTEGER\n\