Hello Subrun.
First you need to provision this iRule in the resources section of one specific virtual server.
After that, this iRule will be executed when the specific condition occurs, in your example (HTTP_REQUEST), when one HTTP resquest is received.
Beside this, take into account that "<action>" will only be executed when source IP ([IP::client_addr]) matches "10.10.10.10". You can modify it appropriately.
In your "action" section you can log anything (variables, text, etc.). An example:
when HTTP_REQUEST {
if {[IP::addr [IP::client_addr]] equals "10.10.10.10"} {
log local0. "Traffic matches the iRule"
}
}
Another example:
when HTTP_REQUEST {
if {[IP::addr [IP::client_addr]] equals "10.10.10.10"} {
log local0. "Traffic matches the iRule with source IP: [IP::client_addr]"
}
}
For logging traffic with responses, you should use HTTP_RESPONSE event.
Regards,
Dario.