nginx.access.log Log rotation

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
shrf
Posts: 3
Joined: Sun Jun 02, 2019 6:42 am
ZCS/ZD Version: Release 8.8.11.GA.3737.UBUNTU16.64

nginx.access.log Log rotation

Postby shrf » Sun Jul 28, 2019 12:23 pm

Dears
I have a problem with nginx.access.log Log rotation on Zimrba Version 8.8.11_GA_3780.FOSS

Both nginx.log and nginx.access.log rotates for 10 days only. Older logs are deleted.

I tried to adjust
zmlogrotate in /opt/zimbra/conf and zimbra in /etc/logrotate.d as follows and it is not working :

/opt/zimbra/log/nginx.log /opt/zimbra/log/nginx.access.log {
daily
dateext
sharedscripts
missingok
notifempty
create 0644 zimbra zimbra
postrotate
kill -USR1 `cat /opt/zimbra/log/nginx.pid 2> /dev/null` 2> /dev/null || true
endscript
rotate 60
# compress
su zimbra zimbra


Any advise please ?


User avatar
DualBoot
Elite member
Elite member
Posts: 1073
Joined: Mon Apr 18, 2016 8:18 pm
Location: Earth
ZCS/ZD Version: ZCS FLOSS - 8.7.11 Mutli servers

Re: nginx.access.log Log rotation

Postby DualBoot » Mon Jul 29, 2019 7:34 am

Hello,

check the crontab Zimbra, it delete log than more 8 days.

Regards,
shrf
Posts: 3
Joined: Sun Jun 02, 2019 6:42 am
ZCS/ZD Version: Release 8.8.11.GA.3737.UBUNTU16.64

Re: nginx.access.log Log rotation

Postby shrf » Mon Jul 29, 2019 10:20 am

Thanks a lot ! :D

Is it OK to comment the line that remove the logs ? or better do a script to copy the logs that i need somewhere else ?
phoenix
Ambassador
Ambassador
Posts: 26243
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: nginx.access.log Log rotation

Postby phoenix » Mon Jul 29, 2019 11:14 am

shrf wrote:Thanks a lot ! :D

Is it OK to comment the line that remove the logs ? or better do a script to copy the logs that i need somewhere else ?
If you really need historical logs you're far better off forwarding them to a syslog server such as Splunk or Elastic Search etc., etc.
Regards

Bill

Rspamd: A high performance spamassassin replacement

If you'd like to see this implemented in a future version of ZCS then please vote on Bugzilla entries 97706 & 108168

Return to “Administrators”

Who is online

Users browsing this forum: zimico and 16 guests