Questions tagged [log-rotation]

Log rotation is an automated process used in system administration in which dated log files are archived.

Log rotation is an automated process used in system administration in which dated log files are archived.

66 questions
2
votes
0 answers

Rotation and continuous writing of large log files with rsyslogd

I have an extremely busy log file (let's call it /var/log/service.log) that is also frequently searched for troubleshooting reasons. Output to it is nearly continuous and 24/7. It probably puts out around 1-2 GB/day, but we need all of it. Because…
Alex Balashov
  • 907
  • 2
  • 9
  • 16
2
votes
1 answer

Syslog logging to syslog.1 not syslog

My syslog file is getting a bit unmanageable. I believed I had configured this previously to rotate daily but obviously something has gone amiss. At the moment, my /var/log looks like this: -rw-r----- 1 syslog adm 0 Feb 25 06:25…
Zakalwe
  • 143
  • 2
  • 7
2
votes
1 answer

NGINX and log rotation: is missing log entries possible?

In it's simplest realization, one can implement NGINX log rotation as following: mv access.log access.log.0 kill -USR1 `cat master.nginx.pid` My question. Do we have a concurrency issue here? I mean, if NGINX writes a log entry between two actions…
user1065145
  • 295
  • 4
  • 9
2
votes
2 answers

Changing LogRotate's default way of rotating the log files

My observation of logrotation is that to rotate any log file, the logrotate process, in the following order copies the log file in question (lets call it file1.log) with a new name (adding time stamp or a number to the existing name so that it…
Gautam Somani
  • 296
  • 3
  • 14
2
votes
2 answers

Logrotation is not working for nginx

I am trying to rotate nginx log using Logrotate.It's appending log to same file (error.log and access.log) but not rotating on daily basis. Below are the configuration file for the same. Please let me know if i am missing…
UnixAdmin
  • 31
  • 1
  • 2
2
votes
1 answer

Varnish logrotate issue

I have this in logrotate.d/varnish file: /var/log/varnish/*log { create 640 http log compress postrotate /bin/kill -USR1 `cat /var/run/varnishncsa.pid 2>/dev/null` 2> /dev/null…
nixnotwin
  • 1,513
  • 5
  • 34
  • 54
2
votes
0 answers

Time-based rotation of Docker logs

We are running a stack of Docker Swarm services and, according to our Privacy Policy, we have to keep logs only for the last 6 months, but no older. I was trying to achieve it through different logging drivers, but all of them (AFAIK) work only with…
1
vote
1 answer

The logrotate 'rotate' directive and migrating from daily to weekly

I have a server collecting syslog messages from the network. Logrotate is currently setup and working, and the config looks like such: /logs/*/log { daily rotate 60 } Instead of rotating daily, I'd like weekly. Obviously, I'm keeping 60…
user3629081
  • 253
  • 1
  • 5
1
vote
1 answer

What does the --force flag change about the behaviour of logrotate?

I am trying to find out why logrotate is only rotating a subset of logfiles in a folder when run without the --force flag. The man page for logrotate --force simply says: Tells logrotate to force the rotation, even if it doesn't think this is…
TDN169
  • 135
  • 5
1
vote
1 answer

How to rotate mySQL query logs on Windows

I'm seeing conflicting (or complementary) answers on how to rotate mySQL logs and want to know if each method is sufficient in itself, or if I need to use a combination of both. One method, suggested here, prescribes these steps: SET logging…
jschmitter
  • 121
  • 5
1
vote
0 answers

Glassfish - log System.err to second location or do something after logrotate

we have a GF4 server that produces a lot of logs. Currently it is setup like this: com.sun.enterprise.server.logging.GFFileHandler.excludeFields <> com.sun.enterprise.server.logging.GFFileHandler.file …
1
vote
2 answers

logrotate status files extremely large

Apache2 on an Ubuntu 16.04 box was showing issues on the websites it's hosting. It was at 100% capacity. Looking further with du, The majority of the ~100gb hard drive was filled by two files in /var/lib/logrotate/. logrotate has files in there…
Angelo
  • 111
  • 1
  • 4
1
vote
0 answers

Logrotate not working with "daily"

Below is my logrotate configuration.I was not able to get the logrotate work using "sudo /usr/sbin/logrotate /etc/logrotate.conf".But if I execute "sudo logrotate -f /etc/logrotate.conf" it is creating the log file as…
1
vote
1 answer

logrotation process stdout and stderr windows

I have a service on windows that's running another process that prints many lines to its STDERR and STDOUT. I'm capturing those lines and redirect them to some log file. I would like to logrotate on this log file, if its size is getting too big to…
ItamarBe
  • 11
  • 2
1
vote
2 answers

/etc/init.d/apache2 file is being log rotated

I have monitored some strange behavior. Every week at logrotate process time, the apache2 daemon script /etc/init.d/apache2 is being rotated as if it was a log file. The first week it created another file apache2.1 and emptied apache2. The following…
MohammedSimba
  • 359
  • 1
  • 4
  • 15