Forum Discussion
Nandhi
Oct 19, 2022Cirrus
HSL iRule to log http status error output to syslog server
All, I am new to irule. Looking for experts suggestion one of the iRule while will log an output to a syslog server directly. The iRule should check the http status code of the connection and send t...
Kevin_Stewart
Employee
Try removing HTTP::has_responded.
when CLIENT_ACCEPTED {
set hsl [HSL::open -proto UDP -pool syslog_server_pool]
}
when HTTP_RESPONSE {
set status_code [HTTP::STATUS]
set log_msg ""
append log_msg "$Client_ip"
append log_msg "$status_code"
HSL::send $hsl"<190> $log_msg"
}
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