LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-12-2004, 11:52 PM   #1
PowerMatt
Member
 
Registered: Aug 2004
Posts: 42

Rep: Reputation: 15
webalizer and logrotate


Seems like a simple question, but I can't find an answer for it.

How does webalizer handle wildcards? For instance, my server runs webalizer on an hourly rotation and logrotate on a daily rotation. Can I get it to analyze both access_log and access_log.1 (the previous day's log) so that it doesn't miss any log entries from the previous hour before the rotation? For some reason there's nothing in the webalizer documentation on wildcards for the access log.
 
Old 10-13-2004, 11:42 AM   #2
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
Have you checked out the history function of Webalizer. It keeps a history file from the previous times webalzer was run.
 
Old 10-13-2004, 11:56 AM   #3
PowerMatt
Member
 
Registered: Aug 2004
Posts: 42

Original Poster
Rep: Reputation: 15
It would seem that it's not missing anything. The way my log rotation works is that it adds a numbered extension of the rotated log file (access_log, access_log.1, access_log.2). So it would seem that this line in my webalizer.conf:

Code:
LogFile        /var/log/httpd/access_log
already acts like a wildcard by analyzing anything that begins with access_log. Would I be correct in that assumption?
 
Old 10-13-2004, 01:50 PM   #4
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
I dont believe that is correct. It should only look at the exact file specified.

Do you have the line "HistoryName <filename>" uncommented?
 
Old 10-13-2004, 03:22 PM   #5
PowerMatt
Member
 
Registered: Aug 2004
Posts: 42

Original Poster
Rep: Reputation: 15
That I do:

Code:
HistoryName /var/lib/webalizer/webalizer.hist
 
Old 10-13-2004, 09:20 PM   #6
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
Ok, so that is taking care of the log rotation. Every time webalizer runs, it puts data into that history file so that when you rotate the logs, it doesnt care that the old data is not there.
 
Old 10-13-2004, 10:56 PM   #7
PowerMatt
Member
 
Registered: Aug 2004
Posts: 42

Original Poster
Rep: Reputation: 15
Let me put this another way... I'm running a server on Fedora Core 2. Still mostly a default setup. One of the excpetions being that I changed webalizer to an hourly rotation on the hour. The logroate script is in the daily folder, which runs at 4:02 AM (default scheduled time). So the hourly webalizer run would be two minutes before the log rotation is supposed to occur. How would I get it to not miss that last two minutes before the log was rotated?
 
Old 10-13-2004, 11:53 PM   #8
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
Well, I guess you could create a second webalizer script that will run after the log rotate and look at the file access_log.1, or whatever the file is that the file gets renamed to. Other than that I dont think that there is an automatic way to do it.
 
Old 10-14-2004, 12:31 AM   #9
PowerMatt
Member
 
Registered: Aug 2004
Posts: 42

Original Poster
Rep: Reputation: 15
That's an idea. Thanks, hadn't thought about doing that. I gathered that running them at the same time probably wouldn't be a good idea due to file locks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
logrotate in SLES 8 jce23 Linux - Software 0 09-14-2004 12:52 PM
Logrotate Help! MaverickApollo Linux - Software 3 02-19-2004 12:09 PM
logrotate dominant Linux - Newbie 1 02-13-2004 09:28 AM
logrotate Rig24 Linux - Newbie 2 07-11-2003 05:08 AM
logrotate MrJoshua Linux - General 2 09-25-2002 09:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration