Forum Discussion
Chris_Miller
Altostratus
Sep 01, 2010What to collect for HTTP - 500 Errors?
I'd like to log HTTP 500 errors but am unsure of what info to log. I know I can log IP::server_addr but what can I do as far as the URI a user was trying to hit that caused the error?
when HTTP_RESPONSE {
if { [HTTP::status] contains "500"} {
log local0. "HTTP 500 from Server [IP::server_addr] for .... } }
Just curious about what info the server is sending when it sends a 500 so I know what's loggable.2 Replies
- JRahm
Admin
You would need to capture the uri on the inbound and save it in a variable. Here are a couple good rules in the codeshare that give you a start on what you might consider collecting: - L4L7_53191
Nimbostratus
Regarding what info the server is sending, I'd say it depends. For example, Apache may send a generic 500 Internal Server Error status page, while a Java container may send a full stack trace (which may or may not be useful to you). There are a lot of different ways it can pan out, so your idea is a good one Chris: pull out what data you care about and log that.
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