diff --git a/nagios/bin/pmp-check-mongo.py b/nagios/bin/pmp-check-mongo.py index cddaa31..bd534eb 100755 --- a/nagios/bin/pmp-check-mongo.py +++ b/nagios/bin/pmp-check-mongo.py @@ -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: