Project

General

Profile

Actions

tickets #52823

closed

nginx logs on pontifex - being rotated by /usr/sbin/nginx-compress-logs as well as by logrotate?

Added by pjessen almost 5 years ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
2019-06-10
Due date:
2023-05-17
% Done:

50%

Estimated time:

Description

logrotate runs every day at midnight, on logrotate.timer.

# cat /etc/logrotate.d/nginx
/var/log/nginx/*.log /var/log/nginx/*/*.log /var/log/nginx/*/*/*/*.log  {
compress
dateext
maxage 365
rotate 99
size=+4096k
missingok
notifempty
create 644 root root
sharedscripts
postrotate
# -s reopen will use the pid file passed in the config file or the compiled in default path
/usr/sbin/nginx -s reopen
endscript
}

In addition, every day at 00:30, we also run /usr/sbin/nginx-compress-logs, a small script that does pretty much the same.
Also, as we are using cronologs with nginx, there is no need for logrotate to append year&date. (dateext).


Related issues 1 (0 open1 closed)

Related to openSUSE admin - tickets #108197: pontifex - /usr/sbin/nginx-compress-logs vs /etc/logrotate.d/nginxRejectedpjessen2022-03-11

Actions
Actions

Also available in: Atom PDF