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
12
votes
2 answers

Logrotate not rotating file after file size exceeds the limit.

From logrotate manpage. It will not modify a log more than once in one day unless the criterion for that log is based on the log's size According to the man page, logrotate should rotate file if the configuration is based on logs size.…
robert
  • 233
  • 1
  • 2
  • 6
9
votes
5 answers

How to gzip logs created by rotatelogs

I'm using rotatelogs to create my daily apache logs in format host....access.log. Now I want to gzip and move log to different directory after it's been finished. How to do that? Update: There was a little mistake. logrotate ->…
Poma
  • 1,289
  • 6
  • 22
  • 35
6
votes
1 answer

Logrotation when filenames includes date

My log files are in the format "2011-03-28.log.php". Log files are created every day. I want to keep 5 days log and rest I want to remove it, which means only 5 log files will be kept and rest everything will be deleted. Is it possible using Linux…
Supratik
  • 2,104
  • 10
  • 49
  • 66
5
votes
1 answer

MongoDB Oplog Security

We are using a MongoDB replica set for sharing sessions and other (potentially sensitive) data in a web farm. All the data we store uses TTL indexes to expire documents after a relatively short period of time (say an hour) partly for security…
4
votes
2 answers

logrotate not writing logs to correct file

I have a production system on which there are multiple nginx apps hosted. those are nginx applications servers. Now for each of these nginx app servers a logrotate config file is configured in /etc/logrotate.d/ folder. one of the example of…
Shailesh Sutar
  • 1,427
  • 4
  • 22
  • 40
4
votes
1 answer

logrotate cron job not rotating certain logs

I added two scripts in "logrotate.d" directory for my application logs to be rotated. This is the config for one of them: { compress copytruncate delaycompress dateext missingok notifempty daily rotate 30 } There is…
user2206396
  • 221
  • 1
  • 2
  • 6
3
votes
0 answers

Nginx log rotation according to size

I'm using below cfg for log rotation by size but it's not working. /var/log/nginx/access_log { rotate 7 size 5k dateext dateformat -%Y-%m-%d missingok compress sharedscripts postrotate test -r…
ANegi
  • 49
  • 2
  • 5
3
votes
2 answers

How do I allow apache to rotate logs in user home directory with SELinux enabled?

Our development machine has multiple users, and their various sites are stored in /home/username/apache. In these folders are sub-folders like conf containing the virtual host config, logs containing logs, public containing the actual web files,…
Leonard Challis
  • 23
  • 3
  • 12
  • 26
3
votes
2 answers

Programme that accepts stdin, then writes to a datetime stamped file?

I wonder is there a programme that'll do what I want. This is like an streaming log rotation programme. For the linux/unix command line. Let's say I have some input that is streaming some data. I want to write it a file, but a different file per day…
Amandasaurus
  • 30,211
  • 62
  • 184
  • 246
2
votes
1 answer

How to move compressed files with logrotate

This is probably insanely easy to do, but I can't find anything relevant to the topic. I'm setting up a custom logrotate.conf file for the logs in our service. As part of this, I would like to keep logs up to 7 days, compress antything older than…
SVill
  • 77
  • 3
  • 13
2
votes
1 answer

Apache outputting without .log

I am trying to fix an issue where an apache log is filling the /var/log/ partition. It is a single log in apache2 that is almost 4GB. I have set logrotate to rotate out at 3G, but it has not rotated the log. Additionally, the logrotate looks like…
Anath3ma
  • 25
  • 5
2
votes
0 answers

Logrotate not rotating without size config

On RedHat, I have a logrotate configuration as follows : /custom/path/kibana/logs/*.log { missingok daily create 0644 suuser suuser rotate 7 notifempty sharedscripts compress dateext dateformat -%Y%m%d%s su suuser suuser …
Pierre
  • 21
  • 1
2
votes
1 answer

Name rotated auditd logs with date

Can auditd use a date instead of an integer to name its rotated audit logs? Right now I have audit.log audit.log.1 audit.log.2 ... When audit.log fills up all of the files are rotated one number higher. I have a script that backs up the audit logs,…
spiffytech
  • 1,043
  • 2
  • 11
  • 16
2
votes
1 answer

Apache log4j cloudstack log rotation archival policy

I am trying to limit the number of logs that are kept on my cloudstack management server. I am running log4j 1.2 and have recently added "" to my config (/etc/cloudstack/management/log4j-cloud.xml) to only…
Tom
  • 51
  • 1
  • 5
2
votes
0 answers

Logrotation performance

One question about logrotation on a dedicated webserver (64gb RAM) with apache and mysql. In high load hours (2k users online every moment) we are experiencing a strange behaviour. As an example, at 16:30 we have 1850 users, low ram utilisation…
OmegaMy
  • 31
  • 2
1
2 3 4 5