Forum Discussion
Kevin_Stewart
May 07, 2014Employee
There are quite a few options:
-
First, there's no specific reporting, per VIP, for server errors, for that you'd probably want to use an iRule attached to the VIP (in which case you've already narrowed it down to a specific VIP and pool)
-
You could log the response status codes locally.
-
You could log the response status codes remotely.
-
You could increment a local "statistics" counter for a given set of status codes.
when CLIENT_ACCEPTED { set hsl [HSL::open -proto UDP -pool syslog-pool] set clientip [IP::client_addr] set default_pool [LB::server pool] } when HTTP_RESPONSE { switch -glob [HTTP::status] { "40*" - "50*" { local log: /var/log/ltm log local0. "Client: \[$clientip\] received status code: \[[HTTP::status]\] from pool: \[$default_pool\]" high speed remote log HSL::send $hsl "<134>Client: \[$clientip\] received status code: \[[HTTP::status]\] from pool: \[$default_pool\]" stats profile (update counter) switch [HTTP::status] { "401" { STATS::incr status_check 401 } "404" { STATS::incr status_check 404 } "500" { STATS::incr status_check 500 } } } } }
The local logs show up in /var/log/ltm in the shell or the LTM log in the GUI. Remote logs will get sent to a syslog server in your environment. The stats can be found under Local Traffic - Profiles - Other - Statistics, and then under the Statistics tab of a given stats profile.