cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4699
Views
0
Helpful
5
Replies

ACE: how do I check what status code does URL returns

gavin han
Level 1
Level 1

Hi,

I'm doing health check using probes where I'm checking urls.

how do I check which status code does URL return so that I can put that code in "expect status" of the probe (so probe succeeds).

when to use "request method get", "request method head" and " header Host header-value"

1 Accepted Solution

Accepted Solutions

Hi Gavin,

If it is an HTTP web server, you can try this from the ACE itself:

10.198.16.92 is my server.

ACE-4710A/Admin# telnet 10.198.16.92 80

Trying 10.198.16.92...

Connected to 10.198.16.92.

Escape character is '^]'.

GET / http < ----------------------------------- I typed this

HTTP/1.1 200 OK < ------------------------ here is the http code response

Date: Mon, 05 Sep 2011 15:06:00 GMT

Server: Apache/2.2.8 (Win32)

Last-Modified: Wed, 23 Dec 2009 00:47:10 GMT

ETag: "1c00000001e576-f8-47b5aa9a0fc89"

Accept-Ranges: bytes

Content-Length: 248

Connection: close

Content-Type: text/html

NSS SITE

   http://10.198.16.92/links.html">

   http://10.198.16.92/search.html">

Connection closed by foreign host.

ACE-4710A/Admin#

Regarding your other questions:

when to use "request method get", "request method head" and " header Host header-value" methods?

HTTP GET request method to direct the server to get the page.

HTTP HEAD request method to direct the server to get only the header for the page.

And the host header values is used in case you want the ACE to use an specific host on the probe itself, by default the ACE is going to use the server IP as the host on the probe connections, there are some server/app the does not like this, and they reject the probe because of this.

In order to avoid this we can modify the host header, so the ACE will use a different host value instead of the server IP address.

Hope this help.

Rodrigo

View solution in original post

5 Replies 5

Hi Gavin,

show probe probe_name detail, should provide with the information you are looking for.

show logging also a good output to check.

Best regards,

Ahmad

Thanks for your reply. I'm actually look for following:

I need to configure my probe so I need to know what status should I be expecting so that I can put that status code in "expect status" so that my probe doesn't fail.

is there any tool i.e. "wget" in linux? what would be command.

I usually configure the probe (including the URL I need to test) apply it to the server farm, then check the show probe detail, it will show you the "Last status code" then configure it under the probe. Otherwise, you will need to capture the traffic on the server to verify the servers' status code reply, no other tool available on ACE to get this info.

HTH,

Ahmad

Thanks, that helps...

I found it out - there is another way too... using wget as follow in linux or unix CLI

wget -S

this will give us status code that this url returns.

one more question:

when to use "request method get", "request method head" and " header Host header-value" methods?

Hi Gavin,

If it is an HTTP web server, you can try this from the ACE itself:

10.198.16.92 is my server.

ACE-4710A/Admin# telnet 10.198.16.92 80

Trying 10.198.16.92...

Connected to 10.198.16.92.

Escape character is '^]'.

GET / http < ----------------------------------- I typed this

HTTP/1.1 200 OK < ------------------------ here is the http code response

Date: Mon, 05 Sep 2011 15:06:00 GMT

Server: Apache/2.2.8 (Win32)

Last-Modified: Wed, 23 Dec 2009 00:47:10 GMT

ETag: "1c00000001e576-f8-47b5aa9a0fc89"

Accept-Ranges: bytes

Content-Length: 248

Connection: close

Content-Type: text/html

NSS SITE

   http://10.198.16.92/links.html">

   http://10.198.16.92/search.html">

Connection closed by foreign host.

ACE-4710A/Admin#

Regarding your other questions:

when to use "request method get", "request method head" and " header Host header-value" methods?

HTTP GET request method to direct the server to get the page.

HTTP HEAD request method to direct the server to get only the header for the page.

And the host header values is used in case you want the ACE to use an specific host on the probe itself, by default the ACE is going to use the server IP as the host on the probe connections, there are some server/app the does not like this, and they reject the probe because of this.

In order to avoid this we can modify the host header, so the ACE will use a different host value instead of the server IP address.

Hope this help.

Rodrigo

Review Cisco Networking for a $25 gift card