nagios-plugin-mongodb icon indicating copy to clipboard operation
nagios-plugin-mongodb copied to clipboard

Tweak connection handling for better failure detection

Open bekarau opened this issue 8 years ago • 1 comments

Tweak import lines.

Make connection more serial, giving small default timeout; allows for better failure checking. The way it currently stands, the connection is backgrounded and not made until the next action is done making the exception handler around mongo_connect redundant.

This patch forces a command to happen immediately to ensure that there is a connection by the time mongo_connect() returns.

The default timeouts were also large, gave the limited ability to override timeouts on the check command line.

bekarau avatar Mar 31 '16 06:03 bekarau