[Nagiosplug-help] check_http of a directory

Thomas Guyot-Sionnest dermoth at aei.ca
Wed Oct 21 06:27:26 CEST 2009


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

On 20/10/09 09:39 PM, Tonu Mikk wrote:
> Hello, I am just starting out with Nagios.  I have not figured out if I
> can check http response of a directory.   Line #6 in the service
> definition gives me an error saying that the service is not defined
> anywhere.  If I comment it out, it works fine.
> 
> define service{
>         use                             generic-service         ; Name
> of service template to use
>         host_name                       myhost.net
>         service_description             HTTP
>         check_command                   check_http
>         check_command                   check_http -H myhost.net/demo/
>         notifications_enabled           1
>         }

Read the objects configuration documentation. Basically the
"check_command" defined in the service is a refer to a command
definition (with possible arguments separated with '!'). The service
definition point to an actual command path and name, and often use
macros as well.

For more details on the plugin usage, run "check_http --help" from the
shell. The argument you want are probably something like this:

- -H myhost.net -I $HOSTADDRESS$ -u /demo/

The -H and -u arguments can be passed as arguments from the service
definition so the same command can be re-used for different checks. See
$ARGn$ macros.


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

iD8DBQFK3o2u6dZ+Kt5BchYRAlO9AJ9mj+IEpgvvpSC+EZdGZ5Sa4JyhDQCgoz7I
V2NrSXrq/bvp+qYy9yZCEYk=
=wcPd
-----END PGP SIGNATURE-----




More information about the Help mailing list