Primary, secondaries, heartbeats and lag of the whole replica set in one screen — plus a step-down and a config editor when you need them
MongoDB is one of the easier databases to run highly available. A replica set elects its own primary, fails over by itself, and doesn't need a separate HA tool next to it.
But "it fails over by itself" doesn't mean "you never need to look at it". You still need to know who's primary right now, whether the secondaries keep up, and why one member keeps missing heartbeats. That usually means rs.status() — and a long JSON document to scroll through.
So I taught Ivory to read it for me.
The problems
rs.status() is long. The answer is in there, somewhere in a deeply nested document, one member at a time.
Chained replication hides lag. A secondary syncing from another secondary inherits that secondary's lag, and nothing on the surface tells you why it's slow.
Heartbeat failures depend on who's looking. Member A can't reach member B, but B looks fine from C.…