Forum Discussion
Monitor virtual server with a lot of pool configured in une Irule
I've made a virtual server HTTP that have no default pool assigned because I assign the pool with an Irule
This Irule is made to reflect the requirement of real server that respond on different port due to domain name an work fine.
when HTTP_REQUEST {
log local0. "TEST - l'HOST is [HTTP::host], l'URI is [HTTP::uri]"
switch -glob [HTTP::host] {
"*domain1.it" -
"*domain2.it" {
log local0. "TEST - l'HOST e' [HTTP::host], inside pool-1"
pool pool-1
}
"*domain3.it" -
"*domain4.it" {
log local0. "TEST - l'HOST e' [HTTP::host], inside pool-2"
pool pool-2
}
etc. etc
}
}
This is the I rule (note the asterisc before the domain is due to satisfy the www or other before).
Now my question is:
The virtual server has no pool specified, what is the best practise to inform the Virtual server that the pool (example pool-2) is out of service?
Note: The pool-1 and pool-2 are the same real server but only on different port.
The real configuration provides about 21 pools always on the same server
Thanks
- Chris_MillerAltostratusAre you simply curious about how to represent the Virtual Server as up/down in the GUI, or are you wondering how to support pools within the rule being down? For instance, if pool-2 is down, would you like to send the request to a different pool?
- gianluca_gozziNimbostratusAbout to rapresent the virtual server as up or down is difficult because with the irule that route the request to 21 pools I think that is not possible or not? But for me is important to notify (with a pool or other method) to the client if the single poll is down.
- Chris_MillerAltostratusWhen you say client, do you mean the person requesting the web site, or the person managing the BIG-IP?
- gianluca_gozziNimbostratusThe person that request the web site
- Chris_MillerAltostratusPosted By gianluca gozzi on 02/14/2011 07:07 AM
- gianluca_gozziNimbostratusAs your experience is possible put all in the same Irule or I've to do an other?
- Chris_MillerAltostratusPosted By gianluca gozzi on 02/14/2011 07:20 AM
- gianluca_gozziNimbostratusCan you give me a little example inside my irule?
- Chris_MillerAltostratusSomething like this should work. I moved your log statement too...just a personal preference.
when HTTP_REQUEST { log local0. "TEST - l'HOST is [HTTP::host], l'URI is [HTTP::uri]" switch -glob [HTTP::host] { "*domain1.it" - "*domain2.it" { if { [active_members pool-1] > 0 } { pool pool-1 log local0. "TEST - l'HOST e' [HTTP::host], inside pool-1" } else { HTTP::respond 200 "Pool-1 is down" } } "*domain3.it" - "*domain4.it" { if { [active_members pool-2] > 0 } { pool pool-2 log local0. "TEST - l'HOST e' [HTTP::host], inside pool-2" } else { HTTP::respond 200 "Pool-2 is down" } } } }
- gianluca_gozziNimbostratusThanks a lot Chris
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