def mongodb_stats
      if session
        stats = session.command(dbStats: 1) # Mongoid 3+
        stats = stats.first unless stats.is_a? Hash # Mongoid 5
        stats
      else
        Mongoid.database.stats # Mongoid 2
      end
    rescue => e
      raise ConnectionFailed, e
    end
def mongodb_stats
      if session
        stats = session.command(dbStats: 1) # Mongoid 3+
        stats = stats.first unless stats.is_a? Hash # Mongoid 5
        stats
      else
        Mongoid.database.stats # Mongoid 2
      end
    rescue => e
      raise ConnectionFailed, e
    end
Public: The stats for the app's mongodb

 Returns a hash with the status of the db