Jon_Strabala_46
Dec 15, 2009Nimbostratus
Only IRULE_INIT events are triggerred
Hello I am new to iRULES and using a system set up with two virtual servers, one is a "default_gateway" which was setup to rout all traffic to the internet. The other is a "irulestest" that is only triggered via a specific destination IP in a HTTP request.
A) I only get "log local0." messages from the RULE_INIT block, not from the CLIENT_ACCEPTED block
B) In the F5 management console under - I do get get traffic when I client makes requests
Overview : Statistics : Virtual Servers : iruletest
Overview : Statistics : Virtual Servers : default_gateway
C) Using the iRULES Editor (Statistics) I see that only IRULE_INIT for my iRULE called "production_irule" (shown below) has "executions" any other iRULE I create always has zero "Executions".
*) Of course this could be a configuration error in the base setup that I was provided (I am only trying to write an iRULE).
------------------------
My two virtual servers
------------------------
virtual default_gateway {
ip forward
destination any:any
mask none
rules production_irule
}
virtual iruletest {
pool google.com
destination 10.0.185.150:http
ip protocol tcp
rules test_irule_000
httpclass httpclass
profiles
http
tcp
}
------------------------
My two pools
------------------------
pool evdo_routers {
lb method member observed
monitor all gateway_icmp
members
10.255.252.2:any
10.255.252.3:any
}
pool google.com {
members
10.0.180.4:any
session disable
64.233.169.99:any
}
------------------------
My two iRULES
------------------------
rule production_irule {
when RULE_INIT {
this works -
logs to /var/log/ltm as it should
set ::g_prod_var 111
log local0. "production_rule initialized: $::g_prod_var"
}
when CLIENT_ACCEPTED {
this doesn't work - JAS/QSI
It should log to /var/log/ltm - perhaps nothing is
being routed/triggered to this virtual server
or somehow only RULE_INIT events are processed
log local0. "got a CLIENT_ACCEPTED production_rule"
}
}
rule test_irule_000 {
when RULE_INIT {
this works -
logs to /var/log/ltm as it should
set ::g_test_var 991
log local0. "test_irule_000 initialized: $::g_test_var"
}
when CLIENT_ACCEPTED {
log local0. "got a CLIENT_ACCEPTED test_irule_000"
}
when HTTP_REQUEST {
this doesn't work -
It should log to /var/log/ltm - perhaps nothing is
being routed/triggered to this virtual server
or somehow only RULE_INIT events are processed
log local0. "got a HTTP_REQUEST test_irule_000"
}
}