check_http problem

Subhendu Ghosh sghosh at sghosh.org
Tue Aug 26 23:19:53 CEST 2003


On Tue, 26 Aug 2003, Henrik W. Hansen wrote:

> Hi all
> I am not able to get check_http to work with any parameters from the 
> services.cfg file! If i want to check different urls, I have to hard 
> code different check commmands in checkcommands.cfg. Why is that?
> My checkcommand.cfg looks like
> # 'check_http_url' command definition THAT DOES NOT WORK
> define command{
>         command_name    check_http_url
>         command_line    $USER1$/check_http -H  $ARG1$ -u $ARG2$ -s $ARG3$
> }
> # 'check_http' command definition #THAT WORKS!!!!
> define command{
>         command_name    check_http
>         command_line    $USER1$/check_http -H localhost -u /index.jsp -s 
> Hello
>         }
> 
> and from the service.cfg looks like
> # Service definition
> define service{
>         use                             generic-service         ; Name 
> of servi\
> ce template to use
> 
>         host_name                       gandalf
>         service_description             Portal
>         is_volatile                     0
>         check_period                    24x7
>         max_check_attempts              3
>         normal_check_interval           2
>         retry_check_interval            1
>         contact_groups                  linux-admins
>         notification_interval           240
>         notification_period             24x7
>         notification_options            w,u,c,r
>         check_command                   
> check_http_url!localhost!/index.jsp!Hello
>         }


The definition for check_command should be on the same line (unless this 
is an artifact of the mail program)
  
Also if including non-alphanumeric characters as in the url - best to use 
quotes.

-sg

> 
> The command works fine from the command line:
> ./check_http -H localhost -u /index.jsp -s Hello
> 
> Why is that??
> 
> Please advice.
> /Henrik
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
> at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 

-- 




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list