460
questions
0
votes
0
answers
12
views
Logrotation in windows
I'm using windows os and using a c program which runs in background all the time. The logs are stored in a file but the file size is getting huge and it's hard to debug. Even some editor also takes ...
0
votes
0
answers
74
views
Log Rotation of Docker logs not working properly
enter image description hereI applied docker - Log rotation by creating a file in /etc/logrotate.d folder. Content of the file is like this:
/var/lib/docker/containers/*/*.log {
daily
...
0
votes
0
answers
53
views
catalina.out is very large and failed to rotate
catalina.out is very large and failed to rotate
I have set my /etc/logrotate.d/tomcat like this:
/opt/tomcat/logs/catalina*.* {
copytruncate
daily
rotate 90
compress
missingok
size 10M
}
But catalina....
0
votes
1
answer
76
views
Can I configure `logrotate` to just delete old files and do not rotate them?
Currently I am using a cron job to delete old files.
I like to know if logrotate can do the same.
I do not need to want to rotate files. I just need to delete log files older thane 7 days.
I tried the ...
0
votes
0
answers
22
views
logroate's postrotate not being executed
I have following logrotate configurations:
/var/log/elastic/*.log {
su root root
daily
missingok
rotate 60
compress
delaycompress
notifempty
create 640 elastic elastic
postrotate
...
0
votes
1
answer
44
views
Rollingover the logs for short-lived java application with logback
I have developed an Java Springboot application for one of my batch processing tasks. I will be using the jar of that application with a shell script. Shell script will be executed either manually or ...
0
votes
0
answers
32
views
apache2 rotatelogs creates log file but its empty when deployed to azure web app
im trying to rotatelogs by day, i've setup the following in apache conf. file:
LogFormat "%h %l %u %t \"%r\" %>s %O" common
CustomLog "|/usr/bin/rotatelogs -l /var/log/...
0
votes
0
answers
42
views
Null in the beginning of file after rotating podman containers logs
We are using logrotate to rotate our podman container logs.
Our configurations look like below.
/home/user/share/logs/*/*.log {
rotate 24
hourly
compress
dateext
dateformat .%Y-%m-%d_%H-%M-%S
...
0
votes
0
answers
33
views
Nodejs log4js on AWS ec2 stopped writing to log, but app is still running
We have a nodejs app with log4js and pm2 on an EC2 instance.
the logs are compressed each hour if they reach X size by the logrotate service.
Last week we had a problem, the app seems to be running - ...
0
votes
0
answers
72
views
Logrotate replace log file with a binary one
One of my project is logging in a simple file. This file may grow a lot so I used logrotate to handle log truncation and rotation with this simple configuration file inside /etc/logrotate.d:
/home/...
0
votes
0
answers
19
views
logrotate: Remove logs left from some buggy behaviour
In this case I talk about situation like this. We have a config for logrotate:
/logs/test.log {
rotate 2
size 1K
missingok
nocompress
copytruncate
extension .log
maxage 60
}...
0
votes
0
answers
183
views
How can I override the log rotation configuration file for Nginx on AWS Elastic Beanstalk?
I have an Elastic Beanstalk project where I am utilizing S3 log rotation for my environment. I would like to modify the "/etc/logrotate.elasticbeanstalk.hourly/logrotate.elasticbeanstalk.nginx....
0
votes
0
answers
47
views
Logrotate is not showing logs from 12AM to 6AM UTC
We are using logrotate tool for our AWS ec2 instances. Following is the script I am using in rsyslog file:
/opt/solr-6.5.0/server/logs/solr.log
{
daily
rotate 1
missingok
...
0
votes
0
answers
168
views
Dockerzied Artifactory logrotate cannot run, missing shared library
I am running artifactory-pro 7.68.14 as a Docker container. The image comes directly from docker.bintray.io/jfrog/artifactory-pro:7.68.14. I am mounting /var/opt/jfrog/artifactory to a network file ...
2
votes
0
answers
516
views
linux log rotate for PostgreSQL not rotate the log when log reached threshold
I am trying to the setup and control PostgreSQL logs by Linux log rotate as the following
logrotate_PostgreSQL.conf file looks like this
/var/log/PG/*.log {
size 10K
rotate 10
copytruncate
...
0
votes
1
answer
410
views
logrotate multiple files via prerotate script
I have "ansible jobs log DIR" /var/log/ansible where are stored all ansible logs.
e.g.
# ll
total 35688
-rw-r--r--. 1 root root 5874 May 16 07:28 ansible_20230516_072619.log
-rw-r--r--. ...
0
votes
0
answers
157
views
Log rotation creating more files than mentioned with rotate attribute
#cat /etc/logrotate.d/pcsd
/var/log/pcsd/*.log {
rotate 5
weekly
missingok
notifempty
compress
delaycompress
copytruncate
create 0600 root root
}
...
1
vote
0
answers
704
views
Running logrotate for apache2 hourly not working
I'm trying to get logrotate to rotate my apache2 logs every hour (on the hour - at XX:xx:00), I know there are a few posts about this already, but it is just not working for me regardless of what I ...
1
vote
0
answers
415
views
How to configure minikube container log max size and container log max files?
Minikube fills up the available disk space with logs.
To prevent I would like to rotate the logs with a maximum number of files of 1.
I tried the following:
minikube start --extra-config=kubelet....
1
vote
1
answer
294
views
Can I prevent Tomcat from overwriting catalina.out on restart?
The default Tomcat 8.5 configuration outputs the contents of stdout & stderr to $CATALINA_HOME/logs/catalina.out (and catalina.err if specified in the startup parameters) when running as a daemon. ...
0
votes
0
answers
257
views
Logrotate postrotate script fails to send SIGHUP to podman container
I have rsyslog running in an podman container. It is receiving logs and writing them to a mounted directory on the host. The rotation of this log files in done on the host, but for some reason ...
1
vote
1
answer
295
views
how to save log data using log-rotate after deploy react app by npm build & pm2 serve?
I made the react app by cra in typescript. I tried to deploy by pm2, so I set the shell script like this.
startup.sh
#!/bin/bash
npm install
# Install pm2 globally
npm install -g pm2
pm2 install pm2-...
-1
votes
1
answer
287
views
Logrotate add suffix to a rotated log file: Nested
on a Debian host is running a rsyslog server , which takes logs from the firewall.
Everything works fine except for my logrotate configuration which adds another suffix to a rotated log and that makes ...
0
votes
1
answer
202
views
Nlog Logrotation, keep 7 days of logfiles than archive it every sunday
Is there a way to create a log rotation with NLOG that records a log for each day for seven days and then archives them after the seven days?
this is my current target with this i :
<target xsi:...
0
votes
0
answers
700
views
Permission denied when using logrotate for logs outside /var/logs
After creating a custom log configuration for my app by adding myapp.conf into the /etc/rsyslog.d/ folder with the contents listed below:
if ( $programme contains "myapp" ) then {
action(...
0
votes
1
answer
974
views
logrotate ignores size parameter with modsecurity log
I have a config file for logrotate for my ModSecurity3 logs (on Ubuntu 22.04 + Nginx Web Server)
/etc/logrotate.d/modsec
-rw-r--r-- 1 root root 162 Nov 2 23:21 modsec
/var/log/modsec/modsec_audit....
0
votes
1
answer
631
views
invoke-rc.d fails in logrotate script, causing log rotation to fail
I am using Ububtu 20.04 with Apache 2.4.41 and logrotate 3.14.0, which is supposed to be set up such that Apache restarts in the postrotate script. The restart isn't happening, which means that Apache ...
1
vote
2
answers
509
views
What does the pm2 default logrotate files settings mean?
I am currently working on an app that creates a lot of large log files. And so in order to manage these I would like to just restart the app at midnight, compress the log file it left behind, and ...
1
vote
0
answers
343
views
logging.handler.TimedRotatingFileHandler does not work correctly on the server
I am implementing logging for some streaming functions in a faust app, which has been implemented by python.
I wanted to save all the logs of each specific streaming file in a separate folder, and ...
0
votes
1
answer
2k
views
Syslog File Size Limit
I have a yocto image using syslog and logrotate. My syslog allows two log files to be created. One for debug messages, one for all other messages. My debug log file will grow to 200kb then will be ...
1
vote
0
answers
462
views
What is the proper way to rotate log files which are mapped from a host machine
As we know, we can map files from host machine to docker container.
We also know that there are some OS tools, which can help us to rotate log files.
Now I use docker-compose to run a container with ...
0
votes
0
answers
158
views
Apache logrotate and very large access_log file
Any advice would be appreciated. I'm running Bitnami LAMP stack on AWS Lightsail. My apache access_log file is consistently getting very large (1 gb per day). I've set it to rotate hourly (although ...
-2
votes
1
answer
710
views
Modify existing logrotate file using an ansible playbook
I'm looking to create an ansible playbook to rotate syslogs and daemon.logs in our environment. I'm not looking to use ansible-galaxy roles.
Ideally, i would need to just modify the existing rsyslog ...
2
votes
2
answers
1k
views
NSSM daily rotation
How to enable on the "daily" rotation. I need to rotate the logs strictly at 00:00 every day.
There is no word about it in the documentation, or i dont understand something.
I have service ...
0
votes
0
answers
72
views
Log4j Version 2.17.2 disable logrotate when editing log4j.xml-files
i have following problem:
Everytime we edit our log4j.xml-configuration-files a logrotate happens.
So we store those logs in our archive and open a new one with starting time at that point, when the ...
0
votes
2
answers
360
views
linux logrotate, rotate file with underscore
I have a logrotate configuration which is given below.
/var/log/Test.log {
size 50k
missingok
rotate 10
notifempty
create 0640 root root
}
The file is rotating successfully once ...
0
votes
0
answers
271
views
Logrotate with rotate commented
I have logrotate config and I have commented the rotate but the files are rotated 10 times in the below manner
testlog.log
testlog.log.1
testlog.log.2
........
testlog.log.10
Configuration used for ...
0
votes
1
answer
1k
views
Logrotate of /var/log/messages files
How can I set log rotate to, /var/log/messages files,
all the files with the name "messages",
rotate every 4 days (to keep last 4 files),
not to generate any error messages??
/var/log/...
0
votes
1
answer
1k
views
Logrotate fails with error "unknown option 'I'" on Docker container
I have a Ruby on Rails application running on Docker and would like to rotate my production logs every day. In the spirit of keeping everything self-contained, I would like to keep the log rotation on ...
0
votes
0
answers
203
views
Can run daily logrotate without cron?
On my docker, i use amazonlinux:2 at this default enviroment not install cron.
I want to use logrotate for rotating log of application every daily. Can Logrotate work automatic without cron?
This file ...
1
vote
1
answer
2k
views
Gunicorn worker terminated due to signal 10
[2022-07-07 00:00:19 +0900] [885694] [INFO] Handling signal: usr1
[2022-07-07 00:00:19 +0900] [886183] [INFO] Handling signal: usr1
[2022-07-07 00:00:19 +0900] [886183] [WARNING] Worker with pid ...
-1
votes
1
answer
400
views
What privileges does a MySQL user need in order to access FLUSH LOGS?
I want o create a new MySQL user for logrotate and it needs to be able to run FLUSH LOGS, but doesn't need any other privileges as far as I can tell.
What is the minimum mysql privileges I need to ...
0
votes
2
answers
1k
views
How do I keep latest 8 backup file and delete the older one
How do I keep the latest 8 backup files and delete the older one
backup-Y-M-D.zip
backup-Y-M-D.zip
backup-Y-M-D.zip
backup-Y-M-D.zip
.
.
backup-Y-M-D.zip
There are about 80 files having .zip ...
3
votes
1
answer
3k
views
Installing gitlab on Ubuntu 22.04 docker :: "warning: logrotate: unable to open supervise/ok: file does not exist"
I am following this tutorial for setting up the gitlab on Ubuntu 22.04 -- https://computingforgeeks.com/how-to-install-gitlab-ce-on-ubuntu-linux/
While running the gitlab package using this command
# ...
1
vote
1
answer
1k
views
Logrotate Create Mode
I have a trouble with logrotate service in linux.
I have a logrotate config for mongodb log as below:
/var/log/mongodb/mongod.log
{
rotate 10
daily
dateext
dateformat %Y-%m-%d-%s
...
0
votes
1
answer
336
views
Rotating files with datetime already in the filename
I'm pretty new with the use of logrotate and I haven't find anything yet that helps with my current issue.
My company has a server (Debian) in which we often create cron tasks to handle files uploaded ...
0
votes
0
answers
648
views
Truncate older logs after the log file size reaches a particular size
I've my application running on one of the Docker containers in AWS Fargate(serverless compute engine) where I'm using a bind volume to tee application logs as follows:
/app.bin 2>&1 | tee /logs/...
5
votes
2
answers
15k
views
Enable log rotation in rsyslog
How to enable log rotation in rsyslog configuration. The method described in the official documentation of rsyslog using output channels is not working for me.
The script given in the official ...
0
votes
0
answers
240
views
Logrotate truncated .xz files
I am running mariadb on ubuntu 18.04, but I think that is immaterial to the issue. Belt and braces, I backup the database with sql-dump and with the mariadb backup tool.
Both run thru logrotate, I set ...
2
votes
0
answers
2k
views
Nginx custom access log does not rotate
I have configured a custom log in html section of nginx.conf:
log_format jsonlog escape=json '{ "time": "$time_iso8601", '
'"remote_addr": "$...