Write Cron Job as below
0 * * * * awk '/"s":"W"/ || /"s":"E"/ || /"s":"F"/' /var/log/mongodb/mongod.log >> /var/log/mongodb/error.log && > /var/log/mongodb/mongod.log
Change example by your path
Write Cron Job as below
0 * * * * awk '/"s":"W"/ || /"s":"E"/ || /"s":"F"/' /var/log/mongodb/mongod.log >> /var/log/mongodb/error.log && > /var/log/mongodb/mongod.log
Change example by your path