Forum Discussion
iRule to down and up Pool members
Hi All,
I am trying to build an iRule for our Application Admins to be able to input a string on the uri of a vserver, and down the node they input, however I am not able to get a simple LB::down command working, doing a test with the below, it does not be causing the node to show as unavilable. Please note that we are using route domains, hence I have tried with a %3 aswell but does not work. I know that the if command words as I get the log entry but the LB::down does not work.
when HTTP_REQUEST {
if {[scan [HTTP::uri] "/down/%s" server] == 1} {
log local0. "LB::server 10.42.136.221"
LB::down pool ems_testing member 10.42.136.221 80
log local0. "URI: [HTTP::uri] MATCHED. server=$server"
} else {
}
}
I am running build 11.6.1
Thanks Monty
4 Replies
- IheartF5_45022
Nacreous
LB::down will mark a member as down, however monitoring will proceed and the member will be marked up again as soon as it passes the monitor. Hacve to check the logs to see if the member is being marked as 'down', but then being marked as 'up' again?
- Monty_Sinha_229
Nimbostratus
Ahh ok that makes sense, I guess my next question would be is there anyway to disable the node or even if I can disable the VServer? and then reenable it with another irule.
- IheartF5_45022
Nacreous
You can try sending REST command via sideband connection https://devcentral.f5.com/s/feed/0D51T00006i7Y3JSAU
 
- PeteWhite
Employee
This is not a good way to do it - better to create them a portal and use iControl to control members as up or down. However, you could also use a static variable that contains a list of servers that are not in use and check it on request. Not a good solution as you are likely to get unexpected results.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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