[mrtg] Re: Monitoring web traffic
paulbeard at mac.com
Tue Jan 29 18:00:14 MET 2002
you need some way to extract the two numbers that MRTG plots: I'm
not sure what you want to track, but some kind of log monitoring
app that can generate your numbers every five minutes will need to
fit in there somewhere.
The algorithm I have used (at busy websites: I was working at
CNN.com when I came up with this so I never had to worry about
queiscent server logs) was to stat the file and note its size,
tail the log for some number of seconds (10 or so) and note the
number of lines and the number of bytes. Divide the bytes by the
lines to get an average line length and then stat the file again
to see how many lines you added over those seconds. We were seeing
5-6000 lines/minute so it was always easy to get a sample.
This is OK for busy websites, but for less dynamic logs you would
perhaps want to seek to the end, noting the size with stat,
pause/tail for some seconds and work out the line length as above,
then seek and stat again.
the key is realizing the mrtg will only plot two values: how it
gets them is up to you.
for your purposes, you could do this in parallel for access and
error logs and set up a threshold when errors exceed some
percentage of accesses.
for number of users connected, how does AIX report its listen
queue size? you could use the output of a netstat command, I
suppose, if snmp won't give you this.
we have an Apache web server installed on AIX platform.
we need to monitor the web traffic , no of users connected ,....
on each home page hosted on this server.
how it can be done using mrtg ??
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
More information about the mrtg