Permalink
Browse files

MB-6609: Check if node exists on disk_write_queue stats

Maybe ns_server doesn't provide stats for a certain node
  • Loading branch information...
1 parent 1cb1185 commit c1660cb13e5372564365ac1125595d3ec237d3ff @bcui6611 bcui6611 committed Sep 12, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 diskqueue_stats.py
View
@@ -170,7 +170,10 @@ def run(self, accessor, scale, threshold=None):
avg = sum(vals) / samplesCount
else:
avg = 0
- disk_len_vals = len_values["nodeStats"][node]
+ if node in len_values["nodeStats"]:
+ disk_len_vals = len_values["nodeStats"][node]
+ else:
+ continue
if samplesCount > 0:
len_avg = sum(disk_len_vals) / samplesCount
else:

0 comments on commit c1660cb

Please sign in to comment.