move test / down to web people so I don't have to insert iRule when needed

Problem this snippet solves:

When testing new web apps the developers want to put in iRule that will only allow testers into the server cluster. I wanted a way to allow them to do it without giving them access to the F5.

How to use this snippet:

We have a health monitor that looks for "SystemStatus=OK" that marks the pool up (pool DMZ). We created a second Health Monitor that looks for "SystemStatus=Test". Created a New pool (DMZ_Test) that has the same servers but the new pool name. So based on system status we have three possibilities. OK, Test, or down.

So based on Health monitor, only one pool can ever be up an any given time or both down.

IP address is our AWS work space for testing externally.

No pool is needed on this VS since the iRule does all of the pool assignments.

Hope this helps someone else.

Code :

if { [active_members dmz] >= 1 } {
pool dmz }  
elseif { [active_members dmz] equals 0 and [active_members dmz_test] equals 0 }{
HTTP::redirect "https:///downpage/"} 
elseif { [IP::addr [IP::client_addr] equals ] and [active_members dmz_test] > 0 }{
 pool dmz_test}
{HTTP::redirect "https:///maintenancepage/"}


Tested this on version:

Published Feb 12, 2019
Version 1.0

Was this article helpful?

No CommentsBe the first to comment