Skip to content

Commit

Permalink
Merge pull request #7 from signalfx/keyerror-log
Browse files Browse the repository at this point in the history
Log error when a metric isn't found instead of breaking
  • Loading branch information
keitwb authored Sep 11, 2018
2 parents 0f9a1ce + 9d5c7f3 commit 28378aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion redis_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ def dispatch_info(self, client):
'counter',
type_instance='commands_processed')
else:
self.dispatch_value(info[key], mtype, type_instance=key)
try:
self.dispatch_value(info[key], mtype, type_instance=key)
except KeyError:
collectd.error("Metric %s not found in Redis INFO output" % key)
continue

def dispatch_list_lengths(self, client):
"""
Expand Down

0 comments on commit 28378aa

Please sign in to comment.