You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Khai Doan <kh...@hotmail.com> on 2006/02/18 04:05:25 UTC

[users@httpd] storing log data in a database

Hi All,

I am thinking about storing the log data in a database.  What do you think 
about it?  Is it a good idea or bad idea?

Thanks
Khai



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] storing log data in a database

Posted by Sean Davis <sd...@mail.nih.gov>.
We store to a DB also.  I have a mod_perl handler that does that work.  If
you have mod_perl running, you might google around a bit for mod_perl ­based
logging.  It is quite easy to do.  We log to a Postgres database, but since
perl uses DBI, which is database independent (pretty much), you can really
use any database you like.  The logging is then totally self-contained and
can be customized in a single place.

Sean


On 2/19/06 12:47, "Steve" <la...@gmail.com> wrote:

> Only bother doing it if you actually need to perform queries on the data.
> Basically any good log analyzer will work with regular log files, so there is
> no need to use a DB for that.
> 
> We use the DB approach at my work because we have many web servers, and
> sending the logs to a DB allows us to see realtime website hits and track
> everything that is currently going on. The logs are sent to an intermediate
> script that sends to a local log file on the webserver, and then to the DB.
> 
> If you do go this route, and use MySQL, make sure the table can handle a size
> greater than 4GB. By default, it can't, and that hurt us when it happened...
> 
> Enjoy!
> 
> On 2/17/06, Khai Doan <kh...@hotmail.com> wrote:
>> Hi All,
>> 
>> I am thinking about storing the log data in a database.  What do you think
>> about it?  Is it a good idea or bad idea?
>> 
>> Thanks
>> Khai
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> <ma...@httpd.apache.org>
>> For additional commands, e-mail: users-help@httpd.apache.org
>> 
> 
> 



Re: [users@httpd] storing log data in a database

Posted by Steve <la...@gmail.com>.
Only bother doing it if you actually need to perform queries on the data.
Basically any good log analyzer will work with regular log files, so there
is no need to use a DB for that.

We use the DB approach at my work because we have many web servers, and
sending the logs to a DB allows us to see realtime website hits and track
everything that is currently going on. The logs are sent to an intermediate
script that sends to a local log file on the webserver, and then to the DB.

If you do go this route, and use MySQL, make sure the table can handle a
size greater than 4GB. By default, it can't, and that hurt us when it
happened...

Enjoy!

On 2/17/06, Khai Doan <kh...@hotmail.com> wrote:
>
> Hi All,
>
> I am thinking about storing the log data in a database.  What do you think
> about it?  Is it a good idea or bad idea?
>
> Thanks
> Khai
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>