please help me to log http 500 responses
Hi all
I have a requirement to log http 500 errors from 2 web servers behind a virtual server ip. I need to log the client ip that requested and also the server that give the http 500 error, I have the below but its throwing up errors in the logs, can anyone help cheers
when HTTP_REQUEST { set hostvar [HTTP::host] set urivar [HTTP::uri] set ipvar [IP::client_addr] }
when HTTP_RESPONSE { if { [HTTP::status] eq 500 } { log local0. “$ipvar requested $hostvar $urivar and received a 500 from [IP::server_addr]” }}
The error logs are
Wed May 6 05:44:58 BST 2015 info F5-LOAD-BAL-1 tmm3[12660] Rule /Common/http-response-500-error-logging : &8220
Wed May 6 05:44:58 BST 2015 err F5-LOAD-BAL-1 tmm3[12660] 01220001 TCL error: /Common/http-response-500-error-logging - invalid command name "125.45.44.6" while executing "$ipvar requested $hostvar $urivar and received a 500 from [IP::server_addr]&8221"