• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2931
  • Last Modified:

log retention in aix , linux

Hi ,

I need to ensure that log is retained for 400 days in linux and aix server . How to implement it

Thanks  
0
apunkabollywood
Asked:
apunkabollywood
1 Solution
 
TintinCommented:
What type of log?
What process logs to it?
Do you want to delete or compress it after 400 days?
Do you want to regularly rotate the file?
0
 
apunkabollywoodAuthor Commented:
Log related to wtmp , sulog failedlogin activities ,
I want to keep logs for 400 days
in compress format after 400 days
also tell me how to rotate this to another server in the case do not have space on server
0
 
madunixChief Information Security Officer Commented:
in Linux you have to use logrotate utility
http://www.linuxjournal.com/article/5314
http://gd.tuwien.ac.at/linuxcommand.org/man_pages/logrotate8.html

edit /etc/logrotate.conf which defines what logrotate does and how. Configuration parameters exist in both a global configuration file and one for each subsystem. The global file is (by default) /etc/logrotate.conf while the subsystem specific definitions are in the directory /etc/logrotate.d.
my configuration  it looks
[root@linux1 ~]# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly
#daily

# keep 4 weeks worth of backlogs
rotate 4
# rotate 30

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    minsize 1M
    create 0664 root utmp
    rotate 1
}

# system-specific logs may be also be configured here.


madunix
0
 
woolmilkporcCommented:
Hi,
you can get logrotate for AIX from here -
http://www.perzl.org/aix/index.php?n=Main.Logrotate
Please mind the dependencies - you will need additionally
- coreutils - http://www.perzl.org/aix/index.php?n=Main.Coreutils
- popt - http://www.perzl.org/aix/index.php?n=Main.Popt
- gettext - http://www.perzl.org/aix/index.php?n=Main.Gettext
and maybe some other packages. It's all mentioned on the above web pages.
Install the packages using "rpm -i filename_of_downloaded_package"
rpm is shipped with AIX - no need to install it.
You should check carefully that the rotated logs are included in your regular backups and that the retention period of these backups is long enough. 400 days are a rather long time - who knows what might happen to your harddisks?
(Most probably nothing, I know, but why take a risk?)
wmp
0
 
apunkabollywoodAuthor Commented:
Thanks
0

Featured Post

SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now