09-Mar-2021 09:13
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,
09-Mar-2021 21:45
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.
10-Mar-2021
00:50
- last edited on
24-Mar-2022
01:04
by
li-migration
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 ?
10-Mar-2021 10:48
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.
11-Mar-2021 11:45
thank you for your feedback, I tested my regular expressions and the server response it return the expected result.
I will check the this article and I will back to you.
thanks a lot.
15-Mar-2021
05:53
- last edited on
24-Mar-2022
01:04
by
li-migration
Hi
it still the same issue, any idea please ?
Regards,
17-Mar-2021
06:46
- last edited on
24-Mar-2022
01:04
by
li-migration
Hi
thank you for your support, I have resolved the issue by changing my request.
Regards,
SAMADI Boukil