summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0c1c9f5)
raw | patch | inline | side by side (parent: 0c1c9f5)
author | Matthew Kent <mattkent@users.sourceforge.net> | |
Wed, 24 Nov 2004 04:25:52 +0000 (04:25 +0000) | ||
committer | Matthew Kent <mattkent@users.sourceforge.net> | |
Wed, 24 Nov 2004 04:25:52 +0000 (04:25 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@931 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_http.c | patch | blob | history |
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 0253f31250856aaba1453c2d8540229a69a7072f..98005d0220edc63a67da83f97daa5d6ad9e4d74d 100644 (file)
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
/* 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);
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\