Re: [logs] Log rotation tools

From: Nate Campi (nateat_private)
Date: Tue Sep 18 2001 - 10:20:06 PDT

  • Next message: Colby Rice: "Re: [logs] Log rotation tools"

    On Tue, Sep 18, 2001 at 02:02:24PM +1200, Russell Fulton wrote:
    > 
    > On Fri, 14 Sep 2001 12:01:54 -0400 (EDT) Jose Nazario 
    > <joseat_private> wrote:
    > > 
    > > i still vote for logrotate. 
    > 
    > The problem with systems like logrotate is that they reuse file names 
    > which breaks archiving.
    > 
    > What do others do about archiving logs?
    
    I use syslog-ng to automatically sort the logs as they arrive.
    
    Snipped from my syslog-ng.conf:
    
      # automatic host sorting
      
      # define the format
      destination hosts {
      file("/var/log/HOSTS/$HOST/$FACILITY/$YEAR/$MONTH/$DAY/$FACILITY$YEAR$MONTH$DAY"
      owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes)); };
      
      # log by host
      log { source(src); destination(hosts); };
    
    Works like a charm, and you can sort it any way that fits your needs.
    -- 
    Nate Campi, UNIX Ops WiReD SF, Terra Lycos DNS, (415) 276-8678  
    
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: loganalysis-unsubscribeat_private
    For additional commands, e-mail: loganalysis-helpat_private
    



    This archive was generated by hypermail 2b30 : Tue Sep 18 2001 - 11:55:29 PDT