Forum Discussion
Help with Irules
Hi everybody,
F5 was not my part of job, and our It team stuck on it.
Coudl you please help with the case below:
We have 4 servers configured into theF5 into 2 differents pools.
We use this API:
GET /toolkitapi/getfostatus HTTP/1.0\r\n\r\n
IT team configured this inot F5:
<fostatus>(Master|Slave)</fostatus>
That ran fine until, since RedHat migration servers return another type of response.
Like this:
{"fostatus":"Slave"}
{"fostatus":"Master"}
We stuck with this return due to curled braces.
We've tried sometings like:
{"fostatus":"Master|Slave"}, {"fostatus":"Slave"}{"fostatus":"Master"}, {"fostatus":"Slave"}|{"fostatus":"Master"}, "{\"fostatus\":\"Slave\"}|"{\"fostatus\":\"Master\"}...
Each time, F5 return error and this is impossible for us to put a pattern for Irule.
Could you please, help me/us about the correct pattern to use?
Many thank's by advance,
Regards,
Michaël
I do apologize but can you reword this as I am having a difficult time understanding what it is you're trying to convey. Hopefully I can assist you after the rewording.
- alchemy0576Nimbostratus
Hi Paulius,
I'll try to be more clear.
We've 2 pools with 2servers on each.
Pool A and Poll B by exmeple. When pool A is down all traffic is redirected towards Pool B, and inversely.
We use a API on each server to sent their status to F5. GET /toolkitapi/getfostatus HTTP/1.0\r\n\r\n
Basicaly return of APi is <fostatus>Master</fostatus> or <fostatus>Slave</fostatus>.
That ran fine with this pattern <fostatus>(Master|Slave)</fostatus> configured into the F5.
But, our supplier has updated our servers and with the same API the return is different now.
Return of API: {"fostatus":"Master"} or {"fostatus":"Slave"}.
When our IT team has tried to change the pattern into F5 with {"fostatus":"Master|Slave"} instead of <fostatus>(Master|Slave)</fostatus>.
Impossible to validate the new pattern on F5 each time a error is displayed on F5 GUI.
By exemple, we've tried those combination into F5:
{"fostatus":"Master|Slave"}
{"fostatus":"Slave"}{"fostatus":"Master"}
{"fostatus":"Slave"}|{"fostatus":"Master"}
"{\"fostatus\":\"Slave\"}|"{\"fostatus\":\"Master\"}
But unfortunately, we've always a syntax error from F5.
One more time, isn't my part of job, don't know F5. I just relate what I see on F5 GUI and my understanding.
Your help is really apreciate.
Kind Regards,
Michaël
- zamroni777Nacreous
you dont need irules for that purpose.
simply put all pool members into 1 pool and assign priority number to each of them.https://my.f5.com/manage/s/article/K13525153
- alchemy0576Nimbostratus
Hi Zamroni,
Many thx for your reply.
But, here I'm not specified before, my mistake.
Our IT would like to use 2 differents pools because each pair of servers are connected to differents sites and differents MX.
Could you have any idea about correct syntax with curled braces?
Kind Regards,
Michaël
- zamroni777Nacreous
thats actually the use case of pool's priority group.
gives near servers higher priority number than far servers then set pool's minimum active member accordingly.
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