Questions tagged [logrotate]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
83 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
173 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
30 views

chattr command in logrotate prerotate script; selinux blocking with “operation not permitted”

I have a logrotate script that runs a chattr command as part of the prerotate. In /var/spool/mail/root I am getting chattr: Operation not permitted while setting flags on /var/log/messages I know ...
0
votes
0answers
386 views

logrotate not rotating my logs for a specific folder (tomcat)

Instance- CentOS 7 Logrotate version: logrotate 3.8.6 I am rotating my logs using logrotate and it shows the output as: "log does not need rotating (log has been rotated at 2019-7-19 3:43, that is ...
0
votes
0answers
27 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
194 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
28 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
711 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
128 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
85 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
860 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
45 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
147 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
631 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
5k 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
558 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
2k 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
3k 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 ...
12
votes
1answer
14k 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
771 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/...
4
votes
2answers
382 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
849 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
933 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 ...
1
vote
2answers
2k 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
810 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
487 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
1k 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
3k 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
4k 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 /...
11
votes
2answers
14k 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
176 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
4k 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
84 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
437 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
2k 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
2k 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....
1
vote
1answer
2k views

Logrotate append to existing file and truncate original

Is it possible with logrotate to take the content of a log and add it to an existing file? Like so: 1. Put the content of /var/log/vnc.log after the content of /archive/logs/vnc.log 2. Truncate /...
3
votes
2answers
2k views

Merge and view rotated and compressed logfiles

I have a bunch of partly compressed rotated logfiles from a Glassfish application server (using a custom Java logging format): /tmp/server.log /tmp/server.log.13.gz /tmp/server.log.18.gz /...
3
votes
0answers
8k views

Logrotate appending file name with a “.1”

For some reason our tomcatlogs are being appended with a .1 when logrotate runs. e.g: file "tcl-2013-08-16.0.log" becomes "tcl-2013-08-16.0.1.log". I am struggling to find what setting is adding the "....
1
vote
2answers
2k views

Are the .log.gz old log files?

I have a couple of .log.#.gz files. (the # is a number) For example i have a ufw.log, a ufw.log.1.gz...all the way to ufw.log.4.gz. Are these .log.#.gz files old log files that got compressed? What ...
1
vote
0answers
107 views

Weird Disk space usage Ubuntu 10.04

I have an ubuntu 10.04 server. For the past couple weeks, or as long as I can remember my disk space was going down by about 1 kb per minute (I assume from the massive logs). However all of a sudden ...