Xymon Mailing List Archive search

Tracking Users -- Ideas

4 messages in this thread

list James Wade · Thu, 24 Jan 2008 10:52:35 -0600 ·
Hello All,

 
I'd like to be able to graph the number of users

connecting to a web-site. I was wondering if any one

had any good ideas or if something had already been

written.

 
Basically, I want to track the number of users connecting

to a web-site by looking at the log-file, and I'd like to graph

it.

 
The log-file looks like this:

 
192.168.0.22 - user07 [20/Aug/2007:08:49:49 -0500] "GET /htdocs/info/wd.html


So, it shows all the web pages the user accesses. What I really want to know

is how many users are currently connecting through to the web-site.

 
I could cat the log file out every minute, grab the username, do a sort
unique

based on the IP address and Username, then do a count, and graph it. But

I don't know that it would be very accurate. The logfile rotates every 2mb,

so I'd have to do a grep of all the files based on date and time, then do

a sort on IP address and Username.

 
I also want to put some checks in, for example, same username with

more than one IP address, reverse lookup of the IP based on location,

ie..our users should only be in the U.S., and not somewhere else.

 
Any suggestions?

 
Thanks.James
list Ralph Mitchell · Thu, 24 Jan 2008 11:02:57 -0600 ·
quoted from James Wade
On Jan 24, 2008 10:52 AM, James Wade <user-659655b2ea05@xymon.invalid> wrote:
 Hello All,


I'd like to be able to graph the number of users

connecting to a web-site. I was wondering if any one

had any good ideas or if something had already been

written.


Basically, I want to track the number of users connecting

to a web-site by looking at the log-file, and I'd like to graph

it.


The log-file looks like this:


192.168.0.22 - user07 [20/Aug/2007:08:49:49 -0500] "GET
/htdocs/info/wd.html

 So, it shows all the web pages the user accesses. What I really want to
know

is how many users are currently connecting through to the web-site.


I could cat the log file out every minute, grab the username, do a sort
unique

based on the IP address and Username, then do a count, and graph it. But

I don't know that it would be very accurate. The logfile rotates every
2mb,

so I'd have to do a grep of all the files based on date and time, then do

a sort on IP address and Username.


I also want to put some checks in, for example, same username with

more than one IP address, reverse lookup of the IP based on location,

ie….our users should only be in the U.S., and not somewhere else.
Dunno if/how it could be integrated into Hobbit, but I think Webalizer (
http://www.mrunix.net/webalizer/) does exactly what you're looking for.

Ralph Mitchell
list Martin Ward · Thu, 24 Jan 2008 17:12:05 -0000 ·
Hi James,
 
Tracking users of a website is a little tricky unless you actually have
them logging in and out. Most websites are not stateful, which is to say
you do not have the concept of a user being logged in; the user
connects, downloads a webpage from your site and disconnects.
 
Your example:
The log-file looks like this:
192.168.0.22 - user07 [20/Aug/2007:08:49:49 -0500] "GET
/htdocs/info/wd.html

shows a user ID so presumably you have some kind of authentication, but
do you have a "logoff" button and are your users forced to use it? Or
can they simply authenticate, download the data and then close their web
browser?
quoted from Ralph Mitchell

 
So, it shows all the web pages the user accesses. What I really want
to know
is how many users are currently connecting through to the web-site.
 
How can you define "Currently"? If you mean "How many people are
currently download webpages from my website and if you are running a
unix machines then you can use the "netstat -an" command and find all
connections that are connected to your local port 80 (or whichever port
your web server runs on).

 
|\/|artin


*************************************************************************************
The message is intended for the named addressee only and may not be disclosed to or used by anyone else, nor may it be copied in any way. 

The contents of this message and its attachments are confidential and may also be subject to legal privilege.  If you are not the named addressee and/or have received this message in error, please advise us by e-mailing user-61c7f445d564@xymon.invalid and delete the message and any attachments without retaining any copies. 

Internet communications are not secure and COLT does not accept responsibility for this message, its contents nor responsibility for any viruses. 

No contracts can be created or varied on behalf of COLT Telecommunications, its subsidiaries or affiliates ("COLT") and any other party by email Communications unless expressly agreed in writing with such other party.  

Please note that incoming emails will be automatically scanned to eliminate potential viruses and unsolicited promotional emails. For more information refer to www.colt.net or contact us on +44(0)20 7390 3900.
list James Wade · Fri, 25 Jan 2008 10:11:56 -0600 ·
Webalizer does do a lot of what I'm looking to do.

However, I want to be able to have the number of users

and hits traced through Hobbit so that I can pull up metric

graphs and compare to CPU, Memory, Networks, etc..,

 
This will allow me to compare hardware usage with the

number of users accessing the infrastructure for future

growth and performance analysis.

 
James
quoted from Ralph Mitchell

 
From: Ralph Mitchell [mailto:user-00a5e44c48c0@xymon.invalid] 
Sent: Thursday, January 24, 2008 11:03 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Tracking Users -- Ideas

 
Dunno if/how it could be integrated into Hobbit, but I think Webalizer
(http://www.mrunix.net/webalizer/) does exactly what you're looking for. 

Ralph Mitchell