SunQuest
           Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old July 19th, 2001, 01:52 PM
bizzk's Avatar
bizzk bizzk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: The Netherlands
Posts: 327 bizzk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Can apache log into a mySQL table?

Can apache log into a mySQL table on the local server?

Thank you very much, Bizzk

Reply With Quote
  #2  
Old July 20th, 2001, 01:39 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You can pipe that to a script and have your script insert the data into MySQL. In the real world, nobody is fool enough to do this to replace your existing logging mechanism. What you probably should do is to post process your logs via a cronjob.

Reply With Quote
  #3  
Old July 20th, 2001, 12:36 PM
bizzk's Avatar
bizzk bizzk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: The Netherlands
Posts: 327 bizzk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Is this done before? Are there any scripts I can use or do I have to code it myself? When you say "post process" do you mean an update every 15 minutes or something?

Reply With Quote
  #4  
Old July 21st, 2001, 07:24 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> When you say "post process" do you mean an update every 15 minutes or something?

Not exactly. I mean, do not change the Apache logging mechanism using a pipe | and pipe to a script. Why? Not reliable and slow and insecure. Post process it is to insert your rotated logs to a database, not as a logging replacement with your script. The rotated logs are the one sApache not currently write to, thus can be removed or inserted to a database or whatever.

Reply With Quote
  #5  
Old July 22nd, 2001, 07:47 PM
bizzk's Avatar
bizzk bizzk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: The Netherlands
Posts: 327 bizzk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
You mean I should rotate my logs, and then use a script to insert the rotated logs into mySQL?

In the apache manual I found the following utitlity: rotatelogs.
They say that that utility also uses the pipe feature. Do you recommend using this utility to rotate my logs?

Once the logs are being rotated how can I insert them into mySQL? I have never done anything like that before. I suppose I have to get some kind of script or program and that changes the format to an *.sql file and run a cronjob to insert it every hour?

Thanks, Bizzk

Reply With Quote
  #6  
Old July 23rd, 2001, 12:52 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> Do you recommend using this utility to rotate my logs?

rotatelog has an advantage for rotating your Apache log without restarting your server. What I've been saying was to suggest you not to log to a database in realtime. If you must insert your log to mysql, post process it to a mysql-acceptable-format with your script, then run a cronjob to actually inserting the data to mysql.

Reply With Quote
  #7  
Old July 23rd, 2001, 01:11 AM
bizzk's Avatar
bizzk bizzk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: The Netherlands
Posts: 327 bizzk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
I think I understand what you mean, thanks. I think I will use some log analysing tool for the log stats, instead of writing my own mySQL/php tool. Those log utilties are actually quite smart!

Last edited by bizzk : July 23rd, 2001 at 01:15 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Can apache log into a mySQL table?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway