Project

General

Profile

Actions

tickets #174745

open

TSP: no logrotation

Added by cboltz 3 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
TSP
Target version:
-
Start date:
2024-12-24
Due date:
% Done:

0%

Estimated time:

Description

/srv/www/travel-support-program/log/production.log doesn't get rotated automatically.

I just moved and compressed it manually at 1.4 GB, but a logrotate config would be better ;-)

Actions #1

Updated by cboltz 3 months ago

  • Private changed from Yes to No
Actions #2

Updated by kskarthik 3 months ago

cboltz wrote:

/srv/www/travel-support-program/log/production.log doesn't get rotated automatically.

I just moved and compressed it manually at 1.4 GB, but a logrotate config would be better ;-)

Where do i start ?

Actions #3

Updated by cboltz 3 months ago

We need a file /etc/logrotate.d/tsp that rotates the log and restarts the services (actually reload should hopefully be enough), and a file.managed that installs that logrotate.d/tsp file.

Currently we don't have any logrotate config in our salt repo, so you'll have to look at your local /etc/logrotate.d/ and /usr/etc/logrotate.d/ files for some examples ;-)

Actions #4

Updated by crameleon 3 months ago

TSP should log to the systemd journal and not to a file (salt.git @ 4a4bf6d18d802b397fb6e191d9d07896ce789c2b), it should be investigated why production.log is still being written.

Actions #5

Updated by crameleon 3 months ago

  • Tracker changed from communication to tickets
Actions #6

Updated by cboltz 3 months ago

Most log lines are messages like:

D, [TIMESTAMP] DEBUG -- :   Delayed::Backend::ActiveRecord::Job Load (1.5ms)

There are a few exceptions / other log entries, see

grep -v 'DEBUG -- :   .*Delayed::Backend::ActiveRecord::Job Load' /srv/www/travel-support-program/log/production.log
Actions #7

Updated by kskarthik about 2 months ago

  • Assignee set to kskarthik
Actions

Also available in: Atom PDF