there is the replica with three member (primary,secondary,secondary). Suppose one of secondaries down for a day, after return secondary back to replica how can i find, i
Update 13th February 2017
Agree with the accepted answer that rs.status()
offers adequate information and is an easy command to remember. However, (personally using Mongo 3 now), do also really like the convenience and readability of rs.printSlaveReplicationInfo().
It gives an output something like:
rs.printSlaveReplicationInfo()
source: node-2:27017
syncedTo: Mon Feb 13 2017 06:15:17 GMT-0500 (EST)
0 secs (0 hrs) behind the primary
source: node-3:27017
syncedTo: Mon Feb 13 2017 06:15:16 GMT-0500 (EST)
1 secs (0 hrs) behind the primary
As you can see, it is easy to get a sense of whether the synchronization between the nodes in the replica set is healthy or not.