Questions tagged [log-rotation]

143 questions
1
vote
2 answers

Log management of various docker containers

There are many docker containers which are running on a given server. I have configured each application instance running inside the container to send the logs to the standard output. Now, I am interested in the following: Manage the logs coming…
sunsin1985
  • 2,437
  • 5
  • 22
  • 27
1
vote
2 answers

rsyslog dynamic filename log rotation

All hosts are sending all logs to RSyslog server (ver 5.8.10). RSyslog uses the following template to save log files - $template RemoteHost,"/var/log/x/host/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%/%APP-NAME%.log" So windows event log from host11 will…
Quest Monger
  • 8,252
  • 11
  • 37
  • 43
1
vote
2 answers

What's the easiest way to rotate nginx log files monthly?

In OpenBSD, there's no logrotate in ports, and newsyslog seems to have limited features as far as monthly rotation of a huge number of log files is concerned. I have a lot of domains, a huge number of nginx log-files names like…
cnst
  • 25,870
  • 6
  • 90
  • 122
1
vote
1 answer

SQL Server - append text field with rotation

Let's say I have nvarchar(300) column. I append the text as follows: update tablename set fieldname = fieldname + 'appended string' How can I tell SQL Server to automatically trim the text from beginning to ensure it never exceeds the maximum…
SharpAffair
  • 5,558
  • 13
  • 78
  • 158
1
vote
0 answers

Does logrotate copy the current file or rename the current file

I read about a few articles on line, but I still do not get how logrotate works. My config file is as follows: /var/log/usage.log { rotate 10 daily size 1G missingok notifempty sharedscripts postrotate …
jerry
  • 355
  • 1
  • 6
  • 13
1
vote
1 answer

logrotate: Why are server configs reloaded after a rotate

I see nginx and apache both have some form of reloading signal sent after their logs have been rotated. Why is this? I'm wondering because I'm setting it up for my own app and want to know if an app will hang for some reason if logs get rotated…
user1561108
  • 2,666
  • 9
  • 44
  • 69
0
votes
0 answers

Problem with log rotation of roundcube log files

I'm struggling with the log rotation of roundcube log files on my debian 11 server. The amount of files is getting higher and higher, so I have to delete them periodically. Here you can see, how the files look like. All those suspicious files have…
calli23
  • 79
  • 9
0
votes
0 answers

Log rotation fails to rotate while the file it exists

all good? I'm trying to make my squid proxy server like one we have but, of all the problems I had, this one is that is making me a little sad. I have a squid proxy 5.7 on a debian 12, when the log tries to rotate it gives the following…
Renobr
  • 3
  • 2
0
votes
0 answers

Python WatchedFileHandler keeps old log file descriptor after rotating the log in a Flask app run by UWSGI

I'm using the following Flask (2.0.1) app import logging from flask import Flask, Blueprint, current_app from logging.handlers import WatchedFileHandler _LOG_PATH = "./test.log" blueprint = Blueprint("dosomething",…
eugenesqr
  • 589
  • 6
  • 19
0
votes
0 answers

Django log rotate on google cloud engine throwing error - Read only file system

Planning to add django log rotate on my application, running on google compute engine.Adding log rotate is failing by throwing error **OSError: [Errno 30] Read-only file system: '/workspace/neo_app_backend/log' ** at the time of deployment.This is…
0
votes
0 answers

How can I keep tomcat logs to stay at last 30 days worth with logrotate? (RHEL)

First time using logrotate, I'm trying to keep Tomcat logs to only have last 30 days worth in the directory regardless of size, job to be run every month. Am I able to accomplish this with the script…
SH4
  • 1
0
votes
1 answer

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 :
PsyOrc
  • 47
  • 8
0
votes
0 answers

Time based on size based log rotation for rails 5 app

Can we implement log rotation for custom logger with both time based and size based log rotation?
Uday Magdum
  • 77
  • 1
  • 6
0
votes
0 answers

Which is better way to rotate logs of Django Application, logging Module of Python or Logrotate of linux?

I want to rotate my logs of Django application, I am able to rotate the logs (based on size) successfully with logging module of python but its causing issue because same log file is getting accessed by celery process and other processes and because…
Yooooooo_G
  • 49
  • 3
0
votes
1 answer

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.log { size 1M rotate 7 missingok …
peppy
  • 173
  • 2
  • 17