Further thoughts...

I will also need to rollover the analog .html files. My problem here (if 
I am on the right track!), is that the .html rollover must take place 
AFTER the log_file roller to keep the extensions in sync. Is logrotate 
run in chronological order i.e. the next job only starts after prceeding 
one finishes??

If so, my updated logrotate.conf is:
----------------------
# system-specific logs may be configured here
# Added by BC 22/5/00

# rotate log file:
       /home/httpd/company-domains.net/logs/combined_log {
           create
           rotate 7
           daily
           errors [EMAIL PROTECTED]
           postrotate
                    /sbin/killall -HUP httpd
                    analog -G +g/home/httpd/cgi-bin/company-domains.cfg
           endscript
           delaycompress
       }
# I may need a time delay here?

# rotate Analog file:
       /home/httpd/company-domains.net/logs/combined_log.html {
#          don't create new log file as analog does this.
           nocreate

           rotate 7
           daily
           errors [EMAIL PROTECTED]
           endscript
           nocompress
       }
----------------------

In this way:
rollover combined_log        ---> combined_log.1
analog input(combined_log.1) ---> combined_log.html
rollover combined_log.html   ---> combined_log.html.1

Therefore combined_log.1 will always match with combined_log.html.1

Hope I am right!!!

Best regards, Brian

> Hi Karel
> 
> Thanks for your reply - The simpler the better...OK, I think I follow your
> suggestion. Below I have listed my appended contents of
> /etc/cron.daily/logrotate.conf.
> 
> Could I please ask you (or anyone) to knidly check if this is alright? One
> thing in particular, the '/sbin/killall -HUP httpd' command is given as an
> example in the man logrotate file. Is this required??
> 
> 
> ---APPENDED TO THE BOTTOM OF LOAGROTATE.CONF---
> # system-specific logs may be configured here
> # Added by BC 22/5/00
> 
>        /home/httpd/company-domains.net/logs/combined_log {
>            create
>            rotate 7
>            daily
>            errors [EMAIL PROTECTED]
>            postrotate
>                       /sbin/killall -HUP httpd
>                       analog -G +g/home/httpd/cgi-bin/company-domains.cfg
>            endscript
>            delaycompress
>        }
> -----------------------------------------------
> 
> All I then need to do is set company-domains.cfg:
> LOGFILE /home/httpd/company-domains.net/logs/combined_log.1
> 
> i.e. pointing to the rotated log file (which souldn't be compressed until
> the next rotation)? If this is right, it is a very neat solution.
> 
> TIA, Brian
> 
> > >Could anyone please help me build a rollover script for logfiles and
> > >analysis?? I would be happy to post the results to this list...
> > >
> > >I am on RH6.1 (intel). I have read Rebecca Minarik's script, and just
> > >need to tweak it. I am not a unix/cron expert, but neither am I stupid!
> > >I
> > > am willing to try if someone can spare a little effort with me...
> > 
> > My method may be a titch simplistic, but I'm getting the results I want
> > anyway so i don't care. *g*
> > 
> > I set up my analog.cfg the way I wanted... output file of index.html in
> > the /webstats directory, in my case, as well as telling analog to parse
> > /var/log/httpd/access_lo* for its data.
> > 
> > I made two small edits to existing RedHat-installed files. In
> > cron.daily's logrotate script I inserted a command to run analog before
> > the actual log rotation occurs. (I did this mainly to completely avoid
> > any conceivable cross-purposes on the part of analog and the log
> > rotation scheme.) And in the logrotate.conf file I upped the weeks to 12
> > so I can have three months' worth of data in my report.
> > 
> > As RedHat is already checking log rotation daily, and comes default (in
> > 6.2 anyway) setup to keep 4 weeks of rolled-over logs, there's not much
> > to it. YMMV, of course, and your goals may not be the same as mine.
> > 
> 
> 
> ------------------------------------------------------------------------
> This is the analog-help mailing list. To unsubscribe from this mailing
> list, send mail to [EMAIL PROTECTED] with "unsubscribe"
> in the main BODY OF THE MESSAGE. List archived at
> http://www.mail-archive.com/analog-help@lists.isite.net/
> ------------------------------------------------------------------------
> 
> 


------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/analog-help@lists.isite.net/
------------------------------------------------------------------------

Reply via email to