Re: [Nagios-users] Odd check_http error

2009-05-18 Thread Andrew Davis

You were correct. My check command showed:

# 'check_http' command definition
define command{
   command_namecheck_http
   command_line$USER1$/check_http -I $HOSTADDRESS$ $ARG1$
   }

But my test was passing two arguments (-p and -u). Once I updated the 
test to use $HOSTADDRESS$ $ARG1$ $ARG2$ all worked immediately. Thanks 
for the help. :)


 A. Davis
 Email: ncc...@gmail.com

 "There is no limit to what a man can accomplish
  if he doesn't care who gets the credit." - Ronald Reagan



Jon Angliss wrote:

On Fri, 15 May 2009 16:17:50 -0400, Andrew Davis 
wrote:

  
Oddly enough, low-level tests show an HTTP 302, which I expect. But 
Nagios is offering up a 400 error and a warning:


From my workstation, confirming the server is configured correctly:

   gentoo:~ adavis$ telnet seth 8080
   Trying 10.1.1.23...
   Connected to seth.fl.ad.scripps.edu.
   Escape character is '^]'.
   GET /gp HTTP/1.0
   Host: seth
   Accept: */*
   Connection: Keep-Alive
   Pragma: no-cache



Run the check_http as defined in the command definition, appending the
-v argument.  You'll get to see what the check_http command is
executing.  I suspect your command definition is incorrect, and you're
missing something that is supposed to be triggering the "host" header.

[.. snip ..]

  

From services.cfg:

   ## HTTP - alternate port
   define service {
   host_name   seth
   service_description HTTP
   check_command   check_http!-p 8080!-u
   /gp/pages/login.jsf
   notes  
   http://$HOSTADDRESS$:8080/gp/pages/login.jsf

   max_check_attempts  3
   normal_check_interval   15
   retry_check_interval1
   check_period24x7
   notification_interval   120
   notification_period 24x7
   notification_optionsw, u, c, r, f, s
   contact_groups  unixadmins
   action_url 
   /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$

   }



Where is your define command?


  

And the result in Nagios:

   HTTP WARNING: HTTP/1.1 400 No Host matches server name seth



Hrm... this is odd, looks like you are posting the right host entry
(would still like to see the command definition).  The host entry for
"seth", is the address defined the same as the IP you are getting when
you telnet to the name? ie:

define host {
  host_name   seth
  address10.1.1.23
}

  
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] Odd check_http error

2009-05-15 Thread Jon Angliss
On Fri, 15 May 2009 16:17:50 -0400, Andrew Davis 
wrote:

>Oddly enough, low-level tests show an HTTP 302, which I expect. But 
>Nagios is offering up a 400 error and a warning:
>
> From my workstation, confirming the server is configured correctly:
>
>gentoo:~ adavis$ telnet seth 8080
>Trying 10.1.1.23...
>Connected to seth.fl.ad.scripps.edu.
>Escape character is '^]'.
>GET /gp HTTP/1.0
>Host: seth
>Accept: */*
>Connection: Keep-Alive
>Pragma: no-cache

Run the check_http as defined in the command definition, appending the
-v argument.  You'll get to see what the check_http command is
executing.  I suspect your command definition is incorrect, and you're
missing something that is supposed to be triggering the "host" header.

[.. snip ..]

>
> From services.cfg:
>
>## HTTP - alternate port
>define service {
>host_name   seth
>service_description HTTP
>check_command   check_http!-p 8080!-u
>/gp/pages/login.jsf
>notes  
>http://$HOSTADDRESS$:8080/gp/pages/login.jsf
>max_check_attempts  3
>normal_check_interval   15
>retry_check_interval1
>check_period24x7
>notification_interval   120
>notification_period 24x7
>notification_optionsw, u, c, r, f, s
>contact_groups  unixadmins
>action_url 
>/nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
>}

Where is your define command?


>
>
>And the result in Nagios:
>
>HTTP WARNING: HTTP/1.1 400 No Host matches server name seth

Hrm... this is odd, looks like you are posting the right host entry
(would still like to see the command definition).  The host entry for
"seth", is the address defined the same as the IP you are getting when
you telnet to the name? ie:

define host {
  host_name   seth
  address10.1.1.23
}

-- 
Jonathan Angliss



--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] Odd check_http error

2009-05-15 Thread Andrew Davis
Oddly enough, low-level tests show an HTTP 302, which I expect. But 
Nagios is offering up a 400 error and a warning:


From my workstation, confirming the server is configured correctly:

   gentoo:~ adavis$ telnet seth 8080
   Trying 10.1.1.23...
   Connected to seth.fl.ad.scripps.edu.
   Escape character is '^]'.
   GET /gp HTTP/1.0
   Host: seth
   Accept: */*
   Connection: Keep-Alive
   Pragma: no-cache

   HTTP/1.1 302 Moved Temporarily
   Server: Apache-Coyote/1.1
   Location: http://seth/gp/
   Date: Fri, 15 May 2009 20:12:40 GMT
   Connection: close

   Connection closed by foreign host.
   gentoo:~ adavis$ telnet seth 8080
   Trying 10.1.1.23...
   Connected to seth.fl.ad.scripps.edu.
   Escape character is '^]'.
   GET /gp/pages/login.jsf HTTP/1.0
   Host: seth
   Accept: */*
   Connection: Keep-Alive
   Pragma: no-cache

   HTTP/1.1 302 Moved Temporarily
   Server: Apache-Coyote/1.1
   Location: http://seth.fl.ad.scripps.edu:80/gp/pages/login.jsf
   Content-Length: 0
   Date: Fri, 15 May 2009 20:13:53 GMT
   Connection: keep-alive


From services.cfg:

   ## HTTP - alternate port
   define service {
   host_name   seth
   service_description HTTP
   check_command   check_http!-p 8080!-u
   /gp/pages/login.jsf
   notes  
   http://$HOSTADDRESS$:8080/gp/pages/login.jsf

   max_check_attempts  3
   normal_check_interval   15
   retry_check_interval1
   check_period24x7
   notification_interval   120
   notification_period 24x7
   notification_optionsw, u, c, r, f, s
   contact_groups  unixadmins
   action_url 
   /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$

   }


And the result in Nagios:

   HTTP WARNING: HTTP/1.1 400 No Host matches server name seth

 A. Davis
 Email: ncc...@gmail.com

 "There is no limit to what a man can accomplish
  if he doesn't care who gets the credit." - Ronald Reagan



Andrew Davis wrote:

I'm seeing the following:

HTTP WARNING: HTTP/1.1 400 No Host matches server name seth.my.int.domain

This is what the test looks like in Nagios:

## HTTP - alternate port
define service {
host_name   seth
service_description HTTP
check_command   check_http!-p 8080!-u 
/gp/pages/login.jsf
notes   
http://$HOSTADDRESS$:8080/gp/pages/login.jsf

max_check_attempts  3
normal_check_interval   15
retry_check_interval1
check_period24x7
notification_interval   120
notification_period 24x7
notification_optionsw, u, c, r, f, s
contact_groups  unixadmins
action_url  
/nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$

}

Oddly enough, all other tests for this host seem to have no issue at 
all with the hostname. The URL also works in a web browser 
(http://seth.my.int.domain:8080/gp/pages/login.jsf works correctly). 
From the Nagios server, I go hit the URL from lynx and curl w/o issue. 
There's proper name resolution (forward and reverse) in place. I'm lost...

--


  A. Davis
  Email: ncc...@gmail.com

  "There is no limit to what a man can accomplish
   if he doesn't care who gets the credit." - Ronald Reagan
  
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects___
Nagios-users mailing list
Nagios-users@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

[Nagios-users] Odd check_http error

2009-05-15 Thread Andrew Davis

I'm seeing the following:

HTTP WARNING: HTTP/1.1 400 No Host matches server name seth.my.int.domain

This is what the test looks like in Nagios:

## HTTP - alternate port
define service {
   host_name   seth
   service_description HTTP
   check_command   check_http!-p 8080!-u 
/gp/pages/login.jsf
   notes   
http://$HOSTADDRESS$:8080/gp/pages/login.jsf

   max_check_attempts  3
   normal_check_interval   15
   retry_check_interval1
   check_period24x7
   notification_interval   120
   notification_period 24x7
   notification_optionsw, u, c, r, f, s
   contact_groups  unixadmins
   action_url  
/nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$

}

Oddly enough, all other tests for this host seem to have no issue at all 
with the hostname. The URL also works in a web browser 
(http://seth.my.int.domain:8080/gp/pages/login.jsf works correctly). 
From the Nagios server, I go hit the URL from lynx and curl w/o issue. 
There's proper name resolution (forward and reverse) in place. I'm lost...


--


 A. Davis
 Email: ncc...@gmail.com

 "There is no limit to what a man can accomplish
  if he doesn't care who gets the credit." - Ronald Reagan

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects___
Nagios-users mailing list
Nagios-users@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