[Nagiosplug-help] check_http gets 403 but not when run from command line.

Thomas Guyot-Sionnest dermoth at aei.ca
Fri Oct 17 08:16:14 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 16/10/08 05:40 PM, Steve Woods wrote:
> I believe I resolved it.  I changed the host name from localhost to the real hostname, but did not change the IP address.  See bad config below.

You should most likely specify the vhost in the service definition /
check command along with the IP to test with. The idea it that you
connect to the IP address (i.e. no hostname resolving) but still check a
specific vhost.

The end command should looks like this:

check_http -H myhost.example.com -I $HOSTADDRESS$ -u /


If the vhost is the hostname or alias, you can use macros too:

check_http -H $HOSTNAME$ -I $HOSTADDRESS$ -u /
check_http -H $HOSTALIAS$ -I $HOSTADDRESS$ -u /

You can also use custom host macros:

define host {
  [...]
  _VHOST myhost.example.com
}

and then:
check_http -H $_HOSTVHOST$ -I $HOSTADDRESS$ -u /


- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI+C2u6dZ+Kt5BchYRAvHPAJ4wCf9n5gVcXcdFSraykR4l0tNSMwCfR2W1
4Zi9HtPvfq6BOnhcWZcWSgw=
=ks6i
-----END PGP SIGNATURE-----




More information about the Help mailing list