Forum Discussion

playfair039_320's avatar
playfair039_320
Icon for Nimbostratus rankNimbostratus
Feb 21, 2018

HTTP monitor method POST

Hi I've worked with a bunch of http health monitors that use the GET method with no issues filtering for content within the return string, mostly json. I now have a monitor which posts a json blob to an api and gets some json back. I know this works well because I test with cURL. The issue however is that I can't filter the content which should be in the receive string. The pool only goes green when I have nothing in the receive string and the call returns a 200 http status code. But there's vital information in the json i need to filter for within the returned json. Does anyone have some experience working with a similar problem? I'm running version 12.1.2. Thanks in advance.

 

4 Replies

  • You may need to escape special characters like { } : “ [ ] Sometime ago I did something similar for a soap monitor and all my problems were special characters

     

  • Anesh's avatar
    Anesh
    Icon for Cirrostratus rankCirrostratus
    • Can you Provide the Request and response from the Curl test?
    • Also could you mention what is the string that you are trying to filter from the response?
    • Also could you provide the cli output of your monitor setting
  • Hello,

    Did you enable monitor logging in the member configuration ? If the setting is enabled, you can check HTTP Request and Response (Headers and Body) and compare to curl output. The log created is in in /var/log/monitors. Please note it is not advisable enable logging for a long period of time only for troubleshooting

    Some rules for configuring HTTTP health monitors:

    • You need to separate headers from body using: \r\n\r\n
    • You have to scape " symbol, replace " for \" . Send string example for XML:

      
      
      Original XML:
      
      
      
    
    
  • I figured this out yesterday, apologies. I found that the request from the bigip unit was slightly malformed - difficult to see this without a pcap on the downstream server. Thanks all