Hio Josip!

Am 2007-05-12, tippselte Josip Rodin:

> On Sat, May 12, 2007 at 01:34:55AM +0200, Josip Rodin wrote:
> > Package: nagios-plugins-basic
> > 
> > Hi,
> > 
> > The config file change provided in #292124 had a bug: it gave the IP address
> > ($HOSTADDRESS$) to the check_https command in both the -I and -H parameters.
> > 
> > Since the meaning of the -H parameter is to modify the Host: HTTP header,
> > putting an IP address in it is fairly clearly nonsensical. Instead,
> > the *name* should be put inside; the name of the virtual host.
> > 
> > The argument passed to -H should be $HOSTNAME$ instead.
> 
> I realized now that, oddly enough, Nagios documentation is not clear on
> this. http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#host says:
> [...]
> Nevertheless, I think you should try changing the default to use either
> $HOSTNAME$ or $HOSTALIAS$, and see if there's fallout.
> 
> If necessary, the fallback procedure would be to add a separate set of
> checkcommands which use the above variables in a more layered manner.

PLEASE! Don't change the default! Most Nagios installations I know
*will* break with that change!

Have a look at /etc/nagios-plugins/config/http.conf:

,---[ /etc/nagios-plugins/config/http.conf ]---
| # 'check_http2' command definition
| define command{
|         command_name    check_http2
|         command_line    /usr/lib/nagios/plugins/check_http -H $ARG1$ -I 
$HOSTADDRESS$ -w $ARG2$ -c $ARG3$
|         }
`---

I think that's what you're looking for!

bye

Sven

PS: I don't like the name "check_http2", I would prefer
"check_http_vhost" without "-c" and "-w".

-- 
Leukämie     -> http://de.wikipedia.org/wiki/Leuk%C3%A4mie
Heilung      -> http://de.wikipedia.org/wiki/Knochenmark#Knochenmarkspende
Typisierung  -> http://www.knochenmarkspende.de/html/reg_akb.php
Warum&Fragen -> [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to