iRule with monitor (monitoring if connection = first)
Good afternoon,
I have a task to monitor three application servers, currently, the servers return these responses: jvm1=0, jvm1=9 and other numbers which are considered as the server (from the pool of three) is down.
the situation is that we want to change the monitor to track also a status of the TCP session (because of redirects of users to another server of those three -> they have to log in again). If the session is first there should be this clause used:
if connection = first
if recv=('jvm1=0') -> server OK
else -> NOK
if the connection is not first - the connection has been already made before (two recv strings to determine if server is up):
if connection = NOT first
if recv=('jvm1=0' OR 'jvm1=9') -> OK
else -> NOK
Is there any way how to determine if the session is first? I guess there should be iRule created under the VS. Sorry for my terminology, I am pretty new in the f5 field. Thank you