Hi -
I finally got to upgrade to 10.1.0 today so I could work with HSL. I got my iRule converted to use teh HSL::open and HSL::send commands. What surprised me is the change in the log format from the log command. What I get with HSL::send is a continuous string in my log file with no time stamps and no line feeds. That makes parsing the log file for analysis impossible.
I have been looking for more information on HSL but have not found much to help.
Here is my original iRule:
when HTTP_REQUEST {
Get time for start of HTTP request
set http_request_time [clock clicks -milliseconds]
HTTP::collect 4096
Log the start of a new HTTP request
set LogString "[IP::client_addr] [HTTP::host] [HTTP::method] [HTTP::uri]"
log 192.168.50.17 local0.info "$LogString"
}
when HTTP_RESPONSE {
Received the response headers from the server. Log the pool name, IP and port, status and time delta
log 192.168.50.17 local0.info "$LogString [HTTP::status] pool_info: [LB::server] (ResponseTime: [expr [clock clicks -milliseconds] - $http_request_time]ms)"
}
Here is what i see in syslog
Mar 9 16:22:12 rn-f5-lan-sip-01 tmm1[6906]: Rule WebLog : 173.70.45.182 ev.ib-ibi.com GET /image.ibvx?sessionid=6e61cafe-01ba-4fb7-af26-c574ccc24c36&go=iblx&osid=aac88b74-68f7-4b05-81b2-dba5cce0b6b2&puburl=http%3A//isabellacatalog.com/&advurl=http%3A//www.isabellacatalog.com/cat.cfm/pgc/21300/sbc/21306
Mar 9 16:22:12 rn-f5-lan-sip-01 tmm1[6906]: Rule WebLog : 173.70.45.182 ev.ib-ibi.com GET /image.ibvx?sessionid=6e61cafe-01ba-4fb7-af26-c574ccc24c36&go=iblx&osid=aac88b74-68f7-4b05-81b2-dba5cce0b6b2&puburl=http%3A//isabellacatalog.com/&advurl=http%3A//www.isabellacatalog.com/cat.cfm/pgc/21300/sbc/21306 200 pool_info: Prod-443 192.168.50.14 443 (ResponseTime: 1ms)
Here is my HSL irule:
when HTTP_REQUEST {
set hsl [HSL::open -proto TCP -pool rn_syslog_server_pool_01]
Get time for start of HTTP request
set http_request_time [clock clicks -milliseconds]
HTTP::collect 4096
Log the start of a new HTTP request
set LogString "[IP::client_addr] [HTTP::host] [HTTP::method] [HTTP::uri]"
HSL::send $hsl "$LogString"
}
when HTTP_RESPONSE {
set hsl [HSL::open -proto TCP -pool rn_syslog_server_pool_01]
Received the response headers from the server. Log the pool name, IP and port, status and time delta
HSL::send $hsl "$LogString [HTTP::status] pool_info: [LB::server] (ResponseTime: [expr [clock clicks -milliseconds] - $http_request_time]ms)"
}
Here is what i see in syslog
204.128.27.8 ev.ib-ibi.com GET /at.js?sessionid=9c547e54-f657-4b5f-8069-0789c6bb6aa8&go=122&osid=dcd5a534-39af-44e1-9ad8-2580a7375d59204.128.27.8 ev.ib-ibi.com GET /at.js?sessionid=9c547e54-f657-4b5f-8069-0789c6bb6aa8&go=122&osid=dcd5a534-39af-44e1-9ad8-2580a7375d59 200 pool_info: Prod-443 192.168.50.21 443 (ResponseTime: 24ms)70.181.136.166 ev.ib-ibi.com GET /at.js?sessionid=232af8d3-4bd4-4795-9d97-342a368eaf17&go=126&osid=8a7e4586-8d65-4e38-b535-89ff4f5afd4370.181.136.166 ev.ib-ibi.com GET /at.js?sessionid=232af8d3-4bd4-4795-9d97-342a368eaf17&go=126&osid=8a7e4586-8d65-4e38-b535-89ff4f5afd43 200 pool_info: Prod-443 192.168.50.13 443 (ResponseTime: 13ms)75.111.39.162 ev.ib-ibi.com GET /lat.js?sessionid=b4d4c59c-fc21-43ff-b6fd-0afcc9744dcf&go=&osid=fc2af33e-6223-4de8-a101-b4e6faaa288675.111.39.162 ev.ib-ibi.com GET /lat.js?sessionid=b4d4c59c-fc21-43ff-b6fd-0afcc9744dcf&go=&osid=fc2af33e-6223-4de8-a101-b4e6faaa2886 200 pool_info: Prod-443 192.168.50.14 443 (ResponseTime: 4ms)170.213.132.253 ev.ib-ibi.com GET /at.js?sessionid=43abdb4c-b356-495c-8967-4c41c68a19c3&go=125&osid=0aae746c-2dc7-49f3-af94-aba96ba850d7170.213.132.253 ev.ib-ibi.com GET /image.ibvx?sessionid=43abdb4c-b356-495c-8967-4c41c68a19c3&go=125&osid=0aae746c-2dc7-49f3-af94-aba96ba850d7&puburl=http%3A//ad.yieldmanager.com/st%3Fad_type%3Diframe%26ad_size%3D160x600%26section%3D816134&advurl=http%3A//ad.yieldmanager.com/iframe3%3FZiAAAAZ0DAB5CEMAAAAAABjIEQAAAAAAAAAEAAoAAAAAAAsAAwADEJwjFwAAAAAAmpEYAAAAAAA
Mar 9 16:02:53 rn-f5-lan-sip-01 .4.60: ev.ib-ibi.com GET /at.js?sessionid=1e018768-5847-4712-aaf6-98f420697ff9&go=115&osid=0ebe8305-86a6-46c9-b2d5-e7e23ef737b2209.188.179.1 ev.ib-ibi.com GET /at.js?sessionid=68e5ed77-3f0a-4223-bcb3-6fbb07de1f4c&go=125&osid=1b17cdca-9085-414f-ae9b-b127d43c0053 200 pool_info: Prod-443 192.168.50.13 443 (ResponseTime: 25ms)208.54.4.60 ev.ib-ibi.com GET /at.js?sessionid=1e018768-5847-4712-aaf6-98f420697ff9&go=115&osid=0ebe8305-86a6-46c9-b2d5-e7e23ef737b2 200 pool_info: Prod-443 192.168.50.14 443 (ResponseTime: 14ms)71.207.153.35 ev.ib-ibi.com GET /at.js?sessionid=334fc6c3-4f78-47cd-9324-cffdf71c37ac&go=125&osid=a75b1403-771d-49ce-8bdb-65a9cd30274b71.207.153.35 ev.ib-ibi.com GET /at.js?sessionid=334fc6c3-4f78-47cd-9324-cffdf71c37ac&go=125&osid=a75b1403-771d-49ce-8bdb-65a9cd30274b 200 pool_info: Prod-443 192.168.50.15 443 (ResponseTime: 14ms)
Any help would be greatly appreciated
Dan