Forum Discussion

krisdames's avatar
krisdames
Icon for Cirrus rankCirrus
Jun 25, 2013

Perform action based on MySQL query results

Hi,

 

I'd like to enable a specific pool member and disable the remaining pool members based on the results of a MySQL query. For example, if my pool contains server1 and server2, the results of the query will either be "server1" or "server2". Whichever server name is in the query result should be enabled and the other server(s) should be disabled. What's the best way to go about this?

 

Thanks!

 

--

 

Kris

 

 

2 Replies

  • i may misunderstand but doesn't assigning each server its own monitor (i.e. server1 with "server1" as recv string and server2 with "server2" as recv string) work?
  • Yes, that's what I realized after posting and it seems to be working, but I'd still be interested to see if there was a way for an iRule to handle this. Could you send a mysql query with a sideband connection?