Forum Discussion
iRule to log traffic details
- Sep 21, 2023
Hi yadgayan ,
U can use this :when HTTP_REQUEST { log local0. "HTTP Method = [HTTP::method]" log local0. "HTTP URI = [HTTP::uri]" log local0. "HTTP Path = [HTTP::path]" log local0. "HTTP Query = [HTTP::query]" log local0. "HTTP Version = [HTTP::version]" log local0. "HTTP Host Header = [HTTP::host]" log local0. "HTTP User Agent Header = [HTTP::header value "user-agent"]" } when HTTP_RESPONSE { log local0. "HTTP Status = [HTTP::status]" log local0. "HTTP version = [HTTP::version]" log local0. "HTTP Content Length Header = [HTTP::header value "content-length"]" }
- you can remove any info you don't want to log it.
refer to this Link to find our more : https://my.f5.com/manage/s/article/K42210592
I haven't tested this irule , but it should work.
By the way : you can use High speed logging ( HSL ), it's pretty good to use :
https://my.f5.com/manage/s/article/K00847516
I hope this helps u 🙂 - Sep 26, 2023
Thanks Mohamed_Ahmed_Kansoh
I modified and made a single log entry to achieve my goal. But thanks a lot for the direction.
Hi yadgayan ,
U can use this :
when HTTP_REQUEST {
log local0. "HTTP Method = [HTTP::method]"
log local0. "HTTP URI = [HTTP::uri]"
log local0. "HTTP Path = [HTTP::path]"
log local0. "HTTP Query = [HTTP::query]"
log local0. "HTTP Version = [HTTP::version]"
log local0. "HTTP Host Header = [HTTP::host]"
log local0. "HTTP User Agent Header = [HTTP::header value "user-agent"]"
}
when HTTP_RESPONSE {
log local0. "HTTP Status = [HTTP::status]"
log local0. "HTTP version = [HTTP::version]"
log local0. "HTTP Content Length Header = [HTTP::header value "content-length"]"
}
- you can remove any info you don't want to log it.
refer to this Link to find our more : https://my.f5.com/manage/s/article/K42210592
I haven't tested this irule , but it should work.
By the way : you can use High speed logging ( HSL ), it's pretty good to use :
https://my.f5.com/manage/s/article/K00847516
I hope this helps u 🙂
Recent Discussions
Related Content
* 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