Right way have handling HOST HEADER Servers
Paulo Pinto
pspa at gp.novis.pt
Fri Oct 25 20:26:19 CEST 2002
One thing:
If you use "check_http -H virtualhost.thisplace.com -u /thisdir" as the
command, won't check_http resolve virtualhost.thisplace.com to it's IP
address and then test THAT particular host ?
That's particulary tricky if you have balanced (alteon, for example)
webservers with virtualhosts. Using that command will ALWAYS check the
virtualized website.
To circunvent that, I'm using something like:
check_command check_httpx!virtualhost.thisplace.com!/thisdir
and specifying check_httpx as:
define command{
command_name check_httpx
command_line $USER1$/check_http -H $HOSTADDRESS$ -u
http://$ARG1$$ARG2$
}
It works, btw :-)
Comments ?
On Sex, 2002-10-25 at 16:28, Subhendu Ghosh wrote:
>
> For host headers it is best to specify both -H and -I
>
> -H creates the host header
> -I (ip addr) send the request to the webserver
>
> -sg
>
> On Fri, 25 Oct 2002, Jeff Rendl wrote:
>
> > In services.cfg, for this particular web server, I have the following:
> >
> > host_name bigwebserver
> > ...blah, blah, blah
> > check_command check_http -H virtualhost.thisplace.com -u /thisdir
> > }
> >
> > It worded before I added the host header stuff, but the web server doesn't
> > give anything back when you go to it by its host name, only when you go by
> > one of the *many* hosted sites on the server.
> >
> > Am I fundamentally missing something here? What's the right way to setup a
> > web server in Nagios that has many different sites running on it? Do I
> > setup individual hosts for it for each site? I really don't want this thing
> > showing up as a bunch of hosts, but if I must, I must.
> >
> > Thanks!
> > -Jeff
> >
>
> --
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: Influence the future
> of Java(TM) technology. Join the Java Community
> Process(SM) (JCP(SM)) program now.
> http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
--
Paulo Pinto
Novis GSP
pspa at gp.novis.pt
-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
More information about the Users
mailing list