Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#226008 - 07/07/2004 15:22 Web log analyzer for 500 errors
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
So we have been having some internal server errors that are showing up in our WebTrends logs. However, the WebTrends reports only tell me how many errors have happened and at what time. They don't tell me any useful info like what page threw the error and what the referrer to that page was, etc...

Does anyone here know of a tool that can provide more info about 500 errors on the web server from the logs? The logs are from IIS on a W2K server. I imagine the logs themselves provide more info than what WebTrends is telling me - or am I wrong?

Thanks for any help!
_________________________
- trs

Top
#226009 - 07/07/2004 15:24 Re: Web log analyzer for 500 errors [Re: trs24]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Nope, access logs typically don't tell you what went wrong. You need to dig into the error logs for that. The error logs are generally in the same directory as the access logs, but I don't know IIS well enough to tell you where to look exactly.
_________________________
- Tony C
my empeg stuff

Top
#226010 - 07/07/2004 15:35 Re: Web log analyzer for 500 errors [Re: trs24]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Does IIS put any of those errors in the operating system's event logs? Have you looked there?
_________________________
Tony Fabris

Top
#226011 - 07/07/2004 16:58 Re: Web log analyzer for 500 errors [Re: tfabris]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
Quote:
Does IIS put any of those errors in the operating system's event logs?

Yeah, I've looked there. 500 errors, though don't seem to be loged as an event. I can't find any place where error logs are written from IIS. Humpf.

I think I'll just have to go through the logs manually and search for the 500 errors and see what I can gather from there. Gotta love MS.
_________________________
- trs

Top
#226012 - 07/07/2004 17:49 Re: Web log analyzer for 500 errors [Re: trs24]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Quote:
any place where error logs are written from IIS. Humpf.


All you get is what's in C:\WINDOWS\System32\LogFiles\W3SVC1. Other than that, you're SOL.
_________________________
-- roger

Top
#226013 - 07/07/2004 23:02 Re: Web log analyzer for 500 errors [Re: trs24]
g_attrill
old hand

Registered: 14/04/2002
Posts: 1172
Loc: Hants, UK
If there is a way then I would be interested.

I have some ASP page that just dumps the properties of the error out to a text file. You just need to set it as the Custom Error page for 500.100 errors.

Thinking about it, it might be possible to append the W3 log file, but I suspect it would be locked by the IIS process. You might be able to get to it using an ISAPI filter, but that is a bit beyond me.

edit: Here's some example code for getting error properties from an ASP page. This is saved as something like 500.asp and set as the custom error page.

Response.Status="500 Server Error"
Response.Write("<h1>whoops we have an error!</h1>")
[......]
Set objError = Server.getLastError()
strNumber = objError.AspCode
strSource = objError.Category
strPage = objError.File
strDesc = objError.Description
strCode = Server.HTMLEncode(objError.Source)
strLine = ObjError.Line
strASPDesc = ObjError.ASPDescription


I usually log the Request.ServerVariables("HTTP_REFERER"), Request.QueryString and Now() so that it can be easily tied back to the log files if required.

Gareth


Edited by g_attrill (07/07/2004 23:07)

Top
#226014 - 08/07/2004 14:17 Re: Web log analyzer for 500 errors [Re: g_attrill]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
Ah of course!! Why didn't I think of that. Thanks Gareth... *Implementing custom 500 error page now*
_________________________
- trs

Top
#226015 - 08/07/2004 16:28 Re: Web log analyzer for 500 errors [Re: g_attrill]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
Boy, what an elegant solution. I can't believe I didn't create a custom 500 page years ago!

Thx again.


Edited by trs24 (08/07/2004 21:55)
_________________________
- trs

Top
#226016 - 08/07/2004 17:23 Re: Web log analyzer for 500 errors [Re: trs24]
Phoenix42
veteran

Registered: 21/03/2002
Posts: 1424
Loc: MA but Irish born
Does that mean I should stop hitting F5?

Top
#226017 - 08/07/2004 17:36 Re: Web log analyzer for 500 errors [Re: trs24]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Quote:
Don't check it out too many times, though, cause it emails me every time someone causes a 500 error.

Two words: web spider

Peter

Top
#226018 - 08/07/2004 18:28 Re: Web log analyzer for 500 errors [Re: Phoenix42]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
Quote:
Does that mean I should stop hitting F5?

Ha ha... I knew I shouldn't even have written that.
_________________________
- trs

Top
#226019 - 08/07/2004 18:29 Re: Web log analyzer for 500 errors [Re: peter]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
Quote:
Two words: web spider

Luckily that is preventable.
_________________________
- trs

Top
#226020 - 08/07/2004 18:59 Re: Web log analyzer for 500 errors [Re: trs24]
g_attrill
old hand

Registered: 14/04/2002
Posts: 1172
Loc: Hants, UK
Good stuff, I have found it very useful and do the same for 404's. I log all the sites on my servers to a single folder which I check every now and then. 404's do need a bit of filtering though - things like Office Shortcut bars attempt to call a web services DLL and you get people scanning for exploitable CGI's etc, and then you have favicon's robots.txt etc.

Gareth

Top