We help IT Professionals succeed at work.

How do you configure logrotate with syslog-ng?

Abarros22
Abarros22 asked
on
Medium Priority
603 Views
Last Modified: 2012-05-06
Hello,

I just recently installed and configured syslog-ng to create and log individual log files for my routers. Although the logging is working fine, I noticed that the log files are growing larger by the day. How do you configure logrotate so that the files are replaced on a weekly basis with empty log files? The log files are located in the directory /var/www/html/syslog. I'm using Fedora Core.

Comment
Watch Question

Top Expert 2009

Commented:
have you logrotate installed ?
check this one
http://dailypackage.fedorabook.com/index.php?/archives/40-Wednesday-Why-Log-rotation.html
if go to
cd /etc/logrotate.d

you will see a file call syslog

check what path it got in their

you  should be able to change from their
CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013
Commented:
Hi,

here is a nice howto:

http://wiki.egee-see.org/index.php/SyslogNG#Log_File_Rotation

and here is logrotate's manpage:

http://linux.die.net/man/8/logrotate

HTH

wmp


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Hello,

Thanks for the information. I was able to configure log rotation. However, before I close out the question, I would like to know if syslog-ng affects the functionality of the original syslogd. In other words, is syslogd still going to function as if syslog-ng had never been installed? Are all the local or original processes going to be logged normally?
Top Expert 2009
Commented:
yes, syslogd will work as normal, syslg-ng will just hold log from other linux pc
its just to centralized log thats all for better security and review log files
CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013

Commented:
syslog-ng is a replacement for syslogd. As long as syslog-ng is up and running, syslogd will not work, which has to do with access to /dev/... files and listening ports.
Once syslog-ng is stopped (and perhaps uninstalled) you can continue using syslogd as you did before.

wmp
CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013

Commented:
fosiul01, have you ever tried that?
Top Expert 2009

Commented:
ommm sorry if i say anything wrong
but sylog-ng is running on my server

suppose secure log form other pc is storing in /var/log/secure in sylog-ng server

along with normal log

if syslog damon does not work then how its happenning ??

CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013

Commented:
syslog-ng does normal local processing, too
Top Expert 2009

Commented:
ommmmm
then i will have to check tomorrow,

either i am mixing syslog-ng with syslog server

or
 i am running syslog-ng but i stoped syslog server ...

Again, @author, I am sorry if i give any wrong informaiton about syslog damon and sylog-ng damon...
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.