Forum Discussion

wtwagon_99154's avatar
wtwagon_99154
Icon for Nimbostratus rankNimbostratus
Oct 27, 2009

Custom HTTP Monitor looking for String Response

I am wondering if it is possible to perform a custom HTTP Monitor to receive a string response.

 

 

We have a specific application that will return a 0 or a 1 on the request. 0 = good, 1 = bad

 

 

Can I set up a monitor that would be able to check for a 1?

 

 

Here's my test:

 

 

GET /blah/RunMonitor.aspx?version=three HTTP/1.1\nHost: blah.blah.com\nConnection: close\n\n

 

 

And receive string: 0

 

 

3 Replies

  • If you use 0 as a receive string any 0 in the response content will be considered success (like the 0 in 2009 in the date header). Is the 0 surrounded by new lines or some kind of HTML tag? If so you could use \n0\n or 0 as the receive string.

     

     

    Aaron
  • Thanks - just wanted to make sure it was possible. I know the 0 and 1 idea won't work, so I will work with our application guys to rename the 0 and 1. Thanks!
  • It would be ideal to have them use a more unique string which would only be found in a successful response.

     

     

    Aaron