ACE HTTP Probe with regex

ACE HTTP Probe with regex
Hi,
I'm trying to setup a HTTP probe with expected string rather then a code (config below). I do a GET for the page then a search for a string in the response however it's not working, as probe appears as failed.
I've tested the connection to the server by using telneting and then looking at the page displayed to make sure the string I want to match is in the response.
probe http HTTP-PROBE
port 43050
interval 30
passdetect interval 30
passdetect count 1
request method get url /action=help
open 43050
expect regex action=help
Q. Is there anything wrong with this configuration and what I'm trying to achive?
Thanks,
Pritesh

Use "expect status" under probe config. expect regex doesnt work if expect status is not configured.
expect regex work flawlessly with static pages. It doesnt work all the time with dynamic pages.
Specially if "content-length" header is missing from Server response.
Hope it helps
Syed Iftekhar Ahmed

Similar Messages

  • Ace HTTP Probe expect regex

    Hi,
    I have a question about the config of the ACe probe.
    I have the following probe defined :
    probe http P_HTTP_TEST
    interval 5
    passdetect interval 2
    passdetect count 2
    request method get url /test
    expect status 200 200
    expect regex trululu
    I would like to use the regex just like the expect string on the csm probe...
    The regex doesn't seem to work as the strin trululu is not on the page tested.
    I guess the expect status override the regex but without the expect status it doesn't work either.
    Anyone know how exactly the probe expect works for http ?
    Another question, on the CSM module, the tcp probe by default use the real port for the probe, not the default port of the probe type, is it possible to change that so it mimmicks the CSM way of working ?
    Thanks a lot ;-)

    This seems to be bug related to some version of ACE software as HTTP return code overrides missing regexp. For sure this bug is present in:
    system:    Version A2(2.0) [build 3.0(0)A2(2.0)]
    Notice the difference between 192.168.1.1 (is missing regex in HTTP response) and 192.168.1.2 (sends regexp in HTTP response). Both are successful and as addition 192.168.1.1 (missing regexp) is showing last status code 200 which seems to be sufficient for probe to pass. 192.168.1.2 (which sends expected regexp) doesn't show last status code.
    probe       : tw2_http_81
    type        : HTTP
    state       : ACTIVE
    description :
       port      : 81      address     : 0.0.0.0         addr type  : -
       interval  : 30      pass intvl  : 30              pass count : 1
       fail count: 1       recv timeout: 10
       http method      : GET
       http url         : /knowtw2-f/livelink.exe?func=ll&objtype=142&bypass
       conn termination : GRACEFUL
       expect offset    : 0         , open timeout     : 10
       expect regex     : lbmonitor
       send data        : -
                           --------------------- probe results --------------------
       probe association   probed-address  probes     failed     passed     health
       ------------------- ---------------+----------+----------+----------+-------
         real      : 192.168.1.1[81]
                           192.168.1.1    2          0          2          SUCCESS
       Socket state        : CLOSED
       No. Passed states   : 1         No. Failed states : 0
       No. Probes skipped  : 0         Last status code  : 200
       No. Out of Sockets  : 0         No. Internal error: 0
       Last disconnect err :  -
       Last probe time     : Mon Nov  7 12:38:42 2011
       Last fail time      : Never
       Last active time    : Mon Nov  7 12:38:22 2011
         real      : 192.168.1.2[81]
                           192.168.1.2    2          0          2          SUCCESS
       Socket state        : CLOSED
       No. Passed states   : 1         No. Failed states : 0
       No. Probes skipped  : 0         Last status code  : 0
       No. Out of Sockets  : 0         No. Internal error: 0
       Last disconnect err :  -
       Last probe time     : Mon Nov  7 12:38:27 2011
       Last fail time      : Never
       Last active time    : Mon Nov  7 12:37:58 2011

  • ACE Appliance HTTP Probe with "POST" query

    Does the ACE support HTTP Probe with a "POST" query?
    Thanks
    Joe

    Hi Joe,
    The ACE only supports GET and HEAD
    Here is the documentation related to this:
    http://www.cisco.com/en/US/customer/docs/interfaces_modules/services_modules/ace/vA5_1_0/configuration/slb/guide/probe.html#wp1031485
    Cesar R

  • CSM HTTP Probes with Method GET

    Hello.
    How does the HTTP Probe with Method GET work on CSM and what is the difference with CSS?
    CSS calculates the HASH of the web page it receives as a first answer and considers that as a REFERENCE HASH, to compare with subsequent answers. Is the behaviour of the CSM the same?
    In the CSS it is also possible to insert the HASH in the configuration as a reference HASH. I did not find such a command on the CSM. Is that feature not present on CSM?
    Thanks.

    the CSM just looks for the response code.
    No hash or anything similar to the CSS.
    Regards,
    Gilles.

  • Strange HTTP probe with .cfm files.

    Hey All,
    I setup an http probe that checks a .cfm page for a keyword. according to the documentation there needs to be a content-length in the header for this to be parsed correctly. For some reason this .cfm page does not send the content-length. The developer manually told coldfusion to put the content-length in the header and I can see that the header now has the content-length. The probe is still failing with "Unrecognized or invalid response" If i put a test html page with a keyword, it parses it correctly and passes. If i change the keyword it fails as expected. Has anyone had any issues with the headers of coldfusion? There is no compression on the server side. Below is the probe.
    probe http KEYWORD
      interval 15
      passdetect interval 30
      request method get url /index.cfm
      open 2
      expect regex "go"
    Any help or suggestion would be much appreciated.
    Regards,
    Christian

    Hey Christian and Paul,
    Actually, when using expect regex, you don't need the expect status.  I alerted the documentation team about this and they have updated the documents with the following note:
    Note If you do not configure an expected status code, any response from the server is marked as failed. However, if you configure the expect regex command without configuring a status code, the probe will pass if the regular expression response string is present.
    Christian,
    You mention that you see the error message Unrecognized or invalid response, even with the content-length header added.  Is this the same error message you got before your app team added the header?  If so, then I might suspect that the ACE doesn't like the format they used.  The header should look like this:
    Content-Length:
    This is per RFC2616 and can be found at section 14.13 here.  Note that the C and the L are uppercase, the header name is immediately followed by a colon, and there is a spece between the colon and the value.
    I would recommend confirming that the header matches this description in a network capture.  If it does match, then I would like to see the capture, if possible.
    Thanks and I hope this helps,
    Sean

  • ACE http probe "request method type" mandatory on A3(2.6)?

    Hi people,
    I recently upgraded to A3(2.6) from A3(2.0) and I don't see the N/A option on the http probe "request method type".
    It also has an asterisk * which means it's mandatory.
    I tried to set up a new http probe for another farm I am creating and the probe shows status failed, although I can ping and telnet to the http server on port 80 from the ACE context. My probe is like that:
    probe http http_probe_WWW
      interval 15
      passdetect interval 60
      expect status 200 200
      open 10
    My other http probes for other farms work ok after the upgrade and they are similar.
    So my question is: Do I need to set the request method type or something else causes the probe to fail?
    thanks a lot.
    George

    What you see is a problem with the GUI.
    CSCtg78008    while creating http probe default method slected should be get as in CLI
    But the request-method is not required.
    So your config should work.
    Do a 'show probe detail' to see the failure reason.
    Get a sniffer trace as well.
    Regards,
    Gilles.

  • ACE HTTP probe hash md5 value

    Hi,
    We would like to see the hash value calculated by the ACE when the HTTP probe hash command configured.
    This is possible on CSS via the "sh service" command. We have tried to get it from sh rserver , sh probe XXX detail sh serverfarm XXX det but we do not get it.
    Is this possible to get it on the ACE as we do on the CSS?
    We need this to manually configure it via the hash <value> command because if the ACE probe is reseted for any reason, the probe http hash will be re-calculated based on the first http response of the server and we can not predict that the server will give the expected web page at this time.
    A // question is: on what the md5 value is calculated? HTTP header + payload or only http object payload? We have calculated the md5 hash value by ourselves but the probe is still failing whatever the http portion used for the calculation is.
    Many thanks for your help.
    Regards/ludovic.

    probe http MD5-HTTP
    interval 15
    passdetect interval 15
    request method get url /index.html
    expect status 200 200
    hash 2441DA7F68A265F8CFB4426B6897CE33
    And here is how I computed the hash on the server itself [linux machine]
    md5sum /var/www/HTML/index.html
    2441da7f68a265f8cfb4426b6897ce33 /var/www/HTML/index.html
    [root@linux-1 tftpboot]#
    The probe is UP
    switch/Admin# sho probe MD5-HTTP detail
    probe : MD5-HTTP
    type : HTTP
    state : ACTIVE
    description :
    port : 80 address : 0.0.0.0 addr type : -
    interval : 15 pass intvl : 15 pass count : 3
    fail count: 3 recv timeout: 10
    http method : GET
    http url : /index.html
    Hash-value : 2441da7f68a265f8cfb4426b6897ce33
    conn termination : GRACEFUL
    expect offset : 0 , open timeout : 10
    expect regex : -
    send data : -
    --------------------- probe results --------------------
    probe association probed-address probes failed passed health
    ------------------- ---------------+----------+----------+----------+-------
    serverfarm : linux1
    real : linux1[0]
    192.168.30.27 13 4 9 SUCCESS
    md5sum is a standard tool.
    Nothing fancy about it.
    Gilles.

  • ACE HTTP Probe

    Hi,
    This is the current probe that I am using:
    probe http http-probe
    interval 3
    passdetect interval 3
    passdetect count 3
    request method head
    expect status 200 200
    Someone told me that I should be using a more sophisticated web page to probe. If you agree with that statement, could someone please provide a sample config?
    Thank you...

    Hi,
    I'm not sure what your colleague meant by more sophisticated. When I've set up an HTTP probe I've asked that the server management team set up a simple static page on the server that can be tested. So in my probe I'd specify something like:
    request method head url /serverhere.html
    This enables the team to take a server out of service by renaming the page (e.g. to servernothere.html) without having to ask me to modify the ACE configuration. The server can then be tested without real users having access and brought back in when they're happy.
    HTH
    Cathy

  • ACE HTTP Probe Question (HTTP Version)

    Hello, I am wondering what HTTP version ACE uses when sending HTTP/HTTPS probes to a web server. I am currently running A2(3.3) if that has any bearing. TIA

    Hi,
    The default get request method is HTTP/1.1 when the ACE is sending the probe and i dont
    think there is a way to change this default behavior.
    Regards,
    Siva

  • Local Director http probes with URLs and http redirect mode

    I am trying to configure http probes on my Local director 430 running 4.2.3
    I am using http redirect mode so the Virtual is bound to URLs not REALs with are linked to DIPs which are bound to REALs. So far the probes seem to not actually do anything. Does anyone know if the probes are compatible with URL redirect loadbalancing. And if so how one would go about configuring it.
    Thanks for your help.

    keepalive can be used for the probe notification in this case.
    Check the following url for details.
    http://www.cisco.com/univercd/cc/td/doc/product/webscale/css/bsccfggd/services.htm#xtocid727448

  • ACE HTTP probe get - not able to contain '?' in URL?

    Trying to put a probe together..
    probe http probeElvis
    interval 5
    passdetect interval 10
    request method get url 8888/livelink/llisapi.dll?func=LL.getlogin&NextURL=%2Flivelink%2Fllisapi%2Edll%3FRedirect%3D1
    expect status 100 404
    connection term forced
    But when typing or pasting that URL in - when it gets to the '?" after llisapi.dll the CLI is interpreting that as a query for HELP - but i want it to be part of the string!!
    Is my only choice to go to TCL scripting? I don't know how to do that! I'm a network guy!! :)

    Precede the question mark with Ctrl-V to prevent the question mark from being interpreted as a help command.

  • ACE http Probe Question

    Hi there,
    I have a probe and it keeps failing. I believe it might be something to do with the special character in the URL. The URL requires a port then a page after the server address:
    probe http Server2_Probe
    description Checks Server2 http is responding
    ip address 10.x.x.x
    interval 30
    faildetect 4
    passdetect interval 3
    receive 5
    request method get url :8100/gdesktop
    expect status 200 200
    Can someone point me in the right direction as to how I implement this probe if the :8100 port syntax is not allowed?
    Thanks

    Hi,
    In the probe definition add
    port 8100 - this changes the port used from the default of 80. Then remove :8100 from the url.
    HTH
    Cathy

  • ACE Module - HTTP Probe failure

    Hi,
    I have configured the http probe with expect status 200 202, but the probe fails despite availability of the port on rserver.
    I tried head/get method to see the return code, and it came back with HTTP1.1/302. How can I configure an http probe to understand HTTP 302 code as success return.
    Thanks.

    I changed the expect status value as below
    probe http TEST-HTTP
    interval 30
    passdetect interval 10
    request method head
    expect status 302 302
    The probe is still failing with the log message
    Apr 20 2009 12:04:35 : %ACE-3-251010: Health probe failed for server 192.168.1.10 on port 80, received invalid status code
    On 'show probe detail' it shows the last status code as 400 which means Bad Request
    --------------------- probe results --------------------
    probe association probed-address probes failed passed health
    ------------------- ---------------+----------+----------+----------+-------
    serverfarm : TEST-APP
    real : TEST-SERVER1[80]
    192.168.1.10 27 27 0 FAILED
    Socket state : CLOSED
    No. Passed states : 0 No. Failed states : 1
    No. Probes skipped : 0 Last status code : 400
    No. Out of Sockets : 0 No. Internal error: 0
    Last disconnect err : Received invalid status code
    Last probe time : Mon Apr 20 12:05:33 2009
    Last fail time : Mon Apr 20 12:00:53 2009
    Last active time : Never
    The http page is showing perfectly on the web browser. Also, using the http head/get tool, I can see that 302 is returned.
    What could be the problem.
    Regards.

  • ACE HTTPS GET PROBE

    I have been asked to set up a HTTPS probe with a get request, the encryption is done between the connections on the servers, IBM Datapower Websphere servers, will i still be able to set up a HTTPS get probe and also how do i configure it?
    Thanks
    Nouraj

    Hi Nouraj,
    Yes, actually its the same command used with HTTP probes, Ex:
    probe https ABMJ-test
      request method get url /test.html
    Best regards,
    Ahmad

  • Issue with regexes in http health probes on ACE 4710

    Folks,
    We're currently experiencing fairly bizarre behavior when attempting to set up http probes that expect a regexp.  Namely, if we specify a regexp, the probe *always* passes, regardless of status code and regardless of whether or not the message actually matches the pattern.  Doing 'no expect regexp' fixes this behavior (by which I mean that the 'expect status' rules work again). 
    We haven't noticed until now because this is the first time we've tried to set up a probe that does this.  Are we missing something?  Is this a known issue with our current firmware version?
    Sincerely,
    Patrick T. Ramsey
    # show run probe | begin HTTP-nfscheck | end regex
    Generating configuration....
    probe http HTTP-nfscheck
      description Simple HTTP probe to check nfs mount health
      port 80
      interval 15
      passdetect interval 20
      request method head url /nfs-health-check/
      open 1
      expect regex "^ureytgraeuikghfdjg$"
    # sh ver
    Cisco Application Control Software (ACSW)
    TAC support: http://www.cisco.com/tac
    Copyright (c) 1985-2009 by Cisco Systems, Inc. All rights reserved.
    The copyrights to certain works contained herein are owned by
    other third parties and are used and distributed under license.
    Some parts of this software are covered under the GNU Public
    License. A copy of the license is available at
    http://www.gnu.org/licenses/gpl.html.
    Software
      loader:    Version 0.95.1
      system:    Version A3(2.4) [build 3.0(0)A3(2.4) adbuild_11:46:02-2009/09/27_/auto/adbu-rel2/rel_a3_2_3_throttle/REL_3_0_0_A3_2
    _4]
      system image file: (hd0,1)/c4710ace-mz.A3_2_4.bin
      Device Manager version 1.2 (0) 20090925:1550
      installed license: no feature license is installed
    Hardware
      cpu info:
        Motherboard:
            number of cpu(s): 2
        Daughtercard:
            number of cpu(s): 16
      memory info:
        total: 6226388 kB, free: 3972668 kB
        shared: 0 kB, buffers: 22020 kB, cached 0 kB
      cf info:
        filesystem: /dev/hdb2
        total: 861668 kB, used: 728656 kB, available: 89240 kB
    last boot reason:  Unknown
    configuration register:  0x1
    ldbottom kernel uptime is 325 days 3 hours 46 minute(s) 43 second(s)

    I also went through a similar issue in which we need to probe the real server PESERVER01 and if the real server replies with the keyword "PE Server" in the HTTP content then the probe should be passed successful.
    In my case the real server was listening on port 32776 for HTTP service so we configured the serverfarm as below,
    serverfarm host SF-TEST-32776
      description SF-TEST-32776
      failaction purge
      probe PE-SERVER-STRING
      rserver PESERVER01 32776
        inservice
    And the TCP probe as below,
    probe tcp PE-SERVER-STRING
      port 32776
      send-data GET /IOR/ping HTTP/1.1      <<== command should not be in inverted  commas
      expect regex "PE Server"
    The above probe worked really well and when we checked the probe status it was marking as success. I also tried changing the regex from "PE Server" to "Vishal12345" and it was failing as expected because there was no such keyword in the HTTP content.
    ==================================================================================
    T2-LB02# sh probe PE-SERVER-STRING
    probe       : PE-SERVER-STRING
    type        : TCP
    state       : ACTIVE
       port      : 32776   address     : 0.0.0.0         addr type  : -
       interval  : 15      pass intvl  : 60              pass count : 3
       fail count: 3       recv timeout: 10
                    ------------------ probe results ------------------
       associations ip-address      port  porttype probes   failed   passed   health
       ------------ ---------------+-----+--------+--------+--------+--------+------
       serverfarm  : SF-TEST-32776
         real      : PESERVER01[32776]
                    10.10.10.1    32776 PROBE    105      0        105      SUCCESS
    ==================================================================================
    I was struggling with this issue from long time. Even raised couple of Cisco TAC cases with no luck. The most important thing here is to identify the exact command to be send to real server like GET /IOR/ping HTTP/1.1 that we used here.
    To collect this command I did packet capture on one of the client machine and then tried to open the URL from real server which can return the string "PE Server". Then analyzed the captures in Wireshark and checked the HTTP data with follow the TCP stream option in which I seen the below data, which gives the command to be send in probe as well as the string we should expect.
    ==================================================================================
    GET /IOR/ping HTTP/1.1
    User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.12.9.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
    Host: 10.144.70.85:32776
    Accept: */*
    HTTP/1.0 200 OK
    Content-type: text/html
    Ping
    PE Server
    WRVFKO11 [Win32 Server Production (3 silos) (Oracle Blob 512 MB) -- {dap451.007.028 dap451.004.002 pe451.003.010x pui451.003.010  pui451.001.004} Mar  9 2012 15:07:53 en ]
    ===================================================================================
    Please try this and see if it helps you.
    Thanks,
    Vishal Babrekar

Maybe you are looking for