title: How to monitor mongo db replica status and reconfiguring repluica
body: <p>We are using mongodb cluster with set of 3 members , and all consumers are able to read/write data.</p>
  
  <p>Use mongo.conf file to create cluster &amp;&amp; configure replica set, which are executed in ansible script as part of system restart. </p>
  
  <p>Our system does heavy writes/read operation on mongo clusters ,and sometime replica get broken.</p>
  
  <p>Then it is no longer feasible to restore replica without deleting data from one of the corrupted server.
  Here are my queries:</p>
  
  <ol>
  <li><p>what is better way to notify when replica is broken using script/some code?We can not use Mongo atlas 
  etc.</p></li>
  <li><p>What is efficient way to restore data on corrupted member.</p></li>
  </ol>