On Fri, Oct 09, 2009 at 02:37:36PM +0000, Henrik Størner wrote:
In <user-f2f6f8e2dc9f@xymon.invalid> Milan Kocian <user-d0e37a854cb1@xymon.invalid> writes:
when we are talking about, I have one question in this area (DNS).
I don't understand why http tests resolve hostnames when you explicitly
define ip address in test. Is this intention to make dns test together ?
(I have small patch to disable it :-).
It's because webservers often use the hostname-part of the URL to
determine how to process the request. E.g. if you have 10 sites
hosted on the same physical box (= same IP), then you must specify
the "hostname" in the URL to hit the right virtual webserver.
Many thanks for answer. Yes, I understand this behaviour.
That's why you can override the DNS lookup:
10.0.0.1 www.foo.com # http://abc.foo.com=192.168.1.2/
But my question is: Why is done dns query in your case ?
IMHO when I specify ip address explicitly (via =), I don't
need dns query in bbtest-net.
Regards,
Henrik
May be my patch helps to understand what I mean :
--- xymon-4.2.3/bbnet/bbtest-net.c 2009-02-09 10:28:57.000000000 +0100
+++ xymon-sources-4.2.3/bbnet/bbtest-net.c 2009-09-10 17:05:25.000000000 +0200
@@ -540,7 +540,8 @@
}
else {
s = httptest;
- add_url_to_dns_queue(testspec);
+ if (!url.desturl->ip)
+ add_url_to_dns_queue(testspec);
}
}
else if (argnmatch(testspec, "apache") || argnmatch(testspec, "apache=")) {
Regard,
--
Milan Kocian