Primary History

Is there any way to identify the previous primary in the Replica Set structure?

For example, there are nodes 1, 2, 3 and in the past, primary 1 is primary 3 is now primary. Can you confirm that number 1 was primary in the past?

Hi @Kim_Hakseon,

You can confirm current replica set member states via the rs.status() helper in the mongo shell, but historical state information is only available via monitoring solutions or log files.

I recommend using a deployment-level monitoring solution (for example MongoDB Cloud Manager or Ops Manager) to track status changes. Monitoring solutions will generally allow you to set up alerts for changes of interest such as election of a new primary, increasing replica set lag, or replica set reconfiguration.


1 Like

Thank you, Thank you :smiley: :smiley: :smiley:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.