David_Windeyer
May 25, 2011Nimbostratus
help with using class match
I'm trying to write an I rule which will direct traffic to certain pools and nodes based on the host name.
The line with class match seems to be causing problems - complains about wanting braces. I tried following the example from http://devcentral.f5.com/wiki/defau...class.html
Does anyone have thoughts?
Thanks,
David.
when RULE_INIT {
Log debug messages to /var/log/ltm? (0=no, 1=yes)
set ::silo_access_debug 1
if {$::silo_access_debug}{log local0. "Debug set to $::silo_access_debug"}
}
when HTTP_REQUEST {
set app_pool_member [class match –value [HTTP::host] equals silo_access]
set app_pool [getfield $app_pool_member " " 1]
set app_member [getfield $app_pool_member " " 2]
if {$app_pool ne ""} {
if { $::silo_access_debug } { log local0. "[IP::client_addr] wants [HTTP::host], sending to pool $app_pool member $app_member" }
pool $app_pool member $app_member
}
}