Forum Discussion
ML_108504
Nimbostratus
Apr 13, 2009iRule Editor can't find default_pool
Hi folks, I'm experimenting with some simple iRules (I thought) from devcentral examples. When I check the following iRule in the Editor it complains with:
line 5: [can't find pool] [pool defa...
dennypayne
Employee
Apr 15, 2009Posted By mlameyer on 04/14/2009 5:04 PM
I want this iRule to run only if a bot user-agent comes along, thoughts?
Well it's going to run on every HTTP_REQUEST regardless, but I'd flip it around so that you don't do the active_members check unless you've already matched the bots User-Agent. That might perform a little better since user requests won't trigger the active_members check (and in either version the matchclass runs anyway).
when HTTP_REQUEST {
if { [matchclass [string tolower [HTTP::header User-Agent]] contains $::bots] } {
if { [active_members p_PUB_botfarm] > 0 } {
pool p_PUB_botfarm
} else {
return
}
}
}
(I think I got the brackets correct there but double-check...)
I would test this throroughly though to make sure you don't need to specify the default pool like Aaron said.
Denny
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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