How to configure nginx log rotation for 'daily' basis on edge private cloud ?

Not applicable

Hi,

I need to do the nginx log rotation on daily basis .

My apigee-nginx-logrotate.conf(/opt/apigee/edge-router/conf/apigee-nginx-logrotate.conf) file is as follow

/opt/apigee/var/log/edge-router/nginx/*log{
        daily
        missingok
        rotate 1
        compress
        delaycompress
        notifempty
        nocreate
        sharedscripts
        postrotate
           [ -f /opt/nginx/logs/nginx.pid ] && kill -USR1 `cat /opt/nginx/logs/nginx.pid`
endscript
}
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`

with the above config I am not able do the log rotation on daily basis .

. I found the following in `/opt/apigee/edge-router/token/default.properties`, but it does not tell me what token to use for `daily`

## Begin apigee-nginx-logrotate.conf ##
conf_apigee-nginx-logrotate_logs=/var/log/apigee/nginx/*log
conf_apigee-nginx-logrotate_rotate=1
conf_apigee-nginx-logrotate_pidfile=/opt/apigee/nginx/logs/nginx.pid
conf_apigee-nginx-logrotate_compress=compress
conf_apigee-nginx-logrotate_compress_type=delaycompress
conf_apigee-nginx-s3-uploader=${APIGEE_ROOT}/edge-gateway/bin/push_to_datastore.sh
conf_apigee-nginx-issue-sigusr1=${APIGEE_ROOT}/edge-gateway/bin/issue_sigusr1.sh
conf_apigee-nginx_s3-bucket=glacierbucket-us-west-e2e/loadbalancer/accesslogs/gateway
## End apigee-nginx-logrotate.conf ##

Please help me to get the same.

Thanks,

Ambili

0 0 2,164
0 REPLIES 0