Forum Discussion

alchemy0576's avatar
alchemy0576
Icon for Nimbostratus rankNimbostratus
Jul 29, 2024

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.

    • alchemy0576's avatar
      alchemy0576
      Icon for Nimbostratus rankNimbostratus

      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

    • alchemy0576's avatar
      alchemy0576
      Icon for Nimbostratus rankNimbostratus

      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

      • zamroni777's avatar
        zamroni777
        Icon for Nacreous rankNacreous

        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.