LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-15-2012, 04:45 PM   #1
Iyyappan
Member
 
Registered: Dec 2008
Location: Chennai, India
Distribution: CentOS 5, SLES 11
Posts: 245

Rep: Reputation: 4
Syslog-ng messages.log log rotation


Hi,
We have syslog configured and in one server logs alone has reached 32 GB. Now I have configure log-rotation like this

/var/log/remote.d/192.168.18.198/messages.log {
rotate 4
monthly
missingok
notifempty
compress
}

I have moved the messages.log file ( 32 GB) file to another location. I have created an empty file with same rights and ownerships. When will the newly created messages.log file will start to capture logs. Do I need to restart the service to make it capture logs.
 
Old 09-15-2012, 04:49 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
the service? What service? logrotate is not a service, and has nothing to do with syslog-ng, they don't interact in any way. If you mean syslog-ng (then why have you included logrotate config??) then you may wish to hup / restart the syslog-ng daemon to close the file handles. Note that as far as logrotate goes, you should copy the config that the over files it creates, e.g. /var/log/messages use.
 
Old 09-15-2012, 04:51 PM   #3
Iyyappan
Member
 
Registered: Dec 2008
Location: Chennai, India
Distribution: CentOS 5, SLES 11
Posts: 245

Original Poster
Rep: Reputation: 4
messages.log file in /var/log/remote.d/192.168.18.198/ is about 32 GB. I need to retain the logs for the last 3 months. Thats y I configure log rotation monthly. I have created an empty messages.log file in /var/log/remote.d/192.168.18.198. Now the messages.log file is not getting updated. Thats y asked whether I need to restart syslog service, to make messages.log file to capture logs. Sylog-ng server is in Ubuntu 9.04

Last edited by Iyyappan; 09-15-2012 at 07:09 PM.
 
Old 09-16-2012, 11:10 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
My above comments stand.
 
  


Reply



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
[SOLVED] No /var/log/messages , syslog , kern.log -but cat /var/spool/octopussy/octo_fifo masuch Linux - Newbie 4 06-13-2012 08:05 PM
How to change Debian log rotation of syslog and daemon.log onmountain Linux - Newbie 2 07-31-2008 02:27 AM
Log Rotation for snort log does not seem to be working CentOS4.5 JasonKretzer Linux - Security 3 06-25-2007 12:25 PM
/var/log/syslog messages. gbowden Slackware 2 02-25-2006 05:00 PM
syslog and firestarter - log messages to another file than messages mule Linux - Newbie 0 08-07-2003 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:50 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