Forum Discussion
Machado_74574
Aug 22, 2012Nimbostratus
Manual Trigger
Hi All,
I am looking for your help with an iRule that I just made. My desire is to create an iRule where I can have a variable set as a manual trigger where I can manually change the value of it to change the behavior of my flow.
Here is the code I made:
Basically, if I set the variable "indisponibilidade" as "0" it will direct the connection to pools in "vmpwin002", if I set the variable with the value "1", it will direct the connection to pools in "app_sites".
I´ll appreciate your help to validate this code as I am quite new in F5 scripiting, so I am not sure if my code is right.
when DNS_REQUEST {
set indisponibilidade 0
if { [$indisponibilidade == 0] } {
if { [matchregion ldns region_int] } {
pool pool_vmpwin002_int
}
else {
pool pool_vmpwin002_ext
}
if { [matchregion ldns region_internal] } {
pool pool_prod_app_sites_int
}
else {
pool pool_prod_app_sites_ext
}
}
}
Thanks in advance!
Rafael Machado
- nitassEmployeei think using static global variable might be better than local one since it does not need to create and delete for every connection.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects