Forum Discussion
Here is a version that we implemented on an LTM 3600 running 9.4.5.
Farm Name: firefly-qa-farms.qa.oclc.org:80
rule firefly_qa_farm_to_pool_rule { when HTTP_REQUEST { if { [HTTP::header exists "Host"] } { set host_name [string tolower [HTTP::header "Host"]] set pool_name [findclass $host_name $::firefly_qa_name_to_pool_class " "] if { $pool_name ne "" } { use pool $pool_name } else { log local0. "No pool for host name:$host_name; TCP local port:[TCP::local_port]; client IP addr:[IP::client_addr];\ client TCP port:[TCP::client_port]; METHOD:[HTTP::method]; URI:[HTTP::uri]" reject } } else { log local0. "No Host in HTTP header; TCP local port:[TCP::local_port]; client IP addr:[IP::client_addr];\ client TCP port:[TCP::client_port]; METHOD:[HTTP::method];URI:[HTTP::uri]" reject } } }
class firefly_qa_name_to_pool_class { "firefly-enva.qa.oclc.org firefly-enva_qa_7050" "firefly-envb.qa.oclc.org firefly-envb_qa_7050" "firefly-envc.qa.oclc.org firefly-envc_qa_7050" "firefly-envi.qa.oclc.org firefly-envi_qa_7050" "firefly-envj.qa.oclc.org firefly-envj_qa_7050" "firefly-envl.qa.oclc.org firefly-envl_qa_7050" "firefly-envm.qa.oclc.org firefly-envm_qa_7050" "firefly-envn.qa.oclc.org firefly-envn_qa_7050" "firefly-envo.qa.oclc.org firefly-envo_qa_7050" "firefly-envp.qa.oclc.org firefly-envp_qa_7050" "firefly-envr.qa.oclc.org firefly-envr_qa_7050" "firefly-envs.qa.oclc.org firefly-envs_qa_7050" "firefly-envt.qa.oclc.org firefly-envt_qa_7050" "firefly-envu.qa.oclc.org firefly-envu_qa_7050" "firefly-envx.qa.oclc.org firefly-envx_qa_7050" "firefly-envz.qa.oclc.org firefly-envz_qa_7050" "firefly-qaperf23.qa.oclc.org firefly-qaperf23_qa_7050" "firefly-qaperf24.qa.oclc.org firefly-qaperf24_qa_7050" }
- Kevin_O__39_NeiJun 25, 2014NimbostratusLost the formatting of the code. Sorry. --Kevin