Forum Discussion
HTTP Monitor
Hi,
I want to set an HTTP monitor with the "Receive String" and the "Receive Disable String" so my application return the below results :
{"EXCEPTION":false,"RESULT":"{\"DBUp\":true,\"serverUp\":true}"} ==> app is OK
{"EXCEPTION":false,"RESULT":"{\"DBUp\":true,\"serverUp\":false}"} ==> app is not OK
{"EXCEPTION":false,"RESULT":"{\"DBUp\":false,\"serverUp\":true}"} ==> app is not OK
{"EXCEPTION":false,"RESULT":"{\"DBUp\":false,\"serverUp\":false}"} ==> app is not OK
my configuration is :
Receive String : (true.*true)
Receive Disable String : (DBUp\W{3}false)|(serverUp\W{3}false)
but this monitor is not working, any one can help please ?
Regards,
- crodriguezRet. Employee
Your receive string should work, although the parenthesis are unnecessary in your regular expression. Try removing them to see if that makes a difference. If the monitor is still marking a pool member down, it most likely means the pool member is not returning the expected string. You should check the server's response payload to ensure it is producing what you expected. For additional information on troubleshooting LTM health monitors, you can refer to this article: K12531: Troubleshooting health monitors.
To test regular expressions against various strings, I often use regex101.com.
- crodriguezRet. Employee
Since all but one string indicates an "app is not OK" situation, why not write the monitor such that it simply checks for the one "app is OK" condition Receive String (whatever that string is), and let any other response naturally result in the health monitor check failing and the member eventually being marked down? Unless I'm missing some additional details that are not in your original question, it does not seem like you need a Receive Disable String on the monitor here. You do not need to describe all the false (not OK) conditions in a monitor to mark a resource as unavailable (down). You just need to define the one condition that produces the "success" result in the Receive String, and any other response is a "fail" result.
- SamadiAltocumulus
Hi
thank you for your feed back, I tried the options below but it do not work for me :
Receive String : (true.*true)
Receive Disable String : empty
any idea please ?
- SamadiAltocumulus
Hi
thank you for your support, I have resolved the issue by changing my request.
Regards,
SAMADI Boukil
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com