It more beginner question. I trying to set limit on mongo log file in AWS linux instance. I found some question that was asked here. And tryed to do that as was suggest from someone for mongo 3.0. Mongo logs sit '/var/log/mongo'. As I understand, because this line in '/etc/mongod.conf':
#where to log
logpath=/var/log/mongo/mongod.log
As described in Mongo docs, that i can use SIGUSR1 signal and get the old log renamed and current switched and delete. So I wrote that, in:
"/var/log/mongo/*.log {
daily
size 100M
rotate 5
compress
dateext
missingok
notifempty
sharedscripts
copytruncate
postrotate
/bin/kill -SIGUSR1 `cat /data/mongod.lock 2> /dev/null` 2> /dev/null || true
endscript
}
Restarted mongod service. And after couple days I found that mongo logs filled in two files more than 2 gb.So it doesn't work for me. So I don't know what I did wrong? Who can help me?
Thanks!