Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions check_mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,8 @@ def check_connect_primary(con, warning, critical, perf_data):
def check_collection_state(con, database, collection):
try:
con[database][collection].find_one()
if (id==None):
return exit_with_general_critical('No result for findOne')
print "OK - Collection %s.%s is reachable " % (database, collection)
return 0

Expand Down