Skip to content

Commit

Permalink
Handle field_evictions/field_size_in_bytes missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Barnaby Gray committed Mar 21, 2013
1 parent 5f11c6f commit 629eba9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/collectors/elasticsearch/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ def collect(self):
cache = indices['cache']
if 'bloom_size_in_bytes' in cache:
metrics['cache.bloom.size'] = cache['bloom_size_in_bytes']
metrics['cache.field.evictions'] = cache['field_evictions']
metrics['cache.field.size'] = cache['field_size_in_bytes']
if 'field_evictions' in cache:
metrics['cache.field.evictions'] = cache['field_evictions']
if 'field_size_in_bytes' in cache:
metrics['cache.field.size'] = cache['field_size_in_bytes']
metrics['cache.filter.count'] = cache['filter_count']
metrics['cache.filter.evictions'] = cache['filter_evictions']
metrics['cache.filter.size'] = cache['filter_size_in_bytes']
Expand Down

0 comments on commit 629eba9

Please sign in to comment.