Skip to content

Commit

Permalink
Merge pull request #1065 from igroenewold/patch-1
Browse files Browse the repository at this point in the history
add logging of serverStatus errors
  • Loading branch information
Remi Hakim committed Aug 29, 2014
2 parents 3e8b54d + 088d280 commit 3bf41f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions checks.d/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ def check(self, instance):
self.log.error("Mongo: cannot connect with config %s" % server)

status = db["$cmd"].find_one({"serverStatus": 1})
if status['ok'] == 0:
self.log.warn(status['errmsg'].__str__())

status['stats'] = db.command('dbstats')

# Handle replica data, if any
Expand Down

0 comments on commit 3bf41f7

Please sign in to comment.