MongoDB OPS Manager: oplog growth problem in a replica set

Hi, hope you all are doing great.
During the weekend there was an excessive growth of the oplog and where 2 nodes fell, leaving only 1 secondary alive. After some attempts to leave the secondary as primary and operate from there we were able to maneuver to clean up the oplog by running the compact command and doing a “rm” command to the dbpath to one node that had all the storage occupied. Now what we are monitoring is that this scenario does not happen again. Is there any additional configuration that has to be done so that the oplog does not grow too large in OPS Manager? Thank you in advance.