David_Noonan_67
Sep 20, 2011Nimbostratus
Would this rule cause user problems?
I want to use HSL to log connections but I want one URI to get a slightly modified log entry. I can up with this modification of a working rule. The original logged on SERVER_CONNECTED but that didn't seem to let me access HTTP:uri, hence the change to HTTP_REQUEST.
I'm under the impression that if I don't include a redirect or rewrite or do anything to the traffic then it should do the logging in the irule and proceed with it's normal operation. Is that incorrect?
About 4-5 minutes after I applied the iRule the servers apparently showed down. I've since learned that the tests failing were both going to the VIP and going directly to the server (bypassing the irule) but before we put the rule back I have to validate that it wasn't the source of the problem.
Thanks
when HTTP_REQUEST {
set HSL [HSL::open -proto UDP -pool syslog-pool]
set FrontEnd "[IP::client_addr]:[TCP::client_port] <-> [clientside {IP::local_addr}]:[clientside {TCP::local_port}]"
set BackEnd "[IP::local_addr]:[TCP::local_port] <-> [serverside {IP::remote_addr}]:[TCP::server_port]"
set Uri [HTTP::uri]
if {$Uri equals "/foobar/foobarweb/login.aspx"} {
HSL::send $hsl "<190> HSL: FooBar: $FrontEnd | $BackEnd"
}
else {
Log connection details as local7.info; see RFC 3164 Section 4.1.1 - "PRI Part" for more info
HSL::send $HSL "<190> HSL: $FrontEnd | $BackEnd"
}
}