One method is that you do TCP-only monitoring. In this scenario, you establish a three way handshake (or use tcp-half-open monitoring in which no connection is established - you merely look for an [syn, ack] to your [syn], and don't [ack] the [syn, ack] back) and then close the connection assuming it is the web server listening on that port.
A better option however, is to figure out how to exclude your health monitor traffic from logging, though I am unable to give specifics on doing that with rails/mongodb logger.