Forum Discussion
mcorvalan_57694
Nimbostratus
Aug 29, 2011How to log HTTP_REQUEST
Hi All.
I send this post to ask you how can I make the Irule to log when I receive HTTP_REQUEST the name of vs.
for example I could find this
when HTTP_REQUEST {
log local0. "Client Address:[IP::client_addr], Request Type:[HTTP::method], Request URI:[HTTP::uri]"
}
This is very useful but I need to know this data comes from the some vs. for example the log shows me from which vs is coming this request.
Since now thanks alot.
4 Replies
- nitass
Employee
[root@orchid:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.17.88:http
ip protocol tcp
rules myrule
profiles
http
tcp
}
[root@orchid:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
log local0. "Virtual: [virtual name], Client Address:[IP::client_addr], Request Type:[HTTP::method], Request URI:[HTTP::uri]"
}
}
[root@orchid:Active] config tail /var/log/ltm
Aug 29 22:33:28 tmm tmm[11782]: Rule myrule : Virtual: bar, Client Address:172.28.17.80, Request Type:HEAD, Request URI:/ - mcorvalan_57694
Nimbostratus
Very very good, Im gonna try it, since now thank a lot. - nitass
Employee
u r welcome. :-)
enjoy! - kaefuh
Nimbostratus
when HTTP_REQUEST {
set app_pool [class match -value [HTTP::host] contains hostpool]
if { not ($app_pool eq "") }{
pool $app_pool
log "[HTTP::host] pool to $app_pool"
} else {
use pool WabAppSCAN
log local0.info "Virtual: [virtual name]:[HTTP::host] + client address [IP::client_addr] pools nodes is [LB::server]"
}
}
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