Forum Discussion

smilanko_261688's avatar
Jul 26, 2016
Solved

Custom HTTPS Monitor To Parse Result

I am attempting to parse results by hitting some uri on a member, to determine if they are fully functional or not.Here is some sample output that is considered normal:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/xml
Content-Length: 76
Date: Tue, 26 Jul 2016 15:31:41 GMT

ALIVE

Note, the above output can be generated using a curl request as follows:

curl -k -i --header "username: coolman" --header "roles: ROLE_COOLS" --header "domain: coolio" https://10.10.20.71:8443/perform/test/isalive

I am attempting to run the same curl request from a https monitor, that will ensure the xml data contains the string "ALIVE". Attached is a photo of how I have this configured.

And my pool ofcourse, has the correct ip address of: 10.10.20.71, port of: 8443, and the created https monitor added.

Is there something I am missing here in the configuration to make this work?

  • Alike ekalaido reccomended, after I changed the Receive String to ALIVE, and I added a HOST: header with a value, everything worked as expected.

     

8 Replies

  • Your app uses usernames and passwords as headers? Wouldn't you rather do HTTP-Authorization basic and send in that hash to authenticate? I suspect that is more along the lines of what the webserver is looking for.

     

  • not sure I understand what "passwords" you are referring to. all that the app is looking to see is particular headers, like the username, roles, and the domain. at this stage, f5 already authenticated the user, and my app only performs authorization, hence the specific headers.

     

  • Fair enough. Change the Recieve String to just ALIVE and see if there's anything different in the results.

     

  • huh! ok, after I changed that, and I added a HOST: section to point to the same pool member, everything worked as expected. Do you know if it is possible to dynamically use the HOST, i.e. get F5 to fill that out for you by looking at the pool members?

     

    PROBLEM: In reality, I have a few members, which have different IP's, that I want to run this htts monitor scan against.

     

  • when LB_SELECTED {

     

    HTTP::header insert Host [LB::server]

     

    {

     

    Might do the trick.

     

  • ah gotcha. i was hoping that I wouldn't have to do an irule, rather just paste something into the send string

     

  • Alike ekalaido reccomended, after I changed the Receive String to ALIVE, and I added a HOST: header with a value, everything worked as expected.