def check
      refresh
      primary_status = self.primary_status
      secondary_status = self.secondary_status
      mark_message "Connected to #{session.cluster.nodes.count} nodes in mongodb replica set '#{primary_status['set']}'"
    rescue ConnectionFailed => e
      mark_failure
      mark_message "Error: '#{e}'"
    end
def check
      refresh
      primary_status = self.primary_status
      secondary_status = self.secondary_status
      mark_message "Connected to #{session.cluster.nodes.count} nodes in mongodb replica set '#{primary_status['set']}'"
    rescue ConnectionFailed => e
      mark_failure
      mark_message "Error: '#{e}'"
    end
Public: Initialize a check for a Mongoid replica set

 session - The name of the Mongoid session to use. Defaults to the
   default session.
 Public: Return the status of the mongodb replica set