Forum Discussion
DeltaRho2K_2167
Nimbostratus
Apr 29, 2013Cookie Persistence Issue
Our environment is setup as follows:
Reverse Proxy - Firewall - F5 LTM 1600s - Web Servers
The reverse proxy is in an internet facing DMZ, the F5s are behind a firewall in a non-internet fa...
nitass
Employee
Apr 30, 2013Do you have an example of an iRule that may be handy for logging purposes as you describe?i think we may start from an example in codeshare and add whatever information you want. please make sure system is not overwhelmed by logging. 🙂
Log Http Headers by Aaron
https://devcentral.f5.com/wiki/irules.loghttpheaders.ashx
e.g.
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
set host [HTTP::host]
set uri [HTTP::uri]
set client "[IP::client_addr]:[TCP::client_port]"
log local0. "$client | Host: $host | URI: $uri"
foreach aHeader [HTTP::header names] {
log local0. "$client | $aHeader: [HTTP::header value $aHeader]"
}
}
when HTTP_RESPONSE {
set server "[IP::server_addr]:[TCP::server_port]"
log local0. "$client | $server | Host: $host | URI: $uri | Status: [HTTP::status]"
foreach aHeader [HTTP::header names] {
log local0. "$client | $server | $aHeader: [HTTP::header value $aHeader]"
}
}
}
[root@ve10:Active] config tail -f /var/log/ltm
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | Host: 172.28.19.252 | URI: /
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | Accept: */*
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | Accept-Language: en-US
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; MS-RTC LM 8; .NET4.0E)
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | Accept-Encoding: gzip, deflate
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | Host: 172.28.19.252
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | Connection: Keep-Alive
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | Cache-Control: no-cache
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | 200.200.200.101:80 | Host: 172.28.19.252 | URI: / | Status: 200
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | 200.200.200.101:80 | Date: Tue, 30 Apr 2013 14:20:27 GMT
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | 200.200.200.101:80 | Server: Apache/2.2.3 (CentOS)
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | 200.200.200.101:80 | Last-Modified: Sat, 27 Oct 2012 03:22:35 GMT
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | 200.200.200.101:80 | ETag: "4183f3-59-f28f94c0"
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | 200.200.200.101:80 | Accept-Ranges: bytes
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | 200.200.200.101:80 | Content-Length: 89
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | 200.200.200.101:80 | Keep-Alive: timeout=15, max=100
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | 200.200.200.101:80 | Connection: Keep-Alive
Apr 30 22:09:45 local/tmm info tmm[4950]: Rule myrule : 192.168.206.44:64814 | 200.200.200.101:80 | Content-Type: text/html; charset=UTF-8
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects