Questions tagged [logrotate]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
38 views

Copying a file while its being written to (in Linux)

I am in a year-long Twitter research project, and I collect tweets via Twitters API and Twarc. In short, this writes a new tweet as a new line to one specified file, roughly one per second at night, ...
0
votes
0answers
290 views

How could I use logrotate and group by day a bunch of gzip files with an uncompresssed extension?

Doing a test in a production enviroment with rotation logs with 2 days just for testing purposes with gizp files. Created a test file at /tmp/. /etc/init.d/test /tmp/test/*.gz { daily ...
1
vote
1answer
70 views

Logrotate running at wrong hour/time

I have the following entry in my /etc/crontab file to ensure that daily cronjobs run at 4:25 AM. This is the only entry for daily inside this file: 25 4 * * * root test -x /usr/sbin/anacron || ...
0
votes
1answer
95 views

Logrotate status file update from different crone jobs

I have several scripts in /etc/logrotate.d/ all are included in /etc/logrotate.conf and crone job that runs: /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf daily. But I ...
1
vote
1answer
641 views

Why logrotate maxsize condition is not working?

I've specific problem with logrotate which is rotating before reaches the limit - set by maxsize logrotate version - 3.8.6 I've a custom logrotate file /var/web/log/access_log { rotate 40 ...
0
votes
0answers
42 views

syslog-ng configuration using variables to create directories for different sources that feeds their logs into syslog-ng

I've got the following syslog-ng configuration and after having tested it with loggen command (to generate traffic) it works and write logs to the destinations files. @version: 3.23 @include "...
1
vote
0answers
122 views

rsyslog stopped forwarding httpd logs after logrotate

I have an issue where rsyslog stops forwarding httpd logs to our central log repo after logrotate. Server is RHEL7. My investigations thus far have led me here: (in /var/lib/rsyslog) #: grep httpd *...
0
votes
1answer
169 views

/var/log/firewalld is not getting rotated

I am not sure why this particular file is not getting rotated. It is not a directory. Any ideas? The size of the firewalld file: $ ls -alh /var/log -rw-r--r--. 1 root root 134M Jan 31 13:49 ...
1
vote
0answers
190 views

How to troubleshoot logrotate / journal on Debian 9

My question today is about the art of troubleshooting with the topic of logrotate and journalctl. I'm interested in learning how to debug and troubleshoot my logrotate and journal configuration. The ...
0
votes
0answers
34 views

looking for continuous Screen Capture for retroactivly reproducing errors, timeback machine

Usually Screen Video Capturing software are tailored for kind of video producers, who have a plan, have prepared keynotes, etc. However, I want a "time machine" program for a specific use case: Hey,...
1
vote
0answers
266 views

Reading log files using logstash which rotates every day

I am reading a log file using file input plugin in logstash and sending this logs to elastic search. Log file is rotated at every 00:00. When I rotate log file, the file is zipped and moved to a ...
0
votes
1answer
44 views

How do I keep 110 files before allowing linux to rotate the logs?

I'm trying to find out whether it is possible to configure linux to keep 110 copies of the audit log files. The setting is under /etc/audit/auditd.conf num_logs = 99 From reading, I understand that ...
0
votes
1answer
1k views

Systemd logrotate to specific folder

I have my systemd service file, which runs guncorn app, and that generates logs to a specific folder, But i want to create a logrotate for service file that generate my logs on daily basis and create ...
0
votes
0answers
222 views

How to get new generated file name on logrotate?

I want to get new file name generated by Logrotate and run a script on it. Logrotate has an event called Postrotate() with a parameter called '$1' but it returns the original path file name for ...
0
votes
1answer
170 views

logrotate for already rotated logs

We already have logs for an application that are separated for every day. they look like this: -rw-rw-r-- 1 ubuntu ubuntu 23616 Jul 1 2018 01072018.log -rw-rw-r-- 1 ubuntu ubuntu 340980 Aug 1 ...
2
votes
1answer
2k views

Logrotate - can I configure multiple services in one configuration file?

I am planning some infrastructural architecture. It seems as if logrotate configuration files in /etc/logrotate.d usually handle exactly one type of log rotation. My question: Would it be possible ...
0
votes
2answers
48 views

Watch (rotating) log in screen

I'm running a mailserver which I connect to using SSH. My .bash_profile is configured to attatch a SSH session to a certain screen session. Now I'd like to have a log (e.g. the syslog) printed to one ...
0
votes
1answer
192 views

Configure Logrotate to only rotate partially

I'm using Logrotate to rotate Apache logs. But instead of starting with an empty log file after each rotation, I'd like to keep some lines from the old log. Is there a solution which prevents the ...
-2
votes
1answer
731 views

Logrotating postgres logs

My PostgreSQL log is writing as a single file. Its becoming bigger and bigger day by say as postgresql.log. I can see logging_collector is set as ON and log_rotation_age is also set to 1 day. Still ...
2
votes
1answer
6k views

logrotate failing to rotate, permission denied as root user

I'm having a problem that I cannot wrap my head around. I've setup logrotate on a centos 7 server to rotate my app logs. This file is in /etc/cron.daily (i even added a whoami to verify it's running ...
1
vote
2answers
830 views

My Linux logrotate and my huges log files

I can see a few huge log files in my server: stephane@data:~$ ls -lS /var/log total 55G -rw-r----- 1 root 15G août 9 23:32 syslog.1 -rw-r----- 1 root 15G août 9 23:32 ...
1
vote
2answers
3k views

logrotate does not rotate at the time specified in crontab

I am wondering why logrotate does not rotate my logfiles at the time which it is called through crontab. My entry in crontab is: 50 2 * * * /usr/sbin/logrotate Therefore all my logs should be ...
0
votes
2answers
5k views

What is rotating my haproxy logs?

I have a haproxy logrotate configuration file in /etc/logrotate.d/haproxy that looks like this: "var/log/haproxy.log" "/var/log/haproxy-status.log" { daily size 250M rotate 1 create 644 root ...
17
votes
1answer
20k views

How to logrotate with systemd?

I'm running a node app using systemd with a unit file. The apps log can be viewed using journalctl -u example.com but the log gets cut at some point, erasing the history (which I need for debugging). ...
0
votes
1answer
1k views

logrotate files older than x hours

What's wrong with this rotate.conf? Goal is to delete only files older than four hours path/to/tokens/*.tkn { nosharedscripts prerotate if test `stat --format=%Y $1` -le $(( `date +%s`...
0
votes
0answers
879 views

Nginx write logs to the old file after running logrotate

The logrotate config is: cat /etc/logrotate.d/nginx: /data/logs/nginx/*.log { daily dateext dateformat .%Y-%m-%d rotate 30 missingok create notifempty sharedscripts postrotate [ ! -f /usr/...
3
votes
2answers
438 views

Why the logrotate's bin path is `/usr/sbin`

Why is the logrotate's bin path /usr/sbin on Debian (at least "wheezy”) knowing that we can actually use it without the root privilege?
0
votes
2answers
1k views

Logrotate wildcard fails on missing files with “missingok” AND “olddir”

Platform: RHEL 7 logrotate-3.8.6-7.el7_2.x86_64 Background: On a RedHat Linux server I have a large set of application servers running, and want a uniform logrotate routine for cleaning up log ...
0
votes
1answer
1k views

How can logrotate execution result in “service: not found”?

I am trying to understand the output of my logrotate script execution: error: error running shared postrotate script for '/var/log/nginx/*.log ' logrotate_script: 2: logrotate_script: service: not ...
2
votes
2answers
3k views

Logrotate won't rotate log while saying it does

I have a logrotate config that worked normally, until all of a sudden it stopped doing so. I guess that it stopped rotating my log after I deleted and recreated the log folder while updating my ...
0
votes
0answers
937 views

Logrotating all logs in a directory causes date duplication

I have a logrotate config that looks like this: /var/log/update-job/*.log { daily rotate 7 compress delaycompress size 0k missingok copytruncate notifempty dateext ...
0
votes
1answer
1k views

Logrotate not rotating my logs

Running on Ubuntu 14.04, I have the following logrotate config under /etc/logrotate.d/logstash /opt/app/logs/logstash*.log { size 1g create 700 app app rotate 5 } This log ...
3
votes
1answer
3k views

logrotate: How to configure and override defaults?

I'm testing a logrotate configuration in /tmp. I'd like to configure a default logrotate policy for /tmp/*.log files using my test configuration file /tmp/logrotate.conf to handle a particular log ...
1
vote
2answers
3k views

logrotate in SUSE Enterprise Server

I can't manage to work this dummy config file (I placed it in etc/logrotate.d): /var/log/test_log/mylogfile { copytruncate dateext rotate 3 compress missingok size=+2 } I write to the log (echo "...
0
votes
1answer
625 views

How do I stop recurring error messages from appearing in messages and auditd.log?

On my CentOS linux machine, in my auditd.conf file, I have set my max_log_file_action=keep_logs. However, in my /var/log/messages and /var/log/auditd.log, the following message appears multiple times ...
0
votes
1answer
1k views

How to run logrotate as a local user?

I'm trying to manage logs which are generated by local scripts. These logs are nothing but stdout and stderr redirected to local files. I don't have root access and trying to run logrotate as a ...
1
vote
1answer
3k views

Logrotate error: No file found

One of our servers has a recurring error message for Logrotate. /etc/cron.daily/logrotate: ERROR No file found for /usr/local/Zend/apache2/logs/error_log Log rotation is working normally for the ...
0
votes
1answer
1k views

Logrotate not rotating on file size

According to the man page "Normally, logrotate is run as a daily cron job. It will not modify a log multiple times in one day unless the criterium for that log is based on the log’s size". So, ...
0
votes
2answers
2k views

Remove leading null blocks from a sparse file

I'm using logrotate with the copytruncate option. This works well, creating a sparse file that starts with an increasing number of "virtual" null blocks that take up no space on disk. The problem is ...
1
vote
2answers
4k views

Disable Logging on Raspian/Debian

I want to stop my Raspberry Pi to create System-wide Logs in Order to save Memory Space. Is there a Way to disable Logrotate? I Hope You can help me
15
votes
2answers
5k views

Logrotate no longer reads symlinked configuration file due to non-root ownership

We are currently upgrading from Ubuntu 12.04 LTS to 14.04 LTS on our ruby on rails application servers, and have noticed that the log files are no longer rotating. On both machines we have a file /...
12
votes
2answers
17k views

logrotate unable to rotate logs, getting “No such file error”

logrotate is unable to rotate my logs. I have checked the file permissions, they are fine. I have even tried by putting "su root root" in the configuration file, still I am facing the same issue. ...
0
votes
1answer
195 views

LogRotate Custom Script Logs Breaks Script?

I have a daemon script I made that always runs in the background. It's setup to pipe stdout and stderr to some log files as such: python27 etl_daemon.py 1>>/var/log/etl/etl_stdout.log 2>>/...
4
votes
2answers
5k views

How to rotate enumerated filenames similar to logrotate?

I have a couple of files, let's say map-0.jpg (newest), map-1.jpg, map-2.jpg, ..., map-9.jpg (oldest). Now my cronjob downloads a new picture from the internet and should save it as map-0.jpg. All ...
0
votes
1answer
85 views

Use logrotate with manual file management

I'm trying to use logrotate with some unfriendly software. I don't want to court data loss with the copytruncate option. Instead, the software has an internal (gimped) rotate capability. ...
2
votes
0answers
1k views

Is there a tool like `cronolog` or `rotatelogs`, but also with compression and removal like in `logrotate`?

I want simple piped logging without config files or system-wide rules for periodic command execution. Are there any projects that allows to do that? Expecting something like this: ./...
0
votes
1answer
441 views

Capture logrotated files on change

This is something rather special, but I bet you can help me out. I'm working in an environment where many logfiles are generated and rotated, mainly from java-services runnning. As we are performing ...
5
votes
2answers
3k views

Will cron.daily wait for jobs to finish before starting the next one?

This page http://wiki.ci.uchicago.edu/I2U2/WebalizerConfiguration suggests renaming /etc/cron.daily/logrotate so it comes after /etc/cron.daily/webalizer - webalizer should be done before logrotate ...
1
vote
1answer
3k views

Logrotate says “log needs rotating” and then does nothing

I have the following logrotate configuration, and a 2 GB /var/log/messages: /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron /var/log/network { ...
1
vote
2answers
13k views

Logrotate not doing any rotation

I just set up LogRotate on my RHEL6 server so that it rotates my custom Apache log files. However, it doesn't do anything when i try manually running it. I expect it to rotate the log files "access....