Forum Discussion
Mike_73765
Jan 05, 2011Nimbostratus
Logging Certain number of characters with HTTP::request
Hello,
I am logging the following info:
log local0. "Client Address: [IP::client_addr], HTTP Header: [HTTP::request]"
A sample output from the HTTP::request command is: ...
Colin_Walker_12
Jan 05, 2011Historic F5 Account
I think you can get what you're looking for by combining a few pre-built commands rather than doing some complicated scan or regular expression.
Check out these commands:
HTTP::method - http://devcentral.f5.com/wiki/default.aspx/iRules/HTTP__method.html
HTTP::uri - http://devcentral.f5.com/wiki/default.aspx/iRules/HTTP__uri.html
and
IP::client_addr - http://devcentral.f5.com/wiki/default.aspx/iRules/IP__client_addr.html,
If you put these three together I think you can achieve 100% of what you're looking for easily and for very few cycles.
Something like this:
when HTTP_REQUEST {
log local0. "Client Address:[IP::client_addr], Request Type:[HTTP::method], Request URI:[HTTP::uri]"
}
Simple, but it should get you where you want to go, unless there's something specific in the header past those pieces of information that you want.
Colin
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