Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

pmp-check-mongo: fixed check_balance #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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: 1 addition & 1 deletion nagios/bin/pmp-check-mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def is_balanced(self):
# Loop through each ns and determine if it's balanced or not
for ns in chunks:
balanced = chunks[ns]['total'] / shardsCount
for shard in chunks[ns]['shards']:
for shard in chunks[ns]['shards'].values():
if shard > balanced - threshold and shard < balanced + threshold:
pass
else:
Expand Down